From: Bruno Haible Date: Fri, 2 Aug 2024 02:40:40 +0000 (+0200) Subject: Rename some files. X-Git-Tag: v0.23~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f65721313ed5bbdce2a1dae235feaf982ad9b5b;p=thirdparty%2Fgettext.git Rename some files. * gettext-tools/src/read-po-internal.h: Renamed from gettext-tools/src/po-gram.h. * gettext-tools/src/read-po-lex.h: Renamed from gettext-tools/src/po-lex.h. * gettext-tools/src/read-po-lex.c: Renamed from gettext-tools/src/po-lex.c. * gettext-tools/src/read-po-gram.y: Renamed from gettext-tools/src/po-gram-gen.y. * gettext-tools/src/*.h: Update. * gettext-tools/src/*.c: Update. * gettext-tools/src/FILES: Update. * gettext-tools/src/Makefile.am: Update. * gettext-tools/libgettextpo/Makefile.am: Update. --- diff --git a/Admin/coverage.txt b/Admin/coverage.txt index db2b8edd4..32956c2f1 100644 --- a/Admin/coverage.txt +++ b/Admin/coverage.txt @@ -16,7 +16,7 @@ https://linux.die.net/man/1/lcov $ ./configure CC="gcc --coverage" CPPFLAGS=-Wall Why in the source directory? Because in a VPATH build, there are more files that create trouble in - steps 4 and 5 (po-gram-gen.[yc], cldr-plurals.[yc], and more). + steps 4 and 5 (read-po-gram.[yc], cldr-plurals.[yc], and more). 2. Compile: $ make diff --git a/Admin/plans b/Admin/plans index f1e7c82c1..dc6df56c3 100644 --- a/Admin/plans +++ b/Admin/plans @@ -44,7 +44,7 @@ Things we plan to do. Comments welcome. - where to look for i18n files, - which file types are to be considered by i18n, - which files are explicitly not i18n (e.g. generated files like - src/po-gram-gen.c) + src/read-po-gram.c) - Generating sr@latin PO file automatically from sr.po. diff --git a/gettext-tools/libgettextpo/Makefile.am b/gettext-tools/libgettextpo/Makefile.am index c9248361b..41f55b1b4 100644 --- a/gettext-tools/libgettextpo/Makefile.am +++ b/gettext-tools/libgettextpo/Makefile.am @@ -62,12 +62,12 @@ libgettextpo_la_AUXSOURCES = \ ../src/write-catalog.c \ ../src/write-po.c \ ../src/po-charset.c \ - ../src/po-lex.c \ - ../src/po-gram-gen.c \ ../src/read-catalog-special.c \ ../src/read-catalog-abstract.c \ ../src/read-catalog.c \ ../src/read-po.c \ + ../src/read-po-lex.c \ + ../src/read-po-gram.c \ ../src/plural-table.c \ ../src/format-c.c \ ../src/format-c++-brace.c \ diff --git a/gettext-tools/libgettextpo/gettext-po.c b/gettext-tools/libgettextpo/gettext-po.c index 397088006..2b58f6509 100644 --- a/gettext-tools/libgettextpo/gettext-po.c +++ b/gettext-tools/libgettextpo/gettext-po.c @@ -48,7 +48,7 @@ static void (*orig_error_at_line) (int status, int errnum, #include "xalloc.h" #include "read-catalog.h" #include "read-po.h" -#include "po-lex.h" +#include "read-po-lex.h" #include "write-catalog.h" #include "write-po.h" #include "xerror.h" diff --git a/gettext-tools/po/POTFILES.in b/gettext-tools/po/POTFILES.in index 3cf95463c..92a037c52 100644 --- a/gettext-tools/po/POTFILES.in +++ b/gettext-tools/po/POTFILES.in @@ -1,5 +1,5 @@ # List of files which contain translatable strings. -# Copyright (C) 1995-2023 Free Software Foundation, Inc. +# Copyright (C) 1995-2024 Free Software Foundation, Inc. # This file is free software, distributed under GNU GPL v3+. # For updating this file, look at the result of: @@ -90,14 +90,14 @@ src/msgunfmt.c src/msguniq.c src/open-catalog.c src/po-charset.c -src/po-gram-gen.y -src/po-lex.c src/po-xerror.c src/read-catalog.c src/read-csharp.c src/read-desktop.c src/read-java.c src/read-mo.c +src/read-po-gram.y +src/read-po-lex.c src/read-properties.c src/read-resources.c src/read-stringtable.c diff --git a/gettext-tools/src/FILES b/gettext-tools/src/FILES index 1f69ba9d0..fb5d38f28 100644 --- a/gettext-tools/src/FILES +++ b/gettext-tools/src/FILES @@ -75,17 +75,15 @@ po-xerror.c | po-charset.c | Charset handling while reading PO files. | -| po-lex.h -| po-lex.c -| Lexical analysis of PO files. -| | read-catalog-special.h | read-catalog-special.c | Parsing of special comments (#, comments). | | read-catalog-abstract.h -| po-gram.h -| po-gram-gen.y +| read-po-internal.h +| read-po-lex.h +| read-po-lex.c +| read-po-gram.y | read-po.h | read-po.c | read-properties.h @@ -97,9 +95,12 @@ po-xerror.c | .strings files. | read-catalog-abstract.h | General parser structure. -| po-gram.h -| po-gram-gen.y -| Parsing of PO files, based on po-lex.{h,c}. +| read-po-internal.h +| read-po-lex.h +| read-po-lex.c +| Lexical analysis of PO files. +| read-po-gram.y +| Parsing of PO files, based on read-po-lex.{h,c}. | read-po.h | read-po.c | Parsing of PO files. diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index a2debde31..5c31e489c 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -42,13 +42,13 @@ noinst_LTLIBRARIES = libgettextsrc.la endif noinst_HEADERS = \ - pos.h message.h po-error.h po-xerror.h po-gram.h po-charset.h \ - po-lex.h open-catalog.h read-catalog-special.h \ + pos.h message.h po-error.h po-xerror.h read-po-internal.h po-charset.h \ + read-po-lex.h open-catalog.h read-catalog-special.h \ read-catalog-abstract.h read-catalog.h read-catalog-file.h \ read-po.h read-properties.h read-stringtable.h \ str-list.h \ write-catalog.h write-po.h write-properties.h write-stringtable.h \ - dir-list.h file-list.h po-gram-gen.h cldr-plural.h \ + dir-list.h file-list.h read-po-gram.h cldr-plural.h \ cldr-plural-exp.h locating-rule.h its.h search-path.h \ msgl-charset.h msgl-equal.h msgl-iconv.h msgl-ascii.h msgl-ofn.h msgl-cat.h \ msgl-header.h msgl-english.h msgl-check.h msgl-fsearch.h msgfmt.h msgunfmt.h \ @@ -138,12 +138,12 @@ CSHARPCOMPFLAGS = @CSHARPCOMPFLAGS@ # All programs must read PO files. (msgunfmt also, for read-java.c, # read-csharp.c and read-resources.c.) # message.c -> str-list.c. -# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> str-list.c. -# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> po-charset.c. -# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> message.c -> str-list.c. +# (read-catalog-abstract.c <--> read-po-gram.y <--> read-po-lex.c) -> str-list.c. +# (read-catalog-abstract.c <--> read-po-gram.y <--> read-po-lex.c) -> po-charset.c. +# (read-catalog-abstract.c <--> read-po-gram.y <--> read-po-lex.c) -> message.c -> str-list.c. # read-catalog-file.c -> open-catalog.c -> dir-list.c -> str-list.c. COMMON_SOURCE = message.c pos.c po-error.c po-xerror.c \ -read-catalog-abstract.c po-lex.c po-gram-gen.y po-charset.c \ +read-catalog-abstract.c read-po-lex.c read-po-gram.y po-charset.c \ read-po.c read-properties.c read-stringtable.c open-catalog.c \ dir-list.c str-list.c @@ -340,8 +340,8 @@ endif # taken from libunistring, when the configure option --with-libunistring-prefix # was given. # Need @LTLIBINTL@ because many source files use gettext(). -# Need @LTLIBICONV@ because po-charset.c, po-lex.c, msgl-iconv.c, write-po.c -# use iconv(). +# Need @LTLIBICONV@ because po-charset.c, read-po-lex.c, msgl-iconv.c, +# write-po.c use iconv(). libgettextsrc_la_LDFLAGS = \ -release @VERSION@ \ ../gnulib-lib/libgettextlib.la $(LTLIBUNISTRING) $(LT_LIBTEXTSTYLE) @LTLIBINTL@ @LTLIBICONV@ -lc -no-undefined @@ -577,24 +577,24 @@ endif # postprocess the generated files and we don't want that unpostprocessed files # remain in place if the user interrupts the build through Ctrl-C. -po-gram-gen.c po-gram-gen.h: po-gram-gen.y - $(AM_V_YACC)$(BISON) -d $(YFLAGS) $(AM_YFLAGS) $(srcdir)/po-gram-gen.y \ +read-po-gram.c read-po-gram.h: read-po-gram.y + $(AM_V_YACC)$(BISON) -d $(YFLAGS) $(AM_YFLAGS) $(srcdir)/read-po-gram.y \ && test ':' = '$(BISON)' || { \ - sed -e 's|".*/po-gram-gen\.y"|"po-gram-gen.y"|' \ - -e 's|"po-gram-gen\.tab\.c"|"po-gram-gen.c"|' \ - -e 's|"po-gram-gen\.tab\.h"|"po-gram-gen.h"|' \ - < po-gram-gen.tab.c > po-gram-gen.c-tmp \ - && sed -e 's|".*/po-gram-gen\.y"|"po-gram-gen.y"|' \ - -e 's|"po-gram-gen\.tab\.h"|"po-gram-gen.h"|' \ - < po-gram-gen.tab.h > po-gram-gen.h-tmp \ - && rm -f po-gram-gen.tab.c po-gram-gen.tab.h \ - && mv po-gram-gen.c-tmp $(srcdir)/po-gram-gen.c \ - && mv po-gram-gen.h-tmp $(srcdir)/po-gram-gen.h; \ + sed -e 's|".*/read-po-gram\.y"|"read-po-gram.y"|' \ + -e 's|"read-po-gram\.tab\.c"|"read-po-gram.c"|' \ + -e 's|"read-po-gram\.tab\.h"|"read-po-gram.h"|' \ + < read-po-gram.tab.c > read-po-gram.c-tmp \ + && sed -e 's|".*/read-po-gram\.y"|"read-po-gram.y"|' \ + -e 's|"read-po-gram\.tab\.h"|"read-po-gram.h"|' \ + < read-po-gram.tab.h > read-po-gram.h-tmp \ + && rm -f read-po-gram.tab.c read-po-gram.tab.h \ + && mv read-po-gram.c-tmp $(srcdir)/read-po-gram.c \ + && mv read-po-gram.h-tmp $(srcdir)/read-po-gram.h; \ } -BUILT_SOURCES += po-gram-gen.c po-gram-gen.h -MOSTLYCLEANFILES += po-gram-gen.tab.c po-gram-gen.tab.h po-gram-gen.c-tmp po-gram-gen.h-tmp -MAINTAINERCLEANFILES += po-gram-gen.c po-gram-gen.h -EXTRA_DIST += po-gram-gen.c po-gram-gen.h +BUILT_SOURCES += read-po-gram.c read-po-gram.h +MOSTLYCLEANFILES += read-po-gram.tab.c read-po-gram.tab.h read-po-gram.c-tmp read-po-gram.h-tmp +MAINTAINERCLEANFILES += read-po-gram.c read-po-gram.h +EXTRA_DIST += read-po-gram.c read-po-gram.h cldr-plural.c cldr-plural.h: cldr-plural.y @@ -764,7 +764,7 @@ endif # This Makefile contains rules which don't work with parallel make, -# namely those which build textstyle.h, po-gram-gen.c, cldr-plural.c. +# namely those which build textstyle.h, read-po-gram.c, cldr-plural.c. # See . # So, turn off parallel execution in this Makefile. .NOTPARALLEL: diff --git a/gettext-tools/src/msgcmp.c b/gettext-tools/src/msgcmp.c index ac5660894..731178fef 100644 --- a/gettext-tools/src/msgcmp.c +++ b/gettext-tools/src/msgcmp.c @@ -37,7 +37,7 @@ #include "message.h" #include "read-catalog-file.h" #include "read-po.h" -#include "po-lex.h" +#include "read-po-lex.h" #include "read-properties.h" #include "read-stringtable.h" #include "xmalloca.h" diff --git a/gettext-tools/src/msgfmt.c b/gettext-tools/src/msgfmt.c index a6ab145fc..7e6cbb345 100644 --- a/gettext-tools/src/msgfmt.c +++ b/gettext-tools/src/msgfmt.c @@ -56,7 +56,7 @@ #include "open-catalog.h" #include "read-catalog-file.h" #include "read-po.h" -#include "po-lex.h" +#include "read-po-lex.h" #include "read-properties.h" #include "read-stringtable.h" #include "read-desktop.h" @@ -1239,7 +1239,7 @@ msgfmt_set_domain (default_catalog_reader_ty *dcatr, po_gram_error_at_line (name_pos, _("'domain %s' directive ignored"), name); - /* NAME was allocated in po-gram-gen.y but is not used anywhere. */ + /* NAME was allocated in read-po-gram.y but is not used anywhere. */ free (name); } } diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c index 6349a7a32..fb09b265f 100644 --- a/gettext-tools/src/msgmerge.c +++ b/gettext-tools/src/msgmerge.c @@ -44,7 +44,7 @@ #include "message.h" #include "read-catalog-file.h" #include "read-po.h" -#include "po-lex.h" +#include "read-po-lex.h" #include "read-properties.h" #include "read-stringtable.h" #include "write-catalog.h" diff --git a/gettext-tools/src/read-catalog-abstract.c b/gettext-tools/src/read-catalog-abstract.c index 31c31afa4..05706d39e 100644 --- a/gettext-tools/src/read-catalog-abstract.c +++ b/gettext-tools/src/read-catalog-abstract.c @@ -173,7 +173,7 @@ catalog_reader_parse (abstract_catalog_reader_ty *catr, FILE *fp, /* ========================================================================= */ -/* Callbacks used by po-gram-gen.y, read-properties.c, read-stringtable.c, +/* Callbacks used by read-po-gram.y, read-properties.c, read-stringtable.c, indirectly from catalog_reader_parse. */ diff --git a/gettext-tools/src/read-catalog-abstract.h b/gettext-tools/src/read-catalog-abstract.h index 197bbe666..65e0d895e 100644 --- a/gettext-tools/src/read-catalog-abstract.h +++ b/gettext-tools/src/read-catalog-abstract.h @@ -184,7 +184,7 @@ extern void catalog_reader_free (abstract_catalog_reader_ty *catr); -/* Callbacks used by po-gram-gen.y, read-properties.c, read-stringtable.c, +/* Callbacks used by read-po-gram.y, read-properties.c, read-stringtable.c, indirectly from catalog_reader_parse. */ /* This callback is called whenever a domain directive has been seen. It invokes the 'directive_domain' method. */ diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c index 263f83544..7b373aae7 100644 --- a/gettext-tools/src/read-catalog.c +++ b/gettext-tools/src/read-catalog.c @@ -27,7 +27,7 @@ #include #include "po-charset.h" -#include "po-lex.h" +#include "read-po-lex.h" #include "po-xerror.h" #include "xalloc.h" #include "read-catalog-special.h" @@ -327,7 +327,7 @@ default_set_domain (default_catalog_reader_ty *dcatr, po_gram_error_at_line (name_pos, _("this file may not contain domain directives")); - /* NAME was allocated in po-gram-gen.y but is not used anywhere. */ + /* NAME was allocated in read-po-gram.y but is not used anywhere. */ free (name); } } @@ -375,7 +375,7 @@ default_add_message (default_catalog_reader_ty *dcatr, _("this is the location of the first definition")); } /* We don't need the just constructed entries' parameter string - (allocated in po-gram-gen.y). */ + (allocated in read-po-gram.y). */ free (msgid); if (msgid_plural != NULL) free (msgid_plural); diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/read-po-gram.y similarity index 99% rename from gettext-tools/src/po-gram-gen.y rename to gettext-tools/src/read-po-gram.y index baafc1650..33ca25174 100644 --- a/gettext-tools/src/po-gram-gen.y +++ b/gettext-tools/src/read-po-gram.y @@ -22,7 +22,7 @@ #endif /* Specification. */ -#include "po-gram.h" +#include "read-po-internal.h" #include #include @@ -31,7 +31,7 @@ #include #include "str-list.h" -#include "po-lex.h" +#include "read-po-lex.h" #include "po-charset.h" #include "xalloc.h" #include "gettext.h" diff --git a/gettext-tools/src/po-gram.h b/gettext-tools/src/read-po-internal.h similarity index 96% rename from gettext-tools/src/po-gram.h rename to gettext-tools/src/read-po-internal.h index 4a2932819..a04b9f33e 100644 --- a/gettext-tools/src/po-gram.h +++ b/gettext-tools/src/read-po-internal.h @@ -88,7 +88,7 @@ struct po_parser_state /* ----- Output variables ----- */ - /* ----- Local variables of po-lex.c ----- */ + /* ----- Local variables of read-po-lex.c ----- */ /* The PO file's encoding, as specified in the header entry. */ const char *po_lex_charset; @@ -117,7 +117,7 @@ struct po_parser_state bool po_lex_obsolete; bool po_lex_previous; - /* ----- Local variables of po-gram-gen.y ----- */ + /* ----- Local variables of read-po-gram.y ----- */ long plural_counter; }; diff --git a/gettext-tools/src/po-lex.c b/gettext-tools/src/read-po-lex.c similarity index 99% rename from gettext-tools/src/po-lex.c rename to gettext-tools/src/read-po-lex.c index f46f3ac69..e074d7446 100644 --- a/gettext-tools/src/po-lex.c +++ b/gettext-tools/src/read-po-lex.c @@ -23,7 +23,7 @@ #endif /* Specification. */ -#include "po-lex.h" +#include "read-po-lex.h" #include #include @@ -56,8 +56,8 @@ #include "pos.h" #include "message.h" #include "str-list.h" -#include "po-gram.h" -#include "po-gram-gen.h" +#include "read-po-internal.h" +#include "read-po-gram.h" #define _(str) gettext(str) @@ -1071,7 +1071,7 @@ control_sequence (struct po_parser_state *ps) /* Return the next token in the PO file. The return codes are defined - in "po-gram-gen2.h". Associated data is put in 'po_gram_lval'. */ + in "read-po-gram.h". Associated data is put in 'po_gram_lval'. */ int po_gram_lex (union PO_GRAM_STYPE *lval, struct po_parser_state *ps) { diff --git a/gettext-tools/src/po-lex.h b/gettext-tools/src/read-po-lex.h similarity index 96% rename from gettext-tools/src/po-lex.h rename to gettext-tools/src/read-po-lex.h index 62f481714..396312543 100644 --- a/gettext-tools/src/po-lex.h +++ b/gettext-tools/src/read-po-lex.h @@ -52,7 +52,7 @@ extern "C" { struct po_parser_state; -/* Global variables from po-lex.c. */ +/* Global variables from read-po-lex.c. */ /* Number of parse errors within a PO file that cause the program to terminate. Cf. error_message_count, declared in . */ @@ -68,7 +68,7 @@ extern void lex_start (struct po_parser_state *ps, extern void lex_end (struct po_parser_state *ps); /* Return the next token in the PO file. The return codes are defined - in "po-gram-gen.h". Associated data is put in '*lval'. */ + in "read-po-gram.h". Associated data is put in '*lval'. */ union PO_GRAM_STYPE; extern int po_gram_lex (union PO_GRAM_STYPE *lval, struct po_parser_state *ps); diff --git a/gettext-tools/src/read-po.c b/gettext-tools/src/read-po.c index 7b28953e0..3b4cd1b5b 100644 --- a/gettext-tools/src/read-po.c +++ b/gettext-tools/src/read-po.c @@ -21,8 +21,8 @@ /* Specification. */ #include "read-po.h" -#include "po-lex.h" -#include "po-gram.h" +#include "read-po-lex.h" +#include "read-po-internal.h" /* Read a .po / .pot file from a stream, and dispatch to the various diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 0c28dcd6d..fdcb85cc4 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -69,7 +69,7 @@ #include "open-catalog.h" #include "read-catalog-abstract.h" #include "read-po.h" -#include "po-lex.h" +#include "read-po-lex.h" #include "message.h" #include "pos.h" #include "po-charset.h"