]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Big renaming of functions parsing catalogs: read-po -> read-catalog.
authorBruno Haible <bruno@clisp.org>
Tue, 17 Oct 2006 12:01:33 +0000 (12:01 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:08 +0000 (12:14 +0200)
35 files changed:
gettext-tools/src/ChangeLog
gettext-tools/src/FILES
gettext-tools/src/gettext-po.c
gettext-tools/src/msgattrib.c
gettext-tools/src/msgcat.c
gettext-tools/src/msgcmp.c
gettext-tools/src/msgcomm.c
gettext-tools/src/msgconv.c
gettext-tools/src/msgen.c
gettext-tools/src/msgexec.c
gettext-tools/src/msgfilter.c
gettext-tools/src/msgfmt.c
gettext-tools/src/msggrep.c
gettext-tools/src/msginit.c
gettext-tools/src/msgl-cat.c
gettext-tools/src/msgmerge.c
gettext-tools/src/msguniq.c
gettext-tools/src/open-catalog.c
gettext-tools/src/open-catalog.h
gettext-tools/src/po-gram-gen.y
gettext-tools/src/read-catalog-abstract.c
gettext-tools/src/read-catalog-abstract.h
gettext-tools/src/read-catalog.c
gettext-tools/src/read-catalog.h
gettext-tools/src/read-csharp.c
gettext-tools/src/read-java.c
gettext-tools/src/read-properties.c
gettext-tools/src/read-properties.h
gettext-tools/src/read-resources.c
gettext-tools/src/read-stringtable.c
gettext-tools/src/read-stringtable.h
gettext-tools/src/read-tcl.c
gettext-tools/src/x-po.c
gettext-tools/src/xgettext.c
gettext-tools/src/xgettext.h

index b976b26fca61db441e63e1a8c760df45b1662b51..70a5234021315c8ee57ebf8ab9c1d26b8a250cd3 100644 (file)
@@ -1,5 +1,112 @@
 2006-10-15  Bruno Haible  <bruno@clisp.org>
 
+       * read-catalog-abstract.h (abstract_catalog_reader_ty): Renamed from
+       abstract_po_reader_ty.
+       (abstract_catalog_reader_class_ty): Renamed from
+       abstract_po_reader_class_ty. Update.
+       (ABSTRACT_CATALOG_READER_TY): Renamed from ABSTRACT_PO_READER_TY.
+       Update.
+       (abstract_catalog_reader_ty): Renamed from abstract_po_reader_ty.
+       Update.
+       (catalog_reader_alloc): Renamed from po_reader_alloc.
+       (catalog_reader_parse): Renamed from po_scan.
+       (catalog_reader_free): Renamed from po_reader_free.
+       * read-catalog.h: Update.
+       (default_catalog_reader_class_ty): Renamed from
+       default_po_reader_class_ty.
+       (DEFAULT_CATALOG_READER_TY): Renamed from DEFAULT_PO_READER_TY. Update.
+       (default_catalog_reader_ty): Renamed from default_po_reader_ty. Update.
+       (default_constructor, default_destructor, default_parse_brief,
+       default_parse_debrief, default_directive_domain,
+       default_directive_message, default_comment, default_comment_dot,
+       default_comment_filepos, default_comment_special, default_set_domain,
+       default_add_message): Update.
+       (default_catalog_reader_alloc): Renamed from default_po_reader_alloc.
+       Update.
+       (read_catalog_stream): Renamed from read_po.
+       (read_catalog_file): Renamed from read_po_file.
+       * open-catalog.h (open_catalog_file): Renamed from open_po_file.
+       * msgattrib.c: Update.
+       (main): Update.
+       * msgcat.c: Update.
+       * msgcmp.c: Update.
+       (compare): Update.
+       * msgcomm.c: Update.
+       * msgconv.c: Update.
+       (main): Update.
+       * msgen.c: Update.
+       (main): Update.
+       * msgexec.c: Update.
+       (main): Update.
+       * msgfilter.c: Update.
+       (main): Update.
+       * msgfmt.c: Update.
+       (read_catalog_file_msgfmt): Renamed from read_po_file_msgfmt. Update.
+       (main): Update.
+       (msgfmt_catalog_reader_ty): Renamed from msgfmt_po_reader_ty. Update.
+       (msgfmt_constructor, msgfmt_parse_debrief, msgfmt_set_domain,
+       msgfmt_add_message, msgfmt_frob_new_message, msgfmt_comment_special,
+       msgfmt_methods): Update.
+       (read_catalog_file_msgfmt): Renamed from read_po_file_msgfmt. Update.
+       * msggrep.c: Update.
+       (main): Update.
+       * msginit.c: Update.
+       (main): Update.
+       * msgl-cat.c: Update.
+       (catenate_msgdomain_list): Update.
+       * msgmerge.c: Update.
+       (compendium, merge): Update.
+       * msguniq.c: Update.
+       * open-catalog.c: Update.
+       (try_open_catalog_file): Renamed from try_open_po_file.
+       (open_catalog_file): Renamed from open_po_file. Update.
+       * po-gram-gen.y: Update.
+       * read-catalog-abstract.c: Update.
+       (callback_arg): Update.
+       (catalog_reader_alloc): Renamed from po_reader_alloc.
+       (catalog_reader_free): Renamed from po_reader_free.
+       (call_parse_brief, call_parse_debrief, call_directive_domain,
+       call_directive_message, call_comment, call_comment_dot,
+       call_comment_filepos, call_comment_special): Update.
+       (parse_start): Renamed from po_scan_start.
+       (parse_end): Renamed from po_scan_end.
+       (catalog_reader_parse): Renamed from po_scan.
+       * read-catalog.c: Update.
+       (call_set_domain, call_add_message, call_frob_new_message): Update.
+       (default_constructor, default_destructor, default_parse_brief,
+       default_parse_debrief, default_copy_comment_state,
+       default_reset_comment_state, default_directive_domain,
+       default_directive_message, default_comment, default_comment_dot,
+       default_comment_filepos, default_comment_special, default_set_domain,
+       default_add_message, default_methods): Update.
+       (default_catalog_reader_alloc): Renamed from default_po_reader_alloc.
+       (read_catalog_stream): Renamed from read_po. Update.
+       (read_catalog_file): Renamed from read_po_file. Update.
+       * read-csharp.c: Update.
+       (execute_and_read_po_output): Update.
+       * read-java.c: Update.
+       (execute_and_read_po_output): Update.
+       * read-properties.c: Update.
+       (properties_parse): Update.
+       * read-properties.h: Update.
+       (properties_parse): Update.
+       * read-resources.c: Update.
+       (execute_and_read_po_output): Update.
+       * read-stringtable.c: Update.
+       (stringtable_parse): Update.
+       * read-stringtable.h: Update.
+       (stringtable_parse): Update.
+       * read-tcl.c: Update.
+       (msgdomain_read_tcl): Update.
+       * x-po.c: Update.
+       (extract_add_message, extract_methods, extract): Update.
+       * xgettext.c: Update.
+       (exclude_directive_domain, exclude_directive_message, exclude_methods,
+       read_exclusion_file): Update.
+       * xgettext.h: Update.
+       * gettext-po.c: Update.
+       (po_file_read_v3, po_file_read_v2, po_file_read): Update.
+
        * read-catalog-abstract.h: Renamed from read-po-abstract.h.
        * read-catalog-abstract.c: Renamed from read-po-abstract.c.
        * read-catalog.h: Renamed from read-po.h.
index 905de77ef3058a01091056e6025bde7dc9bc4df4..7be1c047203a6e54210587c9ea8e89514512e356 100644 (file)
@@ -59,8 +59,8 @@ po-xerror.c
 +-------------- Writing PO files
 
 +-------------- Reading PO files
-| open-po.h
-| open-po.c
+| open-catalog.h
+| open-catalog.c
 |               Opening PO files for reading.
 |
 | po-charset.h
@@ -71,17 +71,17 @@ po-xerror.c
 | po-lex.c
 |               Lexical analysis of PO files.
 |
-| read-po-abstract.h
+| read-catalog-abstract.h
 | po-gram.h
 | po-gram-gen.y
 | read-properties.h
 | read-properties.c
 | read-stringtable.h
 | read-stringtable.c
-| read-po-abstract.c
+| read-catalog-abstract.c
 |               Parsing of PO files and Java .properties and NeXTstep/GNUstep
 |              .strings files.
-|         read-po-abstract.h
+|         read-catalog-abstract.h
 |                       General parser structure.
 |         po-gram.h
 |         po-gram-gen.y
@@ -92,11 +92,11 @@ po-xerror.c
 |         read-stringtable.h
 |         read-stringtable.c
 |                       Parsing of NeXTstep/GNUstep .strings files.
-|         read-po-abstract.c
+|         read-catalog-abstract.c
 |                       Top-level parser functions and callbacks.
 |
-| read-po.h
-| read-po.c
+| read-catalog.h
+| read-catalog.c
 |               Reading of a PO file, returning a list-of-messages.
 |
 +-------------- Reading PO files
index 092b21c2b79cef7a86d3e0fee79d91855bed1617..fa7f0c1e9990faaab5a79886eaf4750a7ef6c51c 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "message.h"
 #include "xalloc.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "error.h"
@@ -109,7 +109,7 @@ po_file_read (const char *filename, po_xerror_handler_t handler)
        return NULL;
     }
 
-  /* Establish error handler around read_po().  */
+  /* Establish error handler around read_catalog_stream().  */
   po_xerror =
     (void (*) (int, const message_ty *, const char *, size_t, size_t, int, const char *))
     handler->xerror;
@@ -121,7 +121,8 @@ po_file_read (const char *filename, po_xerror_handler_t handler)
   file = (struct po_file *) xmalloc (sizeof (struct po_file));
   file->real_filename = filename;
   file->logical_filename = filename;
-  file->mdlp = read_po (fp, file->real_filename, file->logical_filename);
+  file->mdlp =
+    read_catalog_stream (fp, file->real_filename, file->logical_filename);
   file->domains = NULL;
 
   /* Restore error handler.  */
@@ -153,7 +154,7 @@ po_file_read_v2 (const char *filename, po_error_handler_t handler)
        return NULL;
     }
 
-  /* Establish error handler around read_po().  */
+  /* Establish error handler around read_catalog_stream().  */
   po_error             = handler->error;
   po_error_at_line     = handler->error_at_line;
   po_multiline_warning = handler->multiline_warning;
@@ -163,7 +164,8 @@ po_file_read_v2 (const char *filename, po_error_handler_t handler)
   file = (struct po_file *) xmalloc (sizeof (struct po_file));
   file->real_filename = filename;
   file->logical_filename = filename;
-  file->mdlp = read_po (fp, file->real_filename, file->logical_filename);
+  file->mdlp =
+    read_catalog_stream (fp, file->real_filename, file->logical_filename);
   file->domains = NULL;
 
   /* Restore error handler.  */
@@ -200,7 +202,8 @@ po_file_read (const char *filename)
   file = (struct po_file *) xmalloc (sizeof (struct po_file));
   file->real_filename = filename;
   file->logical_filename = filename;
-  file->mdlp = read_po (fp, file->real_filename, file->logical_filename);
+  file->mdlp =
+    read_catalog_stream (fp, file->real_filename, file->logical_filename);
   file->domains = NULL;
 
   if (fp != stdin)
index aefbcd0642160eda254c75db2575ba130f8d9cb0..d3ff75aaf2ef1c0a9eb91d6811751a35a9fca294 100644 (file)
@@ -35,7 +35,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "write-properties.h"
@@ -354,11 +354,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
           "--sort-output", "--sort-by-file");
 
   /* Read input file.  */
-  result = read_po_file (input_file);
+  result = read_catalog_file (input_file);
 
   /* Read optional files that limit the extent of the attribute changes.  */
-  only_mdlp = (only_file != NULL ? read_po_file (only_file) : NULL);
-  ignore_mdlp = (ignore_file != NULL ? read_po_file (ignore_file) : NULL);
+  only_mdlp = (only_file != NULL ? read_catalog_file (only_file) : NULL);
+  ignore_mdlp = (ignore_file != NULL ? read_catalog_file (ignore_file) : NULL);
 
   /* Filter the messages and manipulate the attributes.  */
   result = process_msgdomain_list (result, only_mdlp, ignore_mdlp);
index 60346fff5b27948577ee47276d83d0eb0eaa96f2..e0b31a3624a4b084d091e79d6a43018f2905b846 100644 (file)
@@ -37,7 +37,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "write-properties.h"
index 662502339deb9cc624981e1e4ae3e654e3740360..a79d61a4d2a98976d2764c1038436df7348cbd8f 100644 (file)
@@ -36,7 +36,7 @@
 #include "basename.h"
 #include "message.h"
 #include "exit.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "msgl-iconv.h"
 #include "c-strstr.h"
 #include "c-strcase.h"
@@ -345,11 +345,11 @@ compare (const char *fn1, const char *fn2)
   message_list_ty *empty_list;
 
   /* This is the master file, created by a human.  */
-  def = remove_obsoletes (read_po_file (fn1));
+  def = remove_obsoletes (read_catalog_file (fn1));
 
   /* This is the generated file, created by groping the sources with
      the xgettext program.  */
-  ref = remove_obsoletes (read_po_file (fn2));
+  ref = remove_obsoletes (read_catalog_file (fn2));
 
   /* The references file can be either in ASCII or in UTF-8.  If it is
      in UTF-8, we have to convert the definitions to UTF-8 as well.  */
index 6303cc3aa99d40e4dba20727a8df0519616b5dbb..76596303356471932fc4556b0d1565d211687fe2 100644 (file)
@@ -37,7 +37,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "write-properties.h"
index f98f4cc2d43db20e3e4fa602a7edd0b2b74b8c85..24cb9cb411b303f378802cf8ff76279d6dcd6fa9 100644 (file)
@@ -35,7 +35,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "write-properties.h"
@@ -256,7 +256,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
     to_code = locale_charset ();
 
   /* Read input file.  */
-  result = read_po_file (input_file);
+  result = read_catalog_file (input_file);
 
   /* Convert if and only if the output syntax supports different encodings.  */
   if (!output_syntax->requires_utf8)
index 3b8a4890e585624ee370a16e2ea39674b9c0aeb9..248e54ca5cd85265f81ec5257c2a9f2b9454ad36 100644 (file)
@@ -35,7 +35,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "msgl-english.h"
 #include "write-catalog.h"
 #include "write-po.h"
@@ -241,7 +241,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
           "--sort-output", "--sort-by-file");
 
   /* Read input file and add English translations.  */
-  result = msgdomain_list_english (read_po_file (argv[optind]));
+  result = msgdomain_list_english (read_catalog_file (argv[optind]));
 
   /* Sort the results.  */
   if (sort_by_filepos)
index 6074616933ec813972dd2f775d7372da76acf491..38f27bc7d27d995ddaeea72b2f740058060559cc 100644 (file)
@@ -40,7 +40,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "xalloc.h"
 #include "exit.h"
 #include "full-write.h"
@@ -203,7 +203,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
     input_file = "-";
 
   /* Read input file.  */
-  result = read_po_file (input_file);
+  result = read_catalog_file (input_file);
 
   if (strcmp (sub_name, "0") != 0)
     {
index 2120a6d7d7828e90c314a8c0b21e42fba4e0220c..fe20333e6ec62a4ecddb649a3b763401c99cbb19 100644 (file)
@@ -53,7 +53,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "write-properties.h"
@@ -342,7 +342,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
     input_file = "-";
 
   /* Read input file.  */
-  result = read_po_file (input_file);
+  result = read_catalog_file (input_file);
 
   /* Recognize special programs as built-ins.  */
   if (strcmp (sub_name, "recode-sr-latin") == 0 && sub_argc == 1)
index 405e385f6cebd9f6740e2cd6190d27bd77768435..5035a7c0622034ccc863b79a72b07cb910a5b6f5 100644 (file)
@@ -49,8 +49,8 @@
 #include "write-qt.h"
 #include "propername.h"
 #include "message.h"
-#include "open-po.h"
-#include "read-po.h"
+#include "open-catalog.h"
+#include "read-catalog.h"
 #include "po-charset.h"
 #include "msgl-check.h"
 #include "gettext.h"
@@ -188,7 +188,7 @@ static void usage (int status)
 static const char *add_mo_suffix (const char *);
 static struct msg_domain *new_domain (const char *name, const char *file_name);
 static bool is_nonobsolete (const message_ty *mp);
-static void read_po_file_msgfmt (char *filename);
+static void read_catalog_file_msgfmt (char *filename);
 
 
 int
@@ -506,7 +506,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
        current_domain = NULL;
 
       /* And process the input file.  */
-      read_po_file_msgfmt (argv[optind]);
+      read_catalog_file_msgfmt (argv[optind]);
 
       ++optind;
     }
@@ -810,8 +810,8 @@ is_nonobsolete (const message_ty *mp)
 }
 
 
-/* The rest of the file defines a subclass msgfmt_po_reader_ty of
-   default_po_reader_ty.  Its particularities are:
+/* The rest of the file defines a subclass msgfmt_catalog_reader_ty of
+   default_catalog_reader_ty.  Its particularities are:
    - The header entry check is performed on-the-fly.
    - Comments are not stored, they are discarded right away.
      (This is achieved by setting handle_comments = false and
@@ -820,13 +820,13 @@ is_nonobsolete (const message_ty *mp)
  */
 
 
-/* This structure defines a derived class of the default_po_reader_ty class.
-   (See read-po-abstract.h for an explanation.)  */
-typedef struct msgfmt_po_reader_ty msgfmt_po_reader_ty;
-struct msgfmt_po_reader_ty
+/* This structure defines a derived class of the default_catalog_reader_ty
+   class.  (See read-catalog-abstract.h for an explanation.)  */
+typedef struct msgfmt_catalog_reader_ty msgfmt_catalog_reader_ty;
+struct msgfmt_catalog_reader_ty
 {
   /* inherited instance variables, etc */
-  DEFAULT_PO_READER_TY
+  DEFAULT_CATALOG_READER_TY
 
   bool has_header_entry;
   bool has_nonfuzzy_header_entry;
@@ -835,9 +835,9 @@ struct msgfmt_po_reader_ty
 
 /* Prepare for first message.  */
 static void
-msgfmt_constructor (abstract_po_reader_ty *that)
+msgfmt_constructor (abstract_catalog_reader_ty *that)
 {
-  msgfmt_po_reader_ty *this = (msgfmt_po_reader_ty *) that;
+  msgfmt_catalog_reader_ty *this = (msgfmt_catalog_reader_ty *) that;
 
   /* Invoke superclass constructor.  */
   default_constructor (that);
@@ -849,9 +849,9 @@ msgfmt_constructor (abstract_po_reader_ty *that)
 
 /* Some checks after whole file is read.  */
 static void
-msgfmt_parse_debrief (abstract_po_reader_ty *that)
+msgfmt_parse_debrief (abstract_catalog_reader_ty *that)
 {
-  msgfmt_po_reader_ty *this = (msgfmt_po_reader_ty *) that;
+  msgfmt_catalog_reader_ty *this = (msgfmt_catalog_reader_ty *) that;
 
   /* Invoke superclass method.  */
   default_parse_debrief (that);
@@ -886,7 +886,7 @@ warning: older versions of msgfmt will give an error on this\n")));
 
 /* Set 'domain' directive when seen in .po file.  */
 static void
-msgfmt_set_domain (default_po_reader_ty *this, char *name)
+msgfmt_set_domain (default_catalog_reader_ty *this, char *name)
 {
   /* If no output file was given, we change it with each `domain'
      directive.  */
@@ -929,7 +929,7 @@ domain name \"%s\" not suitable as file name: will use prefix"), name);
 
 
 static void
-msgfmt_add_message (default_po_reader_ty *this,
+msgfmt_add_message (default_catalog_reader_ty *this,
                    char *msgctxt,
                    char *msgid,
                    lex_pos_ty *msgid_pos,
@@ -961,11 +961,11 @@ msgfmt_add_message (default_po_reader_ty *this,
 
 
 static void
-msgfmt_frob_new_message (default_po_reader_ty *that, message_ty *mp,
+msgfmt_frob_new_message (default_catalog_reader_ty *that, message_ty *mp,
                         const lex_pos_ty *msgid_pos,
                         const lex_pos_ty *msgstr_pos)
 {
-  msgfmt_po_reader_ty *this = (msgfmt_po_reader_ty *) that;
+  msgfmt_catalog_reader_ty *this = (msgfmt_catalog_reader_ty *) that;
 
   if (!mp->obsolete)
     {
@@ -1016,9 +1016,9 @@ msgfmt_frob_new_message (default_po_reader_ty *that, message_ty *mp,
 
 /* Test for `#, fuzzy' comments and warn.  */
 static void
-msgfmt_comment_special (abstract_po_reader_ty *that, const char *s)
+msgfmt_comment_special (abstract_catalog_reader_ty *that, const char *s)
 {
-  msgfmt_po_reader_ty *this = (msgfmt_po_reader_ty *) that;
+  msgfmt_catalog_reader_ty *this = (msgfmt_catalog_reader_ty *) that;
 
   /* Invoke superclass method.  */
   default_comment_special (that, s);
@@ -1044,10 +1044,10 @@ msgfmt_comment_special (abstract_po_reader_ty *that, const char *s)
    and all actions resulting from the parse will be through
    invocations of method functions of that object.  */
 
-static default_po_reader_class_ty msgfmt_methods =
+static default_catalog_reader_class_ty msgfmt_methods =
 {
   {
-    sizeof (msgfmt_po_reader_ty),
+    sizeof (msgfmt_catalog_reader_ty),
     msgfmt_constructor,
     default_destructor,
     default_parse_brief,
@@ -1067,13 +1067,13 @@ static default_po_reader_class_ty msgfmt_methods =
 
 /* Read .po file FILENAME and store translation pairs.  */
 static void
-read_po_file_msgfmt (char *filename)
+read_catalog_file_msgfmt (char *filename)
 {
   char *real_filename;
-  FILE *fp = open_po_file (filename, &real_filename, true);
-  default_po_reader_ty *pop;
+  FILE *fp = open_catalog_file (filename, &real_filename, true);
+  default_catalog_reader_ty *pop;
 
-  pop = default_po_reader_alloc (&msgfmt_methods);
+  pop = default_catalog_reader_alloc (&msgfmt_methods);
   pop->handle_comments = false;
   pop->handle_filepos_comments = false;
   pop->allow_domain_directives = true;
@@ -1088,9 +1088,9 @@ read_po_file_msgfmt (char *filename)
       pop->mlp = current_domain->mlp;
     }
   po_lex_pass_obsolete_entries (true);
-  po_scan ((abstract_po_reader_ty *) pop, fp, real_filename, filename,
-          input_syntax);
-  po_reader_free ((abstract_po_reader_ty *) pop);
+  catalog_reader_parse ((abstract_catalog_reader_ty *) pop, fp, real_filename,
+                       filename, input_syntax);
+  catalog_reader_free ((abstract_catalog_reader_ty *) pop);
 
   if (fp != stdin)
     fclose (fp);
index f6823ce259b40ed59c39456a77ba885b5efb9481..3dcaa93bbf3c1b443aac24bf0bf02a36f6dff14e 100644 (file)
@@ -46,7 +46,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "write-properties.h"
@@ -446,7 +446,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
     }
 
   /* Read input file.  */
-  result = read_po_file (input_file);
+  result = read_catalog_file (input_file);
 
   if (grep_task[0].pattern_count > 0
       || grep_task[1].pattern_count > 0
index 05595a4c6dfb569647e1cebfe3a702c439d674f3..ebf3bbe14f3c1d4ee475390f307602300f81bf8c 100644 (file)
@@ -59,7 +59,7 @@
 #include "c-strstr.h"
 #include "c-strcase.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "write-properties.h"
@@ -315,7 +315,7 @@ the output .po file through the --output-file option.\n"),
     }
 
   /* Read input file.  */
-  result = read_po_file (input_file);
+  result = read_catalog_file (input_file);
 
   /* Fill the header entry.  */
   result = fill_header (result);
index 241179cc1e9671f84460847973c610ea2f22d9a6..e600ffede6b7c7ac5a5195e4ef41a100978a0c73 100644 (file)
@@ -33,7 +33,7 @@
 #include "xerror.h"
 #include "xvasprintf.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "po-charset.h"
 #include "msgl-ascii.h"
 #include "msgl-equal.h"
@@ -119,7 +119,7 @@ catenate_msgdomain_list (string_list_ty *file_list, const char *to_code)
   mdlps =
     (msgdomain_list_ty **) xmalloc (nfiles * sizeof (msgdomain_list_ty *));
   for (n = 0; n < nfiles; n++)
-    mdlps[n] = read_po_file (files[n]);
+    mdlps[n] = read_catalog_file (files[n]);
 
   /* Determine the canonical name of each input file's encoding.  */
   canon_charsets = (const char ***) xmalloc (nfiles * sizeof (const char **));
index 181bde660d724d185cb9890d9ec9509cff06bfee..1f73e3701f1845b629f286bc00a8766b75b2d18a 100644 (file)
@@ -37,7 +37,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "write-properties.h"
@@ -583,7 +583,7 @@ compendium (const char *filename)
   msgdomain_list_ty *mdlp;
   size_t k;
 
-  mdlp = read_po_file (filename);
+  mdlp = read_catalog_file (filename);
   if (compendiums == NULL)
     {
       compendiums = message_list_list_alloc ();
@@ -1365,11 +1365,11 @@ merge (const char *fn1, const char *fn2, msgdomain_list_ty **defp)
   stats.merged = stats.fuzzied = stats.missing = stats.obsolete = 0;
 
   /* This is the definitions file, created by a human.  */
-  def = read_po_file (fn1);
+  def = read_catalog_file (fn1);
 
   /* This is the references file, created by groping the sources with
      the xgettext program.  */
-  ref = read_po_file (fn2);
+  ref = read_catalog_file (fn2);
   /* Add a dummy header entry, if the references file contains none.  */
   for (k = 0; k < ref->nitems; k++)
     if (message_list_search (ref->item[k]->messages, NULL, "") == NULL)
index fe6e1fdddbc5af62b578279156e6fb62c9abb7aa..e8dca9689bad805fc64a759bcafbc4ba3120e54b 100644 (file)
@@ -36,7 +36,7 @@
 #include "relocatable.h"
 #include "basename.h"
 #include "message.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "write-catalog.h"
 #include "write-po.h"
 #include "write-properties.h"
index d92569fc18ebbc0fbc195a069d02c236aea43593..1d83826d7199e3b1e6b575f9b1650932a88bd7b7 100644 (file)
@@ -21,7 +21,7 @@
 #endif
 
 /* Specification.  */
-#include "open-po.h"
+#include "open-catalog.h"
 
 #include <errno.h>
 #include <stdbool.h>
@@ -42,7 +42,7 @@
 #define SIZEOF(a) (sizeof(a)/sizeof(a[0]))
 
 static FILE *
-try_open_po_file (const char *input_name, char **real_file_name_p)
+try_open_catalog_file (const char *input_name, char **real_file_name_p)
 {
   static const char *extension[] = { "", ".po", ".pot", };
   char *file_name;
@@ -109,10 +109,10 @@ try_open_po_file (const char *input_name, char **real_file_name_p)
    file's pathname is returned in *REAL_FILE_NAME_P, for error message
    purposes.  */
 FILE *
-open_po_file (const char *input_name, char **real_file_name_p,
-             bool exit_on_error)
+open_catalog_file (const char *input_name, char **real_file_name_p,
+                  bool exit_on_error)
 {
-  FILE *fp = try_open_po_file (input_name, real_file_name_p);
+  FILE *fp = try_open_catalog_file (input_name, real_file_name_p);
 
   if (fp == NULL && exit_on_error)
     {
index b78e0001f65aa7103982843bc67e7832475c59c2..3dd10a3d2b6e5a90952fe5b7b6df64c09edcfefd 100644 (file)
@@ -1,5 +1,5 @@
 /* Opening PO files.
-   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
+   Copyright (C) 1995-1997, 2000-2003, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _OPEN_PO_H
-#define _OPEN_PO_H
+#ifndef _OPEN_CATALOG_H
+#define _OPEN_CATALOG_H
 
 #include <stdbool.h>
 #include <stdio.h>
@@ -32,8 +32,8 @@ extern "C" {
    not found, the list of directories in "dir-list.h" is searched.  The
    file's pathname is returned in *REAL_FILE_NAME_P, for error message
    purposes.  */
-extern FILE *open_po_file (const char *input_name, char **real_file_name_p,
-                          bool exit_on_error);
+extern FILE *open_catalog_file (const char *input_name,
+                               char **real_file_name_p, bool exit_on_error);
 
 
 #ifdef __cplusplus
@@ -41,4 +41,4 @@ extern FILE *open_po_file (const char *input_name, char **real_file_name_p,
 #endif
 
 
-#endif /* _OPEN_PO_H */
+#endif /* _OPEN_CATALOG_H */
index 145f2735127d8a40d7b499b61ee69afa4c34f88f..61f73f61fb6535ee8f8dcd7c4f5f8654cf5ea450 100644 (file)
@@ -36,7 +36,7 @@
 #include "error.h"
 #include "xalloc.h"
 #include "gettext.h"
-#include "read-po-abstract.h"
+#include "read-catalog-abstract.h"
 
 #define _(str) gettext (str)
 
index c330b4d176e6ea30fedcf39192329d635675eb73..9406596b4ee7005262a84d7f5c63faec48067773 100644 (file)
@@ -23,7 +23,7 @@
 #endif
 
 /* Specification.  */
-#include "read-po-abstract.h"
+#include "read-catalog-abstract.h"
 
 #include <stdlib.h>
 #include <string.h>
 #include "gettext.h"
 
 /* Local variables.  */
-static abstract_po_reader_ty *callback_arg;
+static abstract_catalog_reader_ty *callback_arg;
 
 
 /* ========================================================================= */
-/* Allocating and freeing instances of abstract_po_reader_ty.  */
+/* Allocating and freeing instances of abstract_catalog_reader_ty.  */
 
 
-abstract_po_reader_ty *
-po_reader_alloc (abstract_po_reader_class_ty *method_table)
+abstract_catalog_reader_ty *
+catalog_reader_alloc (abstract_catalog_reader_class_ty *method_table)
 {
-  abstract_po_reader_ty *pop;
+  abstract_catalog_reader_ty *pop;
 
-  pop = (abstract_po_reader_ty *) xmalloc (method_table->size);
+  pop = (abstract_catalog_reader_ty *) xmalloc (method_table->size);
   pop->methods = method_table;
   if (method_table->constructor)
     method_table->constructor (pop);
@@ -58,7 +58,7 @@ po_reader_alloc (abstract_po_reader_class_ty *method_table)
 
 
 void
-po_reader_free (abstract_po_reader_ty *pop)
+catalog_reader_free (abstract_catalog_reader_ty *pop)
 {
   if (pop->methods->destructor)
     pop->methods->destructor (pop);
@@ -71,28 +71,28 @@ po_reader_free (abstract_po_reader_ty *pop)
 
 
 static inline void
-call_parse_brief (abstract_po_reader_ty *pop)
+call_parse_brief (abstract_catalog_reader_ty *pop)
 {
   if (pop->methods->parse_brief)
     pop->methods->parse_brief (pop);
 }
 
 static inline void
-call_parse_debrief (abstract_po_reader_ty *pop)
+call_parse_debrief (abstract_catalog_reader_ty *pop)
 {
   if (pop->methods->parse_debrief)
     pop->methods->parse_debrief (pop);
 }
 
 static inline void
-call_directive_domain (abstract_po_reader_ty *pop, char *name)
+call_directive_domain (abstract_catalog_reader_ty *pop, char *name)
 {
   if (pop->methods->directive_domain)
     pop->methods->directive_domain (pop, name);
 }
 
 static inline void
-call_directive_message (abstract_po_reader_ty *pop,
+call_directive_message (abstract_catalog_reader_ty *pop,
                        char *msgctxt,
                        char *msgid,
                        lex_pos_ty *msgid_pos,
@@ -115,28 +115,29 @@ call_directive_message (abstract_po_reader_ty *pop,
 }
 
 static inline void
-call_comment (abstract_po_reader_ty *pop, const char *s)
+call_comment (abstract_catalog_reader_ty *pop, const char *s)
 {
   if (pop->methods->comment != NULL)
     pop->methods->comment (pop, s);
 }
 
 static inline void
-call_comment_dot (abstract_po_reader_ty *pop, const char *s)
+call_comment_dot (abstract_catalog_reader_ty *pop, const char *s)
 {
   if (pop->methods->comment_dot != NULL)
     pop->methods->comment_dot (pop, s);
 }
 
 static inline void
-call_comment_filepos (abstract_po_reader_ty *pop, const char *name, size_t line)
+call_comment_filepos (abstract_catalog_reader_ty *pop, const char *name,
+                     size_t line)
 {
   if (pop->methods->comment_filepos)
     pop->methods->comment_filepos (pop, name, line);
 }
 
 static inline void
-call_comment_special (abstract_po_reader_ty *pop, const char *s)
+call_comment_special (abstract_catalog_reader_ty *pop, const char *s)
 {
   if (pop->methods->comment_special != NULL)
     pop->methods->comment_special (pop, s);
@@ -148,7 +149,7 @@ call_comment_special (abstract_po_reader_ty *pop, const char *s)
 
 
 static inline void
-po_scan_start (abstract_po_reader_ty *pop)
+parse_start (abstract_catalog_reader_ty *pop)
 {
   /* The parse will call the po_callback_... functions (see below)
      when the various directive are recognised.  The callback_arg
@@ -160,7 +161,7 @@ po_scan_start (abstract_po_reader_ty *pop)
 }
 
 static inline void
-po_scan_end (abstract_po_reader_ty *pop)
+parse_end (abstract_catalog_reader_ty *pop)
 {
   call_parse_debrief (pop);
   callback_arg = NULL;
@@ -168,33 +169,29 @@ po_scan_end (abstract_po_reader_ty *pop)
 
 
 void
-po_scan (abstract_po_reader_ty *pop, FILE *fp,
-        const char *real_filename, const char *logical_filename,
-        input_syntax_ty syntax)
+catalog_reader_parse (abstract_catalog_reader_ty *pop, FILE *fp,
+                     const char *real_filename, const char *logical_filename,
+                     input_syntax_ty syntax)
 {
   /* Parse the stream's content.  */
+  parse_start (pop);
   switch (syntax)
     {
     case syntax_po:
       lex_start (fp, real_filename, logical_filename);
-      po_scan_start (pop);
       po_gram_parse ();
-      po_scan_end (pop);
       lex_end ();
       break;
     case syntax_properties:
-      po_scan_start (pop);
       properties_parse (pop, fp, real_filename, logical_filename);
-      po_scan_end (pop);
       break;
     case syntax_stringtable:
-      po_scan_start (pop);
       stringtable_parse (pop, fp, real_filename, logical_filename);
-      po_scan_end (pop);
       break;
     default:
       abort ();
     }
+  parse_end (pop);
 
   if (error_message_count > 0)
     po_xerror (PO_SEVERITY_FATAL_ERROR, NULL,
@@ -208,7 +205,8 @@ po_scan (abstract_po_reader_ty *pop, FILE *fp,
 
 
 /* ========================================================================= */
-/* Callbacks used by po-gram.y or po-lex.c, indirectly from po_scan.  */
+/* Callbacks used by po-gram.y or po-lex.c, indirectly from
+   catalog_reader_parse.  */
 
 
 /* This function is called by po_gram_lex() whenever a domain directive
index f3c9a323bce751d7cf90e6bf968b6f0fba8dab0c..ede334b2504e89a6d9b019347d92eb77f57efe61 100644 (file)
@@ -17,8 +17,8 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _READ_PO_ABSTRACT_H
-#define _READ_PO_ABSTRACT_H
+#ifndef _READ_CATALOG_ABSTRACT_H
+#define _READ_CATALOG_ABSTRACT_H
 
 #include "po-lex.h"
 #include "message.h"
@@ -40,7 +40,7 @@ extern "C" {
    and inheritance - more than enough for the immediate needs.  */
 
 /* Forward declaration.  */
-struct abstract_po_reader_ty;
+struct abstract_catalog_reader_ty;
 
 
 /* This first structure, playing the role of the "Class" in OO sense,
@@ -48,33 +48,34 @@ struct abstract_po_reader_ty;
    class (base or derived).  Use a NULL pointer where no action is
    required.  */
 
-typedef struct abstract_po_reader_class_ty abstract_po_reader_class_ty;
-struct abstract_po_reader_class_ty
+typedef struct abstract_catalog_reader_class_ty
+        abstract_catalog_reader_class_ty;
+struct abstract_catalog_reader_class_ty
 {
   /* how many bytes to malloc for an instance of this class */
   size_t size;
 
   /* what to do immediately after the instance is malloc()ed */
-  void (*constructor) (struct abstract_po_reader_ty *pop);
+  void (*constructor) (struct abstract_catalog_reader_ty *pop);
 
   /* what to do immediately before the instance is free()ed */
-  void (*destructor) (struct abstract_po_reader_ty *pop);
+  void (*destructor) (struct abstract_catalog_reader_ty *pop);
 
   /* This method is invoked before the parse, but after the file is
      opened by the lexer.  */
-  void (*parse_brief) (struct abstract_po_reader_ty *pop);
+  void (*parse_brief) (struct abstract_catalog_reader_ty *pop);
 
   /* This method is invoked after the parse, but before the file is
      closed by the lexer.  The intention is to make consistency checks
      against the file here, and emit the errors through the lex_error*
      functions.  */
-  void (*parse_debrief) (struct abstract_po_reader_ty *pop);
+  void (*parse_debrief) (struct abstract_catalog_reader_ty *pop);
 
   /* what to do with a domain directive */
-  void (*directive_domain) (struct abstract_po_reader_ty *pop, char *name);
+  void (*directive_domain) (struct abstract_catalog_reader_ty *pop, char *name);
 
   /* what to do with a message directive */
-  void (*directive_message) (struct abstract_po_reader_ty *pop,
+  void (*directive_message) (struct abstract_catalog_reader_ty *pop,
                             char *msgctxt,
                             char *msgid, lex_pos_ty *msgid_pos,
                             char *msgid_plural,
@@ -87,25 +88,26 @@ struct abstract_po_reader_class_ty
   /* What to do with a plain-vanilla comment - the expectation is that
      they will be accumulated, and added to the next message
      definition seen.  Or completely ignored.  */
-  void (*comment) (struct abstract_po_reader_ty *pop, const char *s);
+  void (*comment) (struct abstract_catalog_reader_ty *pop, const char *s);
 
   /* What to do with a comment that starts with a dot (i.e.  extracted
      by xgettext) - the expectation is that they will be accumulated,
      and added to the next message definition seen.  Or completely
      ignored.  */
-  void (*comment_dot) (struct abstract_po_reader_ty *pop, const char *s);
+  void (*comment_dot) (struct abstract_catalog_reader_ty *pop, const char *s);
 
   /* What to do with a file position seen in a comment (i.e. a message
      location comment extracted by xgettext) - the expectation is that
      they will be accumulated, and added to the next message
      definition seen.  Or completely ignored.  */
-  void (*comment_filepos) (struct abstract_po_reader_ty *pop,
+  void (*comment_filepos) (struct abstract_catalog_reader_ty *pop,
                           const char *s, size_t line);
 
   /* What to do with a comment that starts with a ',' or '!' - this is a
      special comment.  One of the possible uses is to indicate a
      inexact translation.  */
-  void (*comment_special) (struct abstract_po_reader_ty *pop, const char *s);
+  void (*comment_special) (struct abstract_catalog_reader_ty *pop,
+                          const char *s);
 };
 
 
@@ -113,24 +115,24 @@ struct abstract_po_reader_class_ty
    Derived methods will often need to cast their first argument before
    using it (this corresponds to the implicit ``this'' argument in C++).
 
-   When declaring derived classes, use the ABSTRACT_PO_READER_TY define
+   When declaring derived classes, use the ABSTRACT_CATALOG_READER_TY define
    at the start of the structure, to declare inherited instance variables,
    etc.  */
 
-#define ABSTRACT_PO_READER_TY \
-  abstract_po_reader_class_ty *methods;
+#define ABSTRACT_CATALOG_READER_TY \
+  abstract_catalog_reader_class_ty *methods;
 
-typedef struct abstract_po_reader_ty abstract_po_reader_ty;
-struct abstract_po_reader_ty
+typedef struct abstract_catalog_reader_ty abstract_catalog_reader_ty;
+struct abstract_catalog_reader_ty
 {
-  ABSTRACT_PO_READER_TY
+  ABSTRACT_CATALOG_READER_TY
 };
 
 
-/* Allocate a fresh abstract_po_reader_ty (or derived class) instance and
+/* Allocate a fresh abstract_catalog_reader_ty (or derived class) instance and
    call its constructor.  */
-extern abstract_po_reader_ty *
-       po_reader_alloc (abstract_po_reader_class_ty *method_table);
+extern abstract_catalog_reader_ty *
+       catalog_reader_alloc (abstract_catalog_reader_class_ty *method_table);
 
 /* Kinds of PO file input syntaxes.  */
 enum input_syntax_ty
@@ -142,19 +144,21 @@ enum input_syntax_ty
 typedef enum input_syntax_ty input_syntax_ty;
 
 /* Read a PO file from a stream, and dispatch to the various
-   abstract_po_reader_class_ty methods.  */
+   abstract_catalog_reader_class_ty methods.  */
 extern void
-       po_scan (abstract_po_reader_ty *pop, FILE *fp,
-               const char *real_filename, const char *logical_filename,
-               input_syntax_ty syntax);
+       catalog_reader_parse (abstract_catalog_reader_ty *pop, FILE *fp,
+                            const char *real_filename,
+                            const char *logical_filename,
+                            input_syntax_ty syntax);
 
-/* Call the destructor and deallocate a abstract_po_reader_ty (or derived
+/* Call the destructor and deallocate a abstract_catalog_reader_ty (or derived
    class) instance.  */
 extern void
-       po_reader_free (abstract_po_reader_ty *pop);
+       catalog_reader_free (abstract_catalog_reader_ty *pop);
 
 
-/* Callbacks used by po-gram.y or po-lex.c, indirectly from po_scan.  */
+/* Callbacks used by po-gram.y or po-lex.c, indirectly from
+   catalog_reader_parse.  */
 extern void po_callback_domain (char *name);
 extern void po_callback_message (char *msgctxt,
                                 char *msgid, lex_pos_ty *msgid_pos,
@@ -181,4 +185,4 @@ extern void po_parse_comment_special (const char *s, bool *fuzzyp,
 #endif
 
 
-#endif /* _READ_PO_ABSTRACT_H */
+#endif /* _READ_CATALOG_ABSTRACT_H */
index 2ea14187d10abee1601cbc834d7b45f8d33a1aae..82a4d1e6ba9556a91e81eaec62bf862c9830e383 100644 (file)
 #endif
 
 /* Specification.  */
-#include "read-po.h"
+#include "read-catalog.h"
 
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "open-po.h"
+#include "open-catalog.h"
 #include "po-charset.h"
 #include "po-xerror.h"
 #include "xalloc.h"
 /* Inline functions to invoke the methods.  */
 
 static inline void
-call_set_domain (struct default_po_reader_ty *this, char *name)
+call_set_domain (struct default_catalog_reader_ty *this, char *name)
 {
-  default_po_reader_class_ty *methods =
-    (default_po_reader_class_ty *) this->methods;
+  default_catalog_reader_class_ty *methods =
+    (default_catalog_reader_class_ty *) this->methods;
 
   if (methods->set_domain)
     methods->set_domain (this, name);
 }
 
 static inline void
-call_add_message (struct default_po_reader_ty *this,
+call_add_message (struct default_catalog_reader_ty *this,
                  char *msgctxt,
                  char *msgid, lex_pos_ty *msgid_pos, char *msgid_plural,
                  char *msgstr, size_t msgstr_len, lex_pos_ty *msgstr_pos,
                  char *prev_msgctxt, char *prev_msgid, char *prev_msgid_plural,
                  bool force_fuzzy, bool obsolete)
 {
-  default_po_reader_class_ty *methods =
-    (default_po_reader_class_ty *) this->methods;
+  default_catalog_reader_class_ty *methods =
+    (default_catalog_reader_class_ty *) this->methods;
 
   if (methods->add_message)
     methods->add_message (this, msgctxt,
@@ -69,12 +69,12 @@ call_add_message (struct default_po_reader_ty *this,
 }
 
 static inline void
-call_frob_new_message (struct default_po_reader_ty *this, message_ty *mp,
+call_frob_new_message (struct default_catalog_reader_ty *this, message_ty *mp,
                       const lex_pos_ty *msgid_pos,
                       const lex_pos_ty *msgstr_pos)
 {
-  default_po_reader_class_ty *methods =
-    (default_po_reader_class_ty *) this->methods;
+  default_catalog_reader_class_ty *methods =
+    (default_catalog_reader_class_ty *) this->methods;
 
   if (methods->frob_new_message)
     methods->frob_new_message (this, mp, msgid_pos, msgstr_pos);
@@ -82,7 +82,7 @@ call_frob_new_message (struct default_po_reader_ty *this, message_ty *mp,
 
 
 /* ========================================================================= */
-/* Implementation of default_po_reader_ty's methods.  */
+/* Implementation of default_catalog_reader_ty's methods.  */
 
 
 /* Implementation of methods declared in the superclass.  */
@@ -90,9 +90,9 @@ call_frob_new_message (struct default_po_reader_ty *this, message_ty *mp,
 
 /* Prepare for first message.  */
 void
-default_constructor (abstract_po_reader_ty *that)
+default_constructor (abstract_catalog_reader_ty *that)
 {
-  default_po_reader_ty *this = (default_po_reader_ty *) that;
+  default_catalog_reader_ty *this = (default_catalog_reader_ty *) that;
   size_t i;
 
   this->domain = MESSAGE_DOMAIN_DEFAULT;
@@ -108,9 +108,9 @@ default_constructor (abstract_po_reader_ty *that)
 
 
 void
-default_destructor (abstract_po_reader_ty *that)
+default_destructor (abstract_catalog_reader_ty *that)
 {
-  default_po_reader_ty *this = (default_po_reader_ty *) that;
+  default_catalog_reader_ty *this = (default_catalog_reader_ty *) that;
 
   /* Do not free this->mdlp and this->mlp.  */
   if (this->handle_comments)
@@ -133,7 +133,7 @@ default_destructor (abstract_po_reader_ty *that)
 
 
 void
-default_parse_brief (abstract_po_reader_ty *that)
+default_parse_brief (abstract_catalog_reader_ty *that)
 {
   /* We need to parse comments, because even if this->handle_comments and
      this->handle_filepos_comments are false, we need to know which messages
@@ -143,14 +143,14 @@ default_parse_brief (abstract_po_reader_ty *that)
 
 
 void
-default_parse_debrief (abstract_po_reader_ty *that)
+default_parse_debrief (abstract_catalog_reader_ty *that)
 {
 }
 
 
 /* Add the accumulated comments to the message.  */
 static void
-default_copy_comment_state (default_po_reader_ty *this, message_ty *mp)
+default_copy_comment_state (default_catalog_reader_ty *this, message_ty *mp)
 {
   size_t j, i;
 
@@ -181,7 +181,7 @@ default_copy_comment_state (default_po_reader_ty *this, message_ty *mp)
 
 
 static void
-default_reset_comment_state (default_po_reader_ty *this)
+default_reset_comment_state (default_catalog_reader_ty *this)
 {
   size_t j, i;
 
@@ -216,9 +216,9 @@ default_reset_comment_state (default_po_reader_ty *this)
 
 /* Process 'domain' directive from .po file.  */
 void
-default_directive_domain (abstract_po_reader_ty *that, char *name)
+default_directive_domain (abstract_catalog_reader_ty *that, char *name)
 {
-  default_po_reader_ty *this = (default_po_reader_ty *) that;
+  default_catalog_reader_ty *this = (default_catalog_reader_ty *) that;
 
   call_set_domain (this, name);
 
@@ -231,7 +231,7 @@ default_directive_domain (abstract_po_reader_ty *that, char *name)
 
 /* Process ['msgctxt'/]'msgid'/'msgstr' pair from .po file.  */
 void
-default_directive_message (abstract_po_reader_ty *that,
+default_directive_message (abstract_catalog_reader_ty *that,
                           char *msgctxt,
                           char *msgid,
                           lex_pos_ty *msgid_pos,
@@ -242,7 +242,7 @@ default_directive_message (abstract_po_reader_ty *that,
                           char *prev_msgid, char *prev_msgid_plural,
                           bool force_fuzzy, bool obsolete)
 {
-  default_po_reader_ty *this = (default_po_reader_ty *) that;
+  default_catalog_reader_ty *this = (default_catalog_reader_ty *) that;
 
   call_add_message (this, msgctxt, msgid, msgid_pos, msgid_plural,
                    msgstr, msgstr_len, msgstr_pos,
@@ -255,9 +255,9 @@ default_directive_message (abstract_po_reader_ty *that,
 
 
 void
-default_comment (abstract_po_reader_ty *that, const char *s)
+default_comment (abstract_catalog_reader_ty *that, const char *s)
 {
-  default_po_reader_ty *this = (default_po_reader_ty *) that;
+  default_catalog_reader_ty *this = (default_catalog_reader_ty *) that;
 
   if (this->handle_comments)
     {
@@ -269,9 +269,9 @@ default_comment (abstract_po_reader_ty *that, const char *s)
 
 
 void
-default_comment_dot (abstract_po_reader_ty *that, const char *s)
+default_comment_dot (abstract_catalog_reader_ty *that, const char *s)
 {
-  default_po_reader_ty *this = (default_po_reader_ty *) that;
+  default_catalog_reader_ty *this = (default_catalog_reader_ty *) that;
 
   if (this->handle_comments)
     {
@@ -283,10 +283,10 @@ default_comment_dot (abstract_po_reader_ty *that, const char *s)
 
 
 void
-default_comment_filepos (abstract_po_reader_ty *that,
+default_comment_filepos (abstract_catalog_reader_ty *that,
                         const char *name, size_t line)
 {
-  default_po_reader_ty *this = (default_po_reader_ty *) that;
+  default_catalog_reader_ty *this = (default_catalog_reader_ty *) that;
 
   if (this->handle_filepos_comments)
     {
@@ -304,9 +304,9 @@ default_comment_filepos (abstract_po_reader_ty *that,
 
 /* Test for '#, fuzzy' comments and warn.  */
 void
-default_comment_special (abstract_po_reader_ty *that, const char *s)
+default_comment_special (abstract_catalog_reader_ty *that, const char *s)
 {
-  default_po_reader_ty *this = (default_po_reader_ty *) that;
+  default_catalog_reader_ty *this = (default_catalog_reader_ty *) that;
 
   po_parse_comment_special (s, &this->is_fuzzy, this->is_format,
                            &this->do_wrap);
@@ -317,7 +317,7 @@ default_comment_special (abstract_po_reader_ty *that, const char *s)
 
 
 void
-default_set_domain (default_po_reader_ty *this, char *name)
+default_set_domain (default_catalog_reader_ty *this, char *name)
 {
   if (this->allow_domain_directives)
     /* Override current domain name.  Don't free memory.  */
@@ -333,7 +333,7 @@ default_set_domain (default_po_reader_ty *this, char *name)
 }
 
 void
-default_add_message (default_po_reader_ty *this,
+default_add_message (default_catalog_reader_ty *this,
                     char *msgctxt,
                     char *msgid,
                     lex_pos_ty *msgid_pos,
@@ -421,10 +421,10 @@ default_add_message (default_po_reader_ty *this,
    and all actions resulting from the parse will be through
    invocations of method functions of that object.  */
 
-static default_po_reader_class_ty default_methods =
+static default_catalog_reader_class_ty default_methods =
 {
   {
-    sizeof (default_po_reader_ty),
+    sizeof (default_catalog_reader_ty),
     default_constructor,
     default_destructor,
     default_parse_brief,
@@ -442,10 +442,11 @@ static default_po_reader_class_ty default_methods =
 };
 
 
-default_po_reader_ty *
-default_po_reader_alloc (default_po_reader_class_ty *method_table)
+default_catalog_reader_ty *
+default_catalog_reader_alloc (default_catalog_reader_class_ty *method_table)
 {
-  return (default_po_reader_ty *) po_reader_alloc (&method_table->super);
+  return
+    (default_catalog_reader_ty *) catalog_reader_alloc (&method_table->super);
 }
 
 
@@ -467,12 +468,13 @@ input_syntax_ty input_syntax = syntax_po;
 
 
 msgdomain_list_ty *
-read_po (FILE *fp, const char *real_filename, const char *logical_filename)
+read_catalog_stream (FILE *fp, const char *real_filename,
+                    const char *logical_filename)
 {
-  default_po_reader_ty *pop;
+  default_catalog_reader_ty *pop;
   msgdomain_list_ty *mdlp;
 
-  pop = default_po_reader_alloc (&default_methods);
+  pop = default_catalog_reader_alloc (&default_methods);
   pop->handle_comments = true;
   pop->handle_filepos_comments = (line_comment != 0);
   pop->allow_domain_directives = true;
@@ -485,22 +487,22 @@ read_po (FILE *fp, const char *real_filename, const char *logical_filename)
        convert strings to UTF-8.  */
     pop->mdlp->encoding = po_charset_utf8;
   po_lex_pass_obsolete_entries (true);
-  po_scan ((abstract_po_reader_ty *) pop, fp, real_filename, logical_filename,
-          input_syntax);
+  catalog_reader_parse ((abstract_catalog_reader_ty *) pop, fp, real_filename,
+                       logical_filename, input_syntax);
   mdlp = pop->mdlp;
-  po_reader_free ((abstract_po_reader_ty *) pop);
+  catalog_reader_free ((abstract_catalog_reader_ty *) pop);
   return mdlp;
 }
 
 
 msgdomain_list_ty *
-read_po_file (const char *filename)
+read_catalog_file (const char *filename)
 {
   char *real_filename;
-  FILE *fp = open_po_file (filename, &real_filename, true);
+  FILE *fp = open_catalog_file (filename, &real_filename, true);
   msgdomain_list_ty *result;
 
-  result = read_po (fp, real_filename, filename);
+  result = read_catalog_stream (fp, real_filename, filename);
 
   if (fp != stdin)
     fclose (fp);
index 268de395be3dabefd1e8e0a57cc0320c27d322a9..2f944b552dbf083d1ac75f3fbee17d87298b9d42 100644 (file)
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _READ_PO_H
-#define _READ_PO_H
+#ifndef _READ_CATALOG_H
+#define _READ_CATALOG_H
 
 #include "message.h"
-#include "read-po-abstract.h"
+#include "read-catalog-abstract.h"
 
 #include <stdbool.h>
 #include <stdio.h>
@@ -37,25 +37,25 @@ extern "C" {
 
 
 /* The following pair of structures cooperate to create a derived class from
-   class abstract_po_reader_ty.  (See read-po-abstract.h for an explanation.)
-   It implements the default behaviour of reading a PO file and converting it
-   to an 'msgdomain_list_ty *'.  */
+   class abstract_catalog_reader_ty.  (See read-catalog-abstract.h for an
+   explanation.)  It implements the default behaviour of reading a PO file
+   and converting it to an 'msgdomain_list_ty *'.  */
 
 /* Forward declaration.  */
-struct default_po_reader_ty;
+struct default_catalog_reader_ty;
 
 
-typedef struct default_po_reader_class_ty default_po_reader_class_ty;
-struct default_po_reader_class_ty
+typedef struct default_catalog_reader_class_ty default_catalog_reader_class_ty;
+struct default_catalog_reader_class_ty
 {
   /* Methods inherited from superclass.  */
-  struct abstract_po_reader_class_ty super;
+  struct abstract_catalog_reader_class_ty super;
 
   /* How to change the current domain.  */
-  void (*set_domain) (struct default_po_reader_ty *pop, char *name);
+  void (*set_domain) (struct default_catalog_reader_ty *pop, char *name);
 
   /* How to add a message to the list.  */
-  void (*add_message) (struct default_po_reader_ty *pop,
+  void (*add_message) (struct default_catalog_reader_ty *pop,
                       char *msgctxt,
                       char *msgid, lex_pos_ty *msgid_pos, char *msgid_plural,
                       char *msgstr, size_t msgstr_len, lex_pos_ty *msgstr_pos,
@@ -65,14 +65,15 @@ struct default_po_reader_class_ty
                       bool force_fuzzy, bool obsolete);
 
   /* How to modify a new message before adding it to the list.  */
-  void (*frob_new_message) (struct default_po_reader_ty *pop, message_ty *mp,
+  void (*frob_new_message) (struct default_catalog_reader_ty *pop,
+                           message_ty *mp,
                            const lex_pos_ty *msgid_pos,
                            const lex_pos_ty *msgstr_pos);
 };
 
 
-#define DEFAULT_PO_READER_TY \
-  ABSTRACT_PO_READER_TY                                                        \
+#define DEFAULT_CATALOG_READER_TY \
+  ABSTRACT_CATALOG_READER_TY                                           \
                                                                        \
   /* If true, pay attention to comments and filepos comments.  */      \
   bool handle_comments;                                                        \
@@ -114,18 +115,19 @@ struct default_po_reader_class_ty
   enum is_format is_format[NFORMATS];                                  \
   enum is_wrap do_wrap;                                                        \
 
-typedef struct default_po_reader_ty default_po_reader_ty;
-struct default_po_reader_ty
+typedef struct default_catalog_reader_ty default_catalog_reader_ty;
+struct default_catalog_reader_ty
 {
-  DEFAULT_PO_READER_TY
+  DEFAULT_CATALOG_READER_TY
 };
 
-extern void default_constructor (abstract_po_reader_ty *that);
-extern void default_destructor (abstract_po_reader_ty *that);
-extern void default_parse_brief (abstract_po_reader_ty *that);
-extern void default_parse_debrief (abstract_po_reader_ty *that);
-extern void default_directive_domain (abstract_po_reader_ty *that, char *name);
-extern void default_directive_message (abstract_po_reader_ty *that,
+extern void default_constructor (abstract_catalog_reader_ty *that);
+extern void default_destructor (abstract_catalog_reader_ty *that);
+extern void default_parse_brief (abstract_catalog_reader_ty *that);
+extern void default_parse_debrief (abstract_catalog_reader_ty *that);
+extern void default_directive_domain (abstract_catalog_reader_ty *that,
+                                     char *name);
+extern void default_directive_message (abstract_catalog_reader_ty *that,
                                       char *msgctxt,
                                       char *msgid,
                                       lex_pos_ty *msgid_pos,
@@ -136,14 +138,15 @@ extern void default_directive_message (abstract_po_reader_ty *that,
                                       char *prev_msgid,
                                       char *prev_msgid_plural,
                                       bool force_fuzzy, bool obsolete);
-extern void default_comment (abstract_po_reader_ty *that, const char *s);
-extern void default_comment_dot (abstract_po_reader_ty *that, const char *s);
-extern void default_comment_filepos (abstract_po_reader_ty *that,
+extern void default_comment (abstract_catalog_reader_ty *that, const char *s);
+extern void default_comment_dot (abstract_catalog_reader_ty *that,
+                                const char *s);
+extern void default_comment_filepos (abstract_catalog_reader_ty *that,
                                     const char *name, size_t line);
-extern void default_comment_special (abstract_po_reader_ty *that,
+extern void default_comment_special (abstract_catalog_reader_ty *that,
                                     const char *s);
-extern void default_set_domain (default_po_reader_ty *this, char *name);
-extern void default_add_message (default_po_reader_ty *this,
+extern void default_set_domain (default_catalog_reader_ty *this, char *name);
+extern void default_add_message (default_catalog_reader_ty *this,
                                 char *msgctxt,
                                 char *msgid,
                                 lex_pos_ty *msgid_pos,
@@ -155,10 +158,10 @@ extern void default_add_message (default_po_reader_ty *this,
                                 char *prev_msgid_plural,
                                 bool force_fuzzy, bool obsolete);
 
-/* Allocate a fresh default_po_reader_ty (or derived class) instance and
+/* Allocate a fresh default_catalog_reader_ty (or derived class) instance and
    call its constructor.  */
-extern default_po_reader_ty *
-       default_po_reader_alloc (default_po_reader_class_ty *method_table);
+extern default_catalog_reader_ty *
+       default_catalog_reader_alloc (default_catalog_reader_class_ty *method_table);
 
 
 /* If nonzero, remember comments for file name and line number for each
@@ -174,14 +177,15 @@ extern DLL_VARIABLE bool allow_duplicates;
 extern DLL_VARIABLE input_syntax_ty input_syntax;
 
 /* Read the input file from a stream.  Returns a list of messages.  */
-extern msgdomain_list_ty *read_po (FILE *fp, const char *real_filename,
-                                  const char *logical_filename);
+extern msgdomain_list_ty *read_catalog_stream (FILE *fp,
+                                              const char *real_filename,
+                                              const char *logical_filename);
 
 /* Read the input file with the name INPUT_NAME.  The ending .po is added
    if necessary.  If INPUT_NAME is not an absolute file name and the file is
    not found, the list of directories in "dir-list.h" is searched.  Returns
    a list of messages.  */
-extern msgdomain_list_ty *read_po_file (const char *input_name);
+extern msgdomain_list_ty *read_catalog_file (const char *input_name);
 
 
 #ifdef __cplusplus
@@ -189,4 +193,4 @@ extern msgdomain_list_ty *read_po_file (const char *input_name);
 #endif
 
 
-#endif /* _READ_PO_H */
+#endif /* _READ_CATALOG_H */
index 8164440fed1456aea1ba2eab63d1f0bd85fc04c9..4968d7476c1085d45ed5de261fdc73f25821aed8 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading C# satellite assemblies.
-   Copyright (C) 2003-2004 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@
 #include "csharpexec.h"
 #include "pipe.h"
 #include "wait-process.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "xalloc.h"
 #include "pathname.h"
 #include "error.h"
@@ -73,7 +73,7 @@ execute_and_read_po_output (const char *progname,
     error (EXIT_FAILURE, errno, _("fdopen() failed"));
 
   /* Read the message list.  */
-  l->mdlp = read_po (fp, "(pipe)", "(pipe)");
+  l->mdlp = read_catalog_stream (fp, "(pipe)", "(pipe)");
 
   fclose (fp);
 
index ca3a4687cf17a8462ea9bac29c11a1af239b8374..1f7331c3d524730b2e904fe156ad64500cfca0a8 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading Java ResourceBundles.
-   Copyright (C) 2001-2003 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@
 #include "javaexec.h"
 #include "pipe.h"
 #include "wait-process.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "error.h"
 #include "exit.h"
 #include "gettext.h"
@@ -71,7 +71,7 @@ execute_and_read_po_output (const char *progname,
     error (EXIT_FAILURE, errno, _("fdopen() failed"));
 
   /* Read the message list.  */
-  l->mdlp = read_po (fp, "(pipe)", "(pipe)");
+  l->mdlp = read_catalog_stream (fp, "(pipe)", "(pipe)");
 
   fclose (fp);
 
index 755627551dc6d57f946454f709479381f0b9b371..e880f5a847dc7dd48ff755b6cc7cbe101c02e57a 100644 (file)
@@ -33,7 +33,7 @@
 #include "error.h"
 #include "error-progname.h"
 #include "message.h"
-#include "read-po-abstract.h"
+#include "read-catalog-abstract.h"
 #include "xalloc.h"
 #include "xvasprintf.h"
 #include "po-xerror.h"
@@ -444,9 +444,9 @@ read_escaped_string (bool in_key)
 
 
 /* Read a .properties file from a stream, and dispatch to the various
-   abstract_po_reader_class_ty methods.  */
+   abstract_catalog_reader_class_ty methods.  */
 void
-properties_parse (abstract_po_reader_ty *this, FILE *file,
+properties_parse (abstract_catalog_reader_ty *this, FILE *file,
                  const char *real_filename, const char *logical_filename)
 {
   fp = file;
index d5b7987a5a4e63763cb79001b61988d21d610c46..847bdab39462a09108a6253ec505e12d81118c86 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading Java .properties files.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
 #ifndef _READ_PROPERTIES_H
 #define _READ_PROPERTIES_H
 
-#include "read-po-abstract.h"
+#include "read-catalog-abstract.h"
 
 /* Read a .properties file from a stream, and dispatch to the various
-   abstract_po_reader_class_ty methods.  */
-extern void properties_parse (abstract_po_reader_ty *pop, FILE *fp,
+   abstract_catalog_reader_class_ty methods.  */
+extern void properties_parse (abstract_catalog_reader_ty *pop, FILE *fp,
                              const char *real_filename,
                              const char *logical_filename);
 
index 7393191fc44e08c04a53c9a65ccc7c59ede1d3fc..fadae7aaad16172d0a509ebafa63dcc7c466001c 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading C# .resources files.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@
 #include "csharpexec.h"
 #include "pipe.h"
 #include "wait-process.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "message.h"
 #include "pathname.h"
 #include "error.h"
@@ -74,7 +74,7 @@ execute_and_read_po_output (const char *progname,
     error (EXIT_FAILURE, errno, _("fdopen() failed"));
 
   /* Read the message list.  */
-  l->mdlp = read_po (fp, "(pipe)", "(pipe)");
+  l->mdlp = read_catalog_stream (fp, "(pipe)", "(pipe)");
 
   fclose (fp);
 
index 1228f3c7f3c99764a7b0470d80a9585388082c31..135cb18236a9f47693cf578b9ac3401f30d9ad4f 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "error.h"
 #include "error-progname.h"
-#include "read-po-abstract.h"
+#include "read-catalog-abstract.h"
 #include "xalloc.h"
 #include "xvasprintf.h"
 #include "po-xerror.h"
@@ -826,9 +826,9 @@ read_string (lex_pos_ty *pos)
 
 
 /* Read a .strings file from a stream, and dispatch to the various
-   abstract_po_reader_class_ty methods.  */
+   abstract_catalog_reader_class_ty methods.  */
 void
-stringtable_parse (abstract_po_reader_ty *pop, FILE *file,
+stringtable_parse (abstract_catalog_reader_ty *pop, FILE *file,
                   const char *real_filename, const char *logical_filename)
 {
   fp = file;
index ccf83b637540b8c3baf97ce390e9597ef7a59a9e..2c95444ffd29d881bb4e0a3f7caff06decba71ed 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading NeXTstep/GNUstep .strings files.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
 #ifndef _READ_STRINGTABLE_H
 #define _READ_STRINGTABLE_H
 
-#include "read-po-abstract.h"
+#include "read-catalog-abstract.h"
 
 /* Read a .strings file from a stream, and dispatch to the various
-   abstract_po_reader_class_ty methods.  */
-extern void stringtable_parse (abstract_po_reader_ty *pop, FILE *fp,
+   abstract_catalog_reader_class_ty methods.  */
+extern void stringtable_parse (abstract_catalog_reader_ty *pop, FILE *fp,
                               const char *real_filename,
                               const char *logical_filename);
 
index f101570b7f0d00127eb949a7498a5500cab3bcea..d1e70dee4cf13da95c399393853f1bdf231f604b 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading tcl/msgcat .msg files.
-   Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
    This program is free software; you can redistribute it and/or modify
@@ -34,7 +34,7 @@
 #include "sh-quote.h"
 #include "pipe.h"
 #include "wait-process.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "xallocsa.h"
 #include "error.h"
 #include "exit.h"
@@ -111,7 +111,7 @@ msgdomain_read_tcl (const char *locale_name, const char *directory)
     error (EXIT_FAILURE, errno, _("fdopen() failed"));
 
   /* Read the message list.  */
-  mdlp = read_po (fp, "(pipe)", "(pipe)");
+  mdlp = read_catalog_stream (fp, "(pipe)", "(pipe)");
 
   fclose (fp);
 
index 5db3af3f5caab70aad08b8398960f86a1f1065b4..c4e6eabf69727fdb05f1d2fc0cf65d760d219288 100644 (file)
@@ -32,7 +32,7 @@
 #include "x-properties.h"
 #include "x-stringtable.h"
 #include "xalloc.h"
-#include "read-po.h"
+#include "read-catalog.h"
 #include "po-lex.h"
 #include "gettext.h"
 
 /* The charset found in the header entry.  */
 static char *header_charset;
 
-/* Define a subclass extract_po_reader_ty of default_po_reader_ty.  */
+/* Define a subclass extract_catalog_reader_ty of default_catalog_reader_ty.  */
 
 static void
-extract_add_message (default_po_reader_ty *this,
+extract_add_message (default_catalog_reader_ty *this,
                     char *msgctxt,
                     char *msgid,
                     lex_pos_ty *msgid_pos,
@@ -116,10 +116,10 @@ extract_add_message (default_po_reader_ty *this,
    and all actions resulting from the parse will be through
    invocations of method functions of that object.  */
 
-static default_po_reader_class_ty extract_methods =
+static default_catalog_reader_class_ty extract_methods =
 {
   {
-    sizeof (default_po_reader_ty),
+    sizeof (default_catalog_reader_ty),
     default_constructor,
     default_destructor,
     default_parse_brief,
@@ -143,11 +143,11 @@ extract (FILE *fp,
         input_syntax_ty syntax,
         msgdomain_list_ty *mdlp)
 {
-  default_po_reader_ty *pop;
+  default_catalog_reader_ty *pop;
 
   header_charset = NULL;
 
-  pop = default_po_reader_alloc (&extract_methods);
+  pop = default_catalog_reader_alloc (&extract_methods);
   pop->handle_comments = true;
   pop->handle_filepos_comments = (line_comment != 0);
   pop->allow_domain_directives = false;
@@ -155,9 +155,9 @@ extract (FILE *fp,
   pop->allow_duplicates_if_same_msgstr = true;
   pop->mdlp = NULL;
   pop->mlp = mdlp->item[0]->messages;
-  po_scan ((abstract_po_reader_ty *) pop, fp, real_filename, logical_filename,
-          syntax);
-  po_reader_free ((abstract_po_reader_ty *) pop);
+  catalog_reader_parse ((abstract_catalog_reader_ty *) pop, fp, real_filename,
+                       logical_filename, syntax);
+  catalog_reader_free ((abstract_catalog_reader_ty *) pop);
 
   if (header_charset != NULL)
     {
index ac0a46f3300fbdbe87415284df5f272a09bd793c..dbcfcf593090298befec6eea09192cef615f0744 100644 (file)
@@ -51,8 +51,8 @@
 #include "exit.h"
 #include "pathname.h"
 #include "c-strcase.h"
-#include "open-po.h"
-#include "read-po-abstract.h"
+#include "open-catalog.h"
+#include "read-catalog-abstract.h"
 #include "message.h"
 #include "po-charset.h"
 #include "msgl-iconv.h"
@@ -900,7 +900,7 @@ Informative output:\n"));
 
 
 static void
-exclude_directive_domain (abstract_po_reader_ty *pop, char *name)
+exclude_directive_domain (abstract_catalog_reader_ty *pop, char *name)
 {
   po_gram_error_at_line (&gram_pos,
                         _("this file may not contain domain directives"));
@@ -908,7 +908,7 @@ exclude_directive_domain (abstract_po_reader_ty *pop, char *name)
 
 
 static void
-exclude_directive_message (abstract_po_reader_ty *pop,
+exclude_directive_message (abstract_catalog_reader_ty *pop,
                           char *msgctxt,
                           char *msgid,
                           lex_pos_ty *msgid_pos,
@@ -947,9 +947,9 @@ exclude_directive_message (abstract_po_reader_ty *pop,
    and all actions resulting from the parse will be through
    invocations of method functions of that object.  */
 
-static abstract_po_reader_class_ty exclude_methods =
+static abstract_catalog_reader_class_ty exclude_methods =
 {
-  sizeof (abstract_po_reader_ty),
+  sizeof (abstract_catalog_reader_ty),
   NULL, /* constructor */
   NULL, /* destructor */
   NULL, /* parse_brief */
@@ -967,12 +967,12 @@ static void
 read_exclusion_file (char *filename)
 {
   char *real_filename;
-  FILE *fp = open_po_file (filename, &real_filename, true);
-  abstract_po_reader_ty *pop;
+  FILE *fp = open_catalog_file (filename, &real_filename, true);
+  abstract_catalog_reader_ty *pop;
 
-  pop = po_reader_alloc (&exclude_methods);
-  po_scan (pop, fp, real_filename, filename, input_syntax);
-  po_reader_free (pop);
+  pop = catalog_reader_alloc (&exclude_methods);
+  catalog_reader_parse (pop, fp, real_filename, filename, input_syntax);
+  catalog_reader_free (pop);
 
   if (fp != stdin)
     fclose (fp);
index f95b70881c567c3232682f455430b0f4addc0f49..3ef721d04ec843ce478bbafde80e63da47db8874 100644 (file)
@@ -33,7 +33,7 @@
 #include "str-list.h"
 
 /* Declare 'line_comment' and 'input_syntax'.  */
-#include "read-po.h"
+#include "read-catalog.h"
 
 
 #ifdef __cplusplus