]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
5 years agodoc: Add Header Entry API
Miguel Ángel Arruga Vivas [Mon, 6 May 2019 14:27:09 +0000 (16:27 +0200)] 
doc: Add Header Entry API

* gettext-tools/doc/gettext.texi (PO Header Entry API): New
subsection.  Add po_file_domain_header, po_header_field and
po_header_set_field documentation.
(libgettextpo): Add subsection to the menu.

5 years agodoc: Update po_message_t API (III)
Miguel Ángel Arruga Vivas [Mon, 6 May 2019 14:19:26 +0000 (16:19 +0200)] 
doc: Update po_message_t API (III)

* gettext-tools/doc/gettext.texi (po_message_t API): Add
po_message_set_msgctxt, po_message_set_msgid,
po_message_set_msgid_plural, po_message_set_msgstr,
po_message_set_msgstr_plural, po_message_set_comments, and
po_message_set_extracted_comments documentation.

5 years agodoc: Update po_message_t API (II)
Miguel Ángel Arruga Vivas [Mon, 6 May 2019 14:15:36 +0000 (16:15 +0200)] 
doc: Update po_message_t API (II)

* gettext-tools/doc/gettext.texi (po_message_t API): Add
po_message_msgctxt, po_message_comments, and
po_message_extracted_comments documentation.

5 years agodoc: Update po_message_t API (I)
Miguel Ángel Arruga Vivas [Mon, 6 May 2019 14:05:40 +0000 (16:05 +0200)] 
doc: Update po_message_t API (I)

* gettext-tools/doc/gettext.texi (po_message_t API): Add
po_message_create documentation.

5 years agodoc: Update libgettextpo example
Miguel Ángel Arruga Vivas [Mon, 6 May 2019 12:37:32 +0000 (14:37 +0200)] 
doc: Update libgettextpo example

* gettext-tools/doc/gettext.texi (libgettextpo): Update example to the
latest API.

5 years agodoc: Move libgettextpo example to the front subsection.
Miguel Ángel Arruga Vivas [Mon, 6 May 2019 11:34:27 +0000 (13:34 +0200)] 
doc: Move libgettextpo example to the front subsection.

* gettext-tools/doc/gettext.texi (po_message_t API): Move example from
here...
(libgettextpo): ... back to here.

5 years agodoc: Split libgettextpo documentation into subsections
Miguel Ángel Arruga Vivas [Sun, 5 May 2019 18:51:49 +0000 (20:51 +0200)] 
doc: Split libgettextpo documentation into subsections

* gettext-tools/doc/gettext.texi (libgettextpo): Add a menu and split
the functions an types into separate subsections.
(Error Handling): New subsection.
(po_file_t API): New subsection
(po_message_iterator_t API). New subsection.
(po_message_t API): New subsection.

5 years agodoc: Add po_file_write documentation
Miguel Ángel Arruga Vivas [Sun, 5 May 2019 18:02:26 +0000 (20:02 +0200)] 
doc: Add po_file_write documentation

* gettext-tools/doc/gettext.texi (libgettextpo): Add po_file_write
documentation.
* gettext-tools/doc/gettext-po.in.h (po_file_write): Update comment.

5 years agodoc: Update po_file_read documentation
Miguel Ángel Arruga Vivas [Sun, 5 May 2019 17:54:44 +0000 (19:54 +0200)] 
doc: Update po_file_read documentation

* gettext-tools/doc/gettext.texi (libgettextpo): Update documentation
from po_file_read to the version 3 of the implementation.
* gettext-tools/libgettextpo/gettext-po.in.h (po_file_read): Update
comment.

5 years agodoc: Add po_xerror_handler_t documentation
Miguel Ángel Arruga Vivas [Sun, 5 May 2019 17:38:57 +0000 (19:38 +0200)] 
doc: Add po_xerror_handler_t documentation

* gettext-tools/doc/gettext.texi (libgettextpo): Add struct
po_xerror_handler and its callbacks to the manual.

5 years agodoc: Add po_file_create documentation
Miguel Ángel Arruga Vivas [Sun, 5 May 2019 18:09:56 +0000 (20:09 +0200)] 
doc: Add po_file_create documentation

* gettext-tools/doc/gettext.texi (libgettextpo): Add po_file_create
documentation.

5 years agoUpdate after gnulib changed.
Bruno Haible [Sun, 26 Jul 2020 15:52:11 +0000 (17:52 +0200)] 
Update after gnulib changed.

* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't require gt_INTTYPES_PRI.
* gettext-runtime/m4/inttypes-pri.m4: Remove file.
* gettext-runtime/m4/Makefile.am (EXTRA_DIST): Remove it.
* Makefile.am (distcheck-hook): Don't compare inttypes-pri.m4.
* gettext-runtime/m4/size_max.m4: Update from gnulib.

5 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 26 Jul 2020 15:26:55 +0000 (17:26 +0200)] 
Update to newest gnulib.

5 years agoDrop portability to AIX 4.
Bruno Haible [Sun, 26 Jul 2020 13:01:01 +0000 (15:01 +0200)] 
Drop portability to AIX 4.

* gettext-runtime/intl/loadmsgcat.c: Assume PRI_MACROS_BROKEN is not set.
* gettext-tools/tests/format-c-3-prg.c: Likewise.
* gettext-tools/tests/format-c-4-prg.c: Likewise.

5 years agomsgmerge: Make --sort-by-file sort messages without file reference correctly.
Bruno Haible [Fri, 17 Jul 2020 22:01:57 +0000 (00:01 +0200)] 
msgmerge: Make --sort-by-file sort messages without file reference correctly.

Reported by <wangqr@wangqr.tk> in <https://savannah.gnu.org/bugs/?58778>.

* gettext-tools/src/write-catalog.c (cmp_by_filepos): When a->filepos_count and
b->filepos_count are both 0, compare the msgid strings.
* gettext-tools/tests/msgmerge-29: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

5 years agobuild: Fix a "make install" failure in a VPATH build with OpenBSD 'make'.
Bruno Haible [Wed, 15 Jul 2020 00:13:03 +0000 (02:13 +0200)] 
build: Fix a "make install" failure in a VPATH build with OpenBSD 'make'.

* gettext-tools/misc/Makefile.am: Assume that archive.dir.tar is in $(srcdir).

5 years agoFix a test failure on MSVC.
Bruno Haible [Wed, 8 Jul 2020 07:21:26 +0000 (09:21 +0200)] 
Fix a test failure on MSVC.

* gettext-tools/tests/recode-sr-latin-1: Allow CRLF newlines in the output.

5 years agoFix build error on mingw (regression from 2020-07-05).
Bruno Haible [Wed, 8 Jul 2020 01:47:08 +0000 (03:47 +0200)] 
Fix build error on mingw (regression from 2020-07-05).

* autogen.sh (GNULIB_MODULES_LIBGETTEXTPO_OTHER): Add fdopen.

5 years agoUpdate to newest gnulib.
Bruno Haible [Wed, 8 Jul 2020 01:45:27 +0000 (03:45 +0200)] 
Update to newest gnulib.

5 years agoalloca-opt: Fix build error on AIX (regression from 2020-07-05).
Bruno Haible [Mon, 6 Jul 2020 19:31:54 +0000 (21:31 +0200)] 
alloca-opt: Fix build error on AIX (regression from 2020-07-05).

* gnulib-local/lib/alloca.in.h: Don't include <alloca.h>, since it would be a
recursive include of the same file.

5 years agoFix compilation error on AIX (regression from 2019-01-06).
Bruno Haible [Mon, 6 Jul 2020 17:28:51 +0000 (19:28 +0200)] 
Fix compilation error on AIX (regression from 2019-01-06).

* gettext-runtime/intl/Makefile.am (localename-table.h): Fix insertion of
export.h.

5 years agodoc: Fix typo.
Bruno Haible [Sun, 5 Jul 2020 23:34:33 +0000 (01:34 +0200)] 
doc: Fix typo.

Reported by Arun Isaac <arunisaac@systemreboot.net> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-07/msg00001.html>.

* gettext-tools/doc/gettext.texi (Prioritizing messages): Fix a typo.

5 years agomsgfmt: Supersede, not overwrite, the output file of type '.mo'.
Bruno Haible [Sun, 5 Jul 2020 21:44:41 +0000 (23:44 +0200)] 
msgfmt: Supersede, not overwrite, the output file of type '.mo'.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add 'supersede'.
* gettext-tools/src/write-mo.c: Include supersede.h.
(msgdomain_write_mo): When writing to a file, use fopen_supersede and
fwriteerror_supersede.
* NEWS: Mention the change.

5 years agoAvoid possible future conflict with gnulib module 'dirname'.
Bruno Haible [Sun, 5 Jul 2020 20:47:41 +0000 (22:47 +0200)] 
Avoid possible future conflict with gnulib module 'dirname'.

* gnulib-local/lib/basename.c: Remove file.
* gnulib-local/lib/basename.h: Remove file.
* gnulib-local/modules/basename: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove them.
* gnulib-local/lib/addext.c: Include basename-lgpl.h instead of basename.h.
(addext): Invoke last_component instead of basename.
* gnulib-local/lib/backupfile.c: Include basename-lgpl.h instead of basename.h.
(find_backup_file_name): Invoke last_component instead of basename.
* gnulib-local/modules/backupfile (Depends-on): Remove basename. Add
basename-lgpl.
* autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC, GNULIB_MODULES_TOOLS_FOR_SRC,
GNULIB_MODULES_LIBGETTEXTPO): Remove basename. Add basename-lgpl.
* gettext-runtime/src/envsubst.c: Include basename-lgpl.h instead of basename.h.
(main): Invoke last_component instead of basename.
* gettext-runtime/src/gettext.c: Likewise.
* gettext-runtime/src/ngettext.c: Likewise.
* gettext-tools/src/cldr-plurals.c: Likewise.
* gettext-tools/src/hostname.c: Likewise.
* gettext-tools/src/msgattrib.c: Likewise.
* gettext-tools/src/msgcat.c: Likewise.
* gettext-tools/src/msgcmp.c: Likewise.
* gettext-tools/src/msgcomm.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgexec.c: Likewise.
* gettext-tools/src/msgfilter.c: Likewise.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msggrep.c: Likewise.
* gettext-tools/src/msginit.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgunfmt.c: Likewise.
* gettext-tools/src/msguniq.c: Likewise.
* gettext-tools/src/urlget.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.
* gettext-tools/tests/tstgettext.c: Likewise.
* gettext-tools/tests/tstngettext.c: Likewise. Include <string.h>.
* gettext-tools/src/recode-sr-latin.c: Include basename-lgpl.h instead of
basename.h.
(main, process): Invoke last_component instead of basename.
* gettext-tools/src/locating-rule.c: Include basename-lgpl.h instead of
basename.h.
(locating_rule_match): Invoke last_component instead of basename.
* gettext-tools/src/msgl-cat.c: Include basename-lgpl.h instead of basename.h.
(catenate_msgdomain_list): Invoke last_component instead of basename.
* gettext-tools/src/msgl-charset.c: Include basename-lgpl.h instead of
basename.h.
(compare_po_locale_charsets): Invoke last_component instead of basename.
* gettext-tools/src/msgl-iconv.c: Include basename-lgpl.h instead of basename.h.
(iconv_message_list_internal): Invoke last_component instead of basename.
* gettext-tools/src/po-charset.c: Include basename-lgpl.h instead of basename.h.
(po_lex_charset_set): Invoke last_component instead of basename.
* gettext-tools/src/x-python.c: Include basename-lgpl.h instead of basename.h.
(set_current_file_source_encoding): Invoke last_component instead of basename.
* gettext-tools/src/x-javascript.c: Don't include basename.h.

5 years agoUpdate after gnulib changed.
Bruno Haible [Sun, 5 Jul 2020 20:09:08 +0000 (22:09 +0200)] 
Update after gnulib changed.

* gnulib-local/lib/clean-temp.c.diff: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove it.
* gettext-tools/src/write-csharp.c (msgdomain_write_csharp): Update fopen_temp
invocation.
* gettext-tools/src/write-java.c (msgdomain_write_java): Likewise.

5 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 5 Jul 2020 20:08:17 +0000 (22:08 +0200)] 
Update to newest gnulib.

5 years agogettext.h: Update from gnulib.
Bruno Haible [Sun, 5 Jul 2020 20:06:43 +0000 (22:06 +0200)] 
gettext.h: Update from gnulib.

* gnulib-local/lib/gettext.h: Disable use of VLAs if GNULIB_NO_VLA is defined.

5 years agoalloca-opt: Update from gnulib.
Bruno Haible [Sun, 5 Jul 2020 19:50:34 +0000 (21:50 +0200)] 
alloca-opt: Update from gnulib.

* gnulib-local/lib/alloca.in.h: Update from gnulib.
* gnulib-local/m4/alloca.m4: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove it.

5 years agoAvoid possible future conflict with gnulib module 'hash'.
Bruno Haible [Sun, 5 Jul 2020 19:42:14 +0000 (21:42 +0200)] 
Avoid possible future conflict with gnulib module 'hash'.

* gnulib-local/lib/hash.c.diff: New file.
* gnulib-local/lib/hash.h.diff: New file.
* gnulib-local/Makefile.am (EXTRA_DIST): Add them.

5 years agoRemove some now unneeded gnulib-tool --avoid options.
Bruno Haible [Sun, 5 Jul 2020 19:29:30 +0000 (21:29 +0200)] 
Remove some now unneeded gnulib-tool --avoid options.

* autogen.sh: Remove some --avoid=*-tests options.
* libtextstyle/autogen.sh: Likewise.

5 years agoAvoid a module name and include file name collision with gnulib.
Bruno Haible [Sat, 4 Jul 2020 20:21:58 +0000 (22:21 +0200)] 
Avoid a module name and include file name collision with gnulib.

* gnulib-local/lib/mem-hash-map.h: Renamed from gnulib-local/lib/hash.h.
* gnulib-local/lib/mem-hash-map.c: Renamed from gnulib-local/lib/hash.c.
Include mem-hash-map.h instead of hash.h.
* gnulib-local/modules/mem-hash-map: Renamed from gnulib-local/modules/hash.
Update.
* gnulib-local/Makefile.am (EXTRA_DIST): Update.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC, GNULIB_MODULES_LIBGETTEXTPO):
Update.
* libtextstyle/gnulib-local/modules/term-styled-ostream (Depends-on): Likewise.
* gettext-tools/src/its.c: Include mem-hash-map.h instead of hash.h.
* gettext-tools/src/locating-rule.c: Likewise.
* gettext-tools/src/message.c: Likewise.
* gettext-tools/src/message.h: Likewise.
* gettext-tools/src/read-desktop.h: Likewise.
* gettext-tools/src/write-mo.c: Likewise.
* gettext-tools/src/write-qt.c: Likewise.
* gettext-tools/src/x-c.c: Likewise.
* gettext-tools/src/x-csharp.c: Likewise.
* gettext-tools/src/x-desktop.c: Likewise.
* gettext-tools/src/x-elisp.c: Likewise.
* gettext-tools/src/x-java.c: Likewise.
* gettext-tools/src/x-librep.c: Likewise.
* gettext-tools/src/x-lisp.c: Likewise.
* gettext-tools/src/x-scheme.c: Likewise.
* gettext-tools/src/x-sh.c: Likewise.
* gettext-tools/src/x-tcl.c: Likewise.
* gettext-tools/src/x-vala.c: Likewise.
* gettext-tools/src/xg-arglist-callshape.h: Likewise.
* gettext-tools/src/xg-arglist-context.h: Likewise.
* libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c: Likewise.

5 years agoRemove redundant code (redundant since 2008-10-19).
Bruno Haible [Sat, 4 Jul 2020 20:21:28 +0000 (22:21 +0200)] 
Remove redundant code (redundant since 2008-10-19).

* gnulib-local/modules/wait-process.diff: Remove file.
* gnulib-local/m4/unionwait.m4: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove them.

5 years agoRemove redundant code.
Bruno Haible [Thu, 25 Jun 2020 15:38:25 +0000 (17:38 +0200)] 
Remove redundant code.

* gettext-tools/src/write-mo.c (msgdomain_write_mo): Remove a redundant test.
* gettext-tools/src/write-qt.c (msgdomain_write_qt): Likewise.

5 years agoAdd comment.
Bruno Haible [Sat, 27 Jun 2020 20:43:16 +0000 (22:43 +0200)] 
Add comment.

* gettext-tools/src/plural-eval.c (sigfpe_handler): Add comment.

5 years agoUpdate after gnulib changed.
Bruno Haible [Fri, 26 Jun 2020 21:22:29 +0000 (23:22 +0200)] 
Update after gnulib changed.

* gnulib-local/modules/fnmatch.diff: Remove file.
* gnulib-local/lib/fnmatch.c.diff: Remove file.
* gnulib-local/lib/fnmatch_loop.c.diff: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove them.
* gettext-tools/src/read-properties.c (properties_parse): Update the fread_file
invocation.
* gettext-tools/po/POTFILES.in: Remove gnulib-lib/copy-acl.c,
gnulib-lib/set-acl.c.
* gettext-runtime/intl/localename.c: Update from gnulib.
* gettext-runtime/intl/relocatable.c: Likewise.
* gettext-runtime/intl/verify.h: Likewise.
* gettext-runtime/intl/windows-rwlock.c: Likewise.

5 years agoUpdate to newest gnulib.
Bruno Haible [Fri, 26 Jun 2020 19:30:16 +0000 (21:30 +0200)] 
Update to newest gnulib.

5 years agoFAQ: Update information about mailing lists.
Bruno Haible [Sat, 6 Jun 2020 15:25:00 +0000 (17:25 +0200)] 
FAQ: Update information about mailing lists.

Reported by Vincent Lefèvre <vincent@vinc17.net> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-06/msg00003.html>.

* gettext-tools/doc/FAQ.html: Don't mention bug-gnu-utils. Clarify what
bug-gnu-gettext is.

5 years agomsgunfmt: Detect more cases of invalid .mo files.
Bruno Haible [Sat, 6 Jun 2020 14:53:12 +0000 (16:53 +0200)] 
msgunfmt: Detect more cases of invalid .mo files.

* gettext-tools/src/read-mo.c: Include hash-string.h.
(read_mo_file): Verify the array of messages and the hash table.
* gettext-tools/src/write-mo.c (write_table): Fix typo in comment.
* gettext-tools/src/Makefile.am (msgunfmt_SOURCES): Add hash-string.c.
* gettext-tools/tests/overflow-7.mo: Renamed from
gettext-tools/tests/sysdep-without-nul.mo.
* gettext-tools/tests/sysdep-without-nul.mo: New file.
* gettext-tools/tests/msgunfmt-3: Test also overflow-7.mo.
* gettext-tools/tests/Makefile.am (EXTRA_DIST): Add overflow-7.mo.

5 years agopo-mode: Fix syntax highlighting of comment lines with double-quotes.
Bruno Haible [Sat, 6 Jun 2020 14:02:22 +0000 (16:02 +0200)] 
po-mode: Fix syntax highlighting of comment lines with double-quotes.

Reported by Vincent Lefèvre <vincent@vinc17.net> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-06/msg00000.html>.

* gettext-tools/emacs/po-mode.el (po-mode-version-string): Bump.
(po-font-lock-keywords): Move the rules that recognize comments to the
beginning.

5 years agoReorder list of programming languages.
Bruno Haible [Sun, 10 May 2020 18:44:55 +0000 (20:44 +0200)] 
Reorder list of programming languages.

* gettext-tools/src/format.h: Reorder declarations.
* gettext-tools/src/format.c (formatstring_parsers): Reorder entries.
* gettext-tools/src/message.h (enum format_type): Reorder items.
* gettext-tools/src/message.c (format_language, format_language_pretty): Reorder
entries.
* gettext-tools/src/xgettext.c: Reorder includes.
(flag_table_*): Reorder declarations.
(main): Reorder init_flag_table_* invocations.
(xgettext_record_flag): Reorder switch statement.
(language_to_extractor, extension_to_language): Reorder table entries.
* gettext-tools/src/format-smalltalk.c: Renamed from
gettext-tools/src/format-ycp.c.
* gettext-tools/src/FILES: Update.
* gettext-tools/src/Makefile.am (noinst_HEADERS, FORMAT_SOURCE,
xgettext_SOURCES): Update.
* gettext-tools/po/POTFILES.in: Update.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Update.
* gettext-tools/tests/Makefile.am (TESTS): Reorder.

5 years agoi18n: Update list of files.
Bruno Haible [Sun, 10 May 2020 19:15:49 +0000 (21:15 +0200)] 
i18n: Update list of files.

* gettext-tools/po/POTFILES.in: Add missing files.

5 years agodoc: Reorder list of programming languages.
Bruno Haible [Sun, 10 May 2020 11:33:58 +0000 (13:33 +0200)] 
doc: Reorder list of programming languages.

* gettext-tools/doc/lang-c.texi: New file, extracted from
gettext-tools/doc/gettext.texi.
* gettext-tools/doc/lang-python.texi: Likewise.
* gettext-tools/doc/lang-java.texi: Likewise.
* gettext-tools/doc/lang-csharp.texi: Likewise.
* gettext-tools/doc/lang-javascript.texi: Likewise.
* gettext-tools/doc/lang-scheme.texi: Likewise.
* gettext-tools/doc/lang-lisp.texi: Likewise.
* gettext-tools/doc/lang-clisp-c.texi: Likewise.
* gettext-tools/doc/lang-elisp.texi: Likewise.
* gettext-tools/doc/lang-librep.texi: Likewise.
* gettext-tools/doc/lang-ruby.texi: Likewise.
* gettext-tools/doc/lang-sh.texi: Likewise.
* gettext-tools/doc/lang-bash.texi: Likewise.
* gettext-tools/doc/lang-gawk.texi: Likewise.
* gettext-tools/doc/lang-lua.texi: Likewise.
* gettext-tools/doc/lang-pascal.texi: Likewise.
* gettext-tools/doc/lang-smalltalk.texi: Likewise.
* gettext-tools/doc/lang-vala.texi: Likewise.
* gettext-tools/doc/lang-wxwidgets.texi: Likewise.
* gettext-tools/doc/lang-tcl.texi: Likewise.
* gettext-tools/doc/lang-perl.texi: Likewise.
* gettext-tools/doc/lang-php.texi: Likewise.
* gettext-tools/doc/lang-pike.texi: Likewise.
* gettext-tools/doc/lang-gcc-source.texi: Likewise.
* gettext-tools/doc/lang-ycp.texi: Likewise.
* gettext-tools/doc/Makefile.am (gettext_TEXINFOS): Add them.
* gettext-tools/doc/gettext.texi (List of Programming Languages): Reorder list
of programming languages, approximately according to decreasing importance.
(PO Files): Reorder list for format string markers accordingly.
(Translators for other Languages): Likewise.

5 years agoxgettext: Warn if a fallback ITS file is used
Daiki Ueno [Sun, 10 May 2020 07:24:37 +0000 (09:24 +0200)] 
xgettext: Warn if a fallback ITS file is used

* src/xgettext.c (main): Warn if a fallback ITS file is used.
Suggested by Will Thompson in:
<https://savannah.gnu.org/bugs/?56455>.

5 years agoReduce explicit use of __attribute__.
Bruno Haible [Sat, 9 May 2020 00:12:02 +0000 (02:12 +0200)] 
Reduce explicit use of __attribute__.

* gnulib-local/lib/xalloc.h: Include noreturn.h.
(xalloc_die): Use _GL_NORETURN_FUNC.
* gnulib-local/modules/xalloc (Depends-on): Add noreturn.

5 years agoReduce explicit use of __attribute__.
Bruno Haible [Sat, 9 May 2020 00:12:28 +0000 (02:12 +0200)] 
Reduce explicit use of __attribute__.

* autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC, GNULIB_MODULES_TOOLS_FOR_SRC): Add noreturn.
* gettext-runtime/src/envsubst.c: Include noreturn.h.
(usage): Use _GL_NORETURN_FUNC.
* gettext-runtime/src/gettext.c: Likewise.
* gettext-runtime/src/ngettext.c: Likewise.
* gettext-tools/src/hostname.c: Likewise.
* gettext-tools/src/msgattrib.c: Likewise.
* gettext-tools/src/msgcat.c: Likewise.
* gettext-tools/src/msgcmp.c: Likewise.
* gettext-tools/src/msgcomm.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgexec.c: Likewise.
* gettext-tools/src/msgfilter.c: Likewise.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msginit.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgunfmt.c: Likewise.
* gettext-tools/src/msguniq.c: Likewise.
* gettext-tools/src/recode-sr-latin.c: Likewise.
* gettext-tools/src/urlget.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.
* gettext-tools/src/msggrep.c: Include noreturn.h.
(no_pass, usage): Use _GL_NORETURN_FUNC.
* gettext-tools/src/msgl-iconv.c: Include noreturn.h.
(conversion_error): Use _GL_NORETURN_FUNC.
* gettext-tools/tests/tstgettext.c: Include noreturn.h.
(usage): Use _GL_NORETURN_FUNC.
* gettext-tools/tests/tstngettext.c: Likewise.

5 years agobuild: Fix "make distcheck" failure.
Bruno Haible [Fri, 8 May 2020 23:25:15 +0000 (01:25 +0200)] 
build: Fix "make distcheck" failure.

* gettext-tools/src/Makefile.am (po-gram-gen.c, cldr-plural.c): Don't use
ylwrap.
(MOSTLYCLEANFILES): Augment accordingly.
* gettext-tools/configure.ac (YACC): Remove assignment.

5 years agoUpdate after gnulib changed.
Bruno Haible [Fri, 8 May 2020 17:10:19 +0000 (19:10 +0200)] 
Update after gnulib changed.

* autogen.sh: Create gettext-runtime/intl/attribute.h.
(GNULIB_MODULES_LIBASPRINTF): Add 'attribute'.
* gettext-runtime/intl/Makefile.am (EXTRA_DIST): Add attribute.h.
* Makefile.am (distcheck-hook): Test also gettext-runtime/intl/attribute.h.
* gettext-runtime/intl/vasnprintf.c: Update from gnulib.
* gettext-runtime/intl/xsize.h: Likewise.
* gettext-runtime/libasprintf/vasnprintf.c: Likewise.

5 years agoUpdate to newest gnulib.
Bruno Haible [Fri, 8 May 2020 17:07:27 +0000 (19:07 +0200)] 
Update to newest gnulib.

5 years agoUpdate after gnulib changed.
Bruno Haible [Fri, 8 May 2020 07:49:39 +0000 (09:49 +0200)] 
Update after gnulib changed.

* gnulib-local/modules/fnmatch.diff: Update.

5 years agoUpdate to newest gnulib.
Bruno Haible [Fri, 8 May 2020 07:33:17 +0000 (09:33 +0200)] 
Update to newest gnulib.

5 years agoUpdate after gnulib changed.
Bruno Haible [Sun, 3 May 2020 11:18:55 +0000 (13:18 +0200)] 
Update after gnulib changed.

* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Remove redundant argument to
gl_PROG_BISON.
* gettext-tools/configure.ac: Likewise.

5 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 3 May 2020 11:16:06 +0000 (13:16 +0200)] 
Update to newest gnulib.

5 years agoClarify minimum needed bison version.
Bruno Haible [Fri, 1 May 2020 20:05:46 +0000 (22:05 +0200)] 
Clarify minimum needed bison version.

* gettext-tools/src/cldr-plural.y: Add %require declaration.

5 years agoTweak last commit.
Bruno Haible [Fri, 1 May 2020 20:04:19 +0000 (22:04 +0200)] 
Tweak last commit.

* gettext-tools/src/po-gram-gen.y: Move %define declaration after the first code
block. Add %require declaration.

5 years agoSolidify remapping of function names of bison-generated parsers.
Akim Demaille [Fri, 1 May 2020 10:40:43 +0000 (12:40 +0200)] 
Solidify remapping of function names of bison-generated parsers.

* gettext-tools/src/po-gram-gen.y: Use Bison's api.prefix (introduced in Bison
2.6) instead of handling renaming by hand.  New symbols would have been not
renamed.

5 years agoUpdate copyright year.
Bruno Haible [Fri, 1 May 2020 19:53:03 +0000 (21:53 +0200)] 
Update copyright year.

* gettext-runtime/intl/plural.y: Update copyright year.

5 years agointl: Require bison 3.0 or newer.
Bruno Haible [Fri, 1 May 2020 19:41:25 +0000 (21:41 +0200)] 
intl: Require bison 3.0 or newer.

* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Require bison >= 3.0, not
bison >= 2.7.

5 years agointl: Fix grammar conflicts instead of accepting them.
Akim Demaille [Fri, 1 May 2020 10:40:42 +0000 (12:40 +0200)] 
intl: Fix grammar conflicts instead of accepting them.

The seven conflicts are related to "a ? b : c <op> d".  In all the
cases we left the S/R conflict be resolved as a shift, i.e., "a ? b
: (c <op> d)".  To make this explicit, give the rule of the ternary
operator a very low precedence.  In fact give it the same precedence
as "?".  Now, to resolve the conflict in "a ? b : c ? d : e" be parsed
as "a ? b : (c ? d : e)", make them right-associative.

* gettext-runtime/intl/plural.y: Require Bison 3.0, to use %precedence
instead of useless associativities such as %right.
Make '?' and ':' of the same precedence, right associative.

5 years agobuild: Fix VPATH build failures with old bison when the *.y files are modified.
Bruno Haible [Fri, 1 May 2020 19:35:43 +0000 (21:35 +0200)] 
build: Fix VPATH build failures with old bison when the *.y files are modified.

* gettext-runtime/intl/Makefile.am (BISON): New variable.
(YACC): Use it.
(plural.c): Don't do the post-processing if a suitable version of bison was not
found.
* gettext-tools/src/Makefile.am (BISON): New variable.
(po-gram-gen.c, cldr-plural.c): Don't do the post-processing if a suitable
version of bison was not found.

5 years agobuild: Simplify bison detection.
Bruno Haible [Fri, 1 May 2020 18:38:24 +0000 (20:38 +0200)] 
build: Simplify bison detection.

* autogen.sh (GNULIB_MODULES_RUNTIME_OTHER): Add bison.
* gettext-runtime/configure.ac: Don't invoke AC_PROG_YACC.
* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Invoke gl_PROG_BISON.

5 years agobuild: Fix a build failure with bison < 3.0 when cldr-plural.y is modified.
Bruno Haible [Fri, 1 May 2020 17:46:00 +0000 (19:46 +0200)] 
build: Fix a build failure with bison < 3.0 when cldr-plural.y is modified.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add bison.
* gettext-tools/configure.ac: Don't invoke AC_PROG_YACC. Instead, invoke
gl_PROG_BISON, set YACC, and invoke gl_BISON.

5 years agoUpdate to newest gnulib.
Bruno Haible [Fri, 1 May 2020 16:50:41 +0000 (18:50 +0200)] 
Update to newest gnulib.

5 years agobuild: Fix link error in tests (regression from 2020-04-26).
Bruno Haible [Fri, 1 May 2020 13:16:55 +0000 (15:16 +0200)] 
build: Fix link error in tests (regression from 2020-04-26).

Reported and fix by Akim Demaille <akim.demaille@gmail.com>.

* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Add
format-ruby.c.

5 years agoxgettext: Add Ruby support.
Bruno Haible [Sun, 26 Apr 2020 22:19:07 +0000 (00:19 +0200)] 
xgettext: Add Ruby support.

* gettext-tools/src/x-ruby.h: New file.
* gettext-tools/src/x-ruby.c: New file.
* gettext-tools/src/xgettext.h (verbose): New declaration.
* gettext-tools/src/xgettext.c: Include x-ruby.h.
(verbose): New declaration.
(flag_table_ruby): New variable.
(long_options): Add '--verbose'.
(main): Update for Ruby. Handle '-v'/'--verbose' option.
(usage): Document the '-L Ruby' and '-v' options.
(xgettext_record_flag, language_to_extractor, extension_to_language): Update for
Ruby.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add x-ruby.h.
(xgettext_SOURCES): Add x-ruby.c.
* gettext-tools/src/FILES: Mention x-ruby.h, x-ruby.c.
* gettext-tools/tests/xgettext-ruby-1: New file.
* gettext-tools/tests/format-ruby-1: New file.
* gettext-tools/tests/format-ruby-2: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
* gettext-tools/doc/gettext.texi (Ruby): New section.
* gettext-tools/doc/xgettext.texi: Document the '-L Ruby' and '-v' options.
* HACKING: Document the recommended Ruby packages.
* NEWS: Mention the Ruby support.

5 years agoxgettext: Define alternate parser signature for the Ruby support.
Bruno Haible [Sun, 26 Apr 2020 21:51:23 +0000 (23:51 +0200)] 
xgettext: Define alternate parser signature for the Ruby support.

* gettext-tools/src/xgettext.c (extract_from_stream_func): Renamed from
extractor_func.
(extract_from_file_func): New type.
(struct extractor_ty): Rename field func to extract_from_stream. New field
extract_from_file.
(main): Consider both fields.
(xgettext_find_file): New function.
(extract_from_file): Add alternative code for when the other extraction function
is defined.
(language_to_extractor): In the table, rename field func to extract_from_stream,
and add new field extract_from_file.
* gettext-tools/src/x-*.h (SCANNERS_*): Update.

5 years agoxgettext: Define functions for the Ruby support.
Bruno Haible [Sun, 26 Apr 2020 21:35:16 +0000 (23:35 +0200)] 
xgettext: Define functions for the Ruby support.

* gettext-tools/src/xg-message.h (decide_is_format, intersect_range,
decide_do_wrap, decide_syntax_check): New declarations.
* gettext-tools/src/xg-message.c (decide_is_format, intersect_range,
decide_do_wrap, decide_syntax_check): New functions. extracted from
remember_a_message.
(remember_a_message): Invoke these functions.

5 years agostr-list: Add a remove function.
Bruno Haible [Sun, 26 Apr 2020 21:29:17 +0000 (23:29 +0200)] 
str-list: Add a remove function.

* gettext-tools/src/str-list.h (string_list_remove): New declaration.
* gettext-tools/src/str-list.c (string_list_remove): New function.

5 years agoAdd support for Ruby format strings.
Bruno Haible [Sun, 26 Apr 2020 14:48:46 +0000 (16:48 +0200)] 
Add support for Ruby format strings.

* gettext-tools/src/message.h (enum format_type): Add format_ruby.
* gettext-tools/src/message.c (format_language, format_language_pretty): Add an
entry for format_ruby.
(NFORMATS): Increment.
* gettext-tools/src/format.h (formatstring_ruby): New declaration.
* gettext-tools/src/format.c (formatstring_parsers): Add an entry for
format_ruby.
* gettext-tools/src/format-ruby.c: New file, based on
gettext-tools/src/format-python.c.
* gettext-tools/src/FILES: Mention it.
* gettext-tools/src/Makefile.am (FORMAT_SOURCE): Add format-ruby.c.
* gettext-tools/doc/gettext.texi (PO Files): Mention ruby-format.
(ruby-format): New section.

5 years agoxgettext: Fix a comment.
Bruno Haible [Sun, 26 Apr 2020 10:10:36 +0000 (12:10 +0200)] 
xgettext: Fix a comment.

* gettext-tools/src/x-po.c: Fix a comment.

5 years agoReduce heap allocation in format string parsers.
Bruno Haible [Sat, 25 Apr 2020 16:53:36 +0000 (18:53 +0200)] 
Reduce heap allocation in format string parsers.

* gettext-tools/src/format-awk.c (struct spec): Remove 'allocated' field.
(format_parse): Use a local variable instead.
* gettext-tools/src/format-boost.c: Likewise.
* gettext-tools/src/format-elisp.c: Likewise.
* gettext-tools/src/format-gcc-internal.c: Likewise.
* gettext-tools/src/format-java-printf.c: Likewise.
* gettext-tools/src/format-javascript.c: Likewise.
* gettext-tools/src/format-kde.c: Likewise.
* gettext-tools/src/format-librep.c: Likewise.
* gettext-tools/src/format-lua.c: Likewise.
* gettext-tools/src/format-perl-brace.c: Likewise.
* gettext-tools/src/format-python.c: Likewise.
* gettext-tools/src/format-sh.c: Likewise.
* gettext-tools/src/format-tcl.c: Likewise.
* gettext-tools/src/format-c-parse.h (struct spec): Remove 'allocated' field.
(format_parse_entrails): Use a local variable instead.
* gettext-tools/src/format-pascal.c (struct spec): Remove 'allocated' field.
(format_parse): Rename a local variable.
* gettext-tools/src/format-perl.c: Likewise.
* gettext-tools/src/format-php.c: Likewise.
* gettext-tools/src/format-gfc-internal.c (format_parse): Rename a local
variable.

5 years agoexamples: Improve code style.
Bruno Haible [Sat, 25 Apr 2020 10:55:57 +0000 (12:55 +0200)] 
examples: Improve code style.

* gettext-tools/examples/hello-*/configure.ac: Improve quoting.

5 years agoUpdate .gitignore after 2020-04-19 change.
Bruno Haible [Sun, 26 Apr 2020 22:21:55 +0000 (00:21 +0200)] 
Update .gitignore after 2020-04-19 change.

5 years agoUpdate after gnulib changed.
Bruno Haible [Sat, 25 Apr 2020 08:06:44 +0000 (10:06 +0200)] 
Update after gnulib changed.

* gettext-runtime/libasprintf/vasnprintf.c: Update from gnulib.

5 years agobuild: Fix a warning (regression from 2020-01-05).
Bruno Haible [Mon, 20 Apr 2020 01:56:48 +0000 (03:56 +0200)] 
build: Fix a warning (regression from 2020-01-05).

* gettext-tools/tests/tstgettext.c (setlocale): Declare after defining as
fake_setlocale.
* gettext-tools/tests/tstngettext.c (setlocale): Likewise.
* gettext-tools/tests/plural-1-prg.c (setlocale): Likewise.
* gettext-tools/tests/format-c-3-prg.c (setlocale): Likewise.
* gettext-tools/tests/format-c-4-prg.c (setlocale): Likewise.

5 years agointl: Support any Unicode characters in the locale dir on native Windows.
Bruno Haible [Sun, 19 Apr 2020 22:46:44 +0000 (00:46 +0200)] 
intl: Support any Unicode characters in the locale dir on native Windows.

Reported at <https://savannah.gnu.org/bugs/?57714>.

* gettext-runtime/intl/libgnuintl.in.h (libintl_wbindtextdomain): New
declaration.
(wbindtextdomain): New redirect.
* gettext-runtime/intl/bindtextdom.c (set_binding_values): Accept a wdirnamep
argument. Set not only binding->dirname but also binding->wdirname.
(BINDTEXTDOMAIN, BIND_TEXTDOMAIN_CODESET): Pass NULL as wdirnamep.
(libintl_wbindtextdomain): New function.
* gettext-runtime/intl/loadinfo.h (struct loaded_l10nfile): Add a wfilename
field.
(_nl_make_l10nflist): On native Windows, accept wdirlist, wdirlist_len
parameters.
* gettext-runtime/intl/loadmsgcat.c (_nl_load_domain): On native Windows, use
_wopen() instead of open() to open a file with a name given as wchar_t[].
* gettext-runtime/intl/l10nflist.c: Include <wchar.h>.
(_nl_make_l10nflist): On native Windows, accept wdirlist, wdirlist_len
parameters. Construct abs_wfilename and use in the search for existing
'struct loaded_l10nfile' and when allocating a fresh 'struct loaded_l10nfile'.
* gettext-runtime/intl/gettextP.h (struct binding): Add a wdirname field.
(_nl_find_domain): On native Windows, accept a wdirname parameter.
* gettext-runtime/intl/finddomain.c (_nl_find_domain): On native Windows, accept
a wdirname parameter. Pass it to _nl_make_l10nflist.
* gettext-runtime/intl/dcigettext.c (DCIGETTEXT): Consider not only
binding->dirname but also binding->wdirname. On native Windows, use _wgetcwd
instead of getcwd. Pass also wdirname to _nl_find_domain.
* gettext-tools/tests/intl-6: New file, based on gettext-tools/tests/intl-1.
* gettext-tools/tests/intl-6-prg.c: New file, based on
gettext-tools/tests/intl-1-prg.c.
* gettext-tools/tests/Makefile.am (TESTS): Add intl-6.
(check_PROGRAMS): Add intl-6-prg.
(intl_6_prg_SOURCES, intl_6_prg_LDADD): New variables.
* gettext-tools/doc/gettext.texi (Ambiguities, src/Makefile,
Language Implementors, C): Document wbindtextdomain.
* gettext-runtime/NEWS: Mention the change.
* NEWS: Likewise.

5 years agoUpdate after gnulib changed.
Bruno Haible [Sun, 19 Apr 2020 22:14:29 +0000 (00:14 +0200)] 
Update after gnulib changed.

* gettext-runtime/intl/vasnprintf.c: Update from gnulib.

5 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 19 Apr 2020 22:13:18 +0000 (00:13 +0200)] 
Update to newest gnulib.

5 years agointl: Add comment regarding debugging printf.
Bruno Haible [Sun, 19 Apr 2020 15:30:57 +0000 (17:30 +0200)] 
intl: Add comment regarding debugging printf.

* gettext-runtime/intl/printf.c (ENABLE_WCHAR_FALLBACK): New commented
definition.

5 years agolibtextstyle: Fix a memory leak.
Bruno Haible [Tue, 14 Apr 2020 21:48:23 +0000 (23:48 +0200)] 
libtextstyle: Fix a memory leak.

Reported by José E. Marchesi <jemarch@gnu.org>.

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream::free): Free
also the stream's attrbuffer.

5 years agoUpdate NEWS files after version 0.20.2 was released.
Bruno Haible [Tue, 14 Apr 2020 11:57:10 +0000 (13:57 +0200)] 
Update NEWS files after version 0.20.2 was released.

5 years agoFix typo in release steps.
Bruno Haible [Tue, 14 Apr 2020 09:01:55 +0000 (11:01 +0200)] 
Fix typo in release steps.

5 years agoMerge from 0.20.x branch: Update translations (from the TP).
Bruno Haible [Mon, 13 Apr 2020 13:40:50 +0000 (15:40 +0200)] 
Merge from 0.20.x branch: Update translations (from the TP).

* gettext-runtime/po/*.po: Update.
* gettext-tools/po/*.po: Update.
* gettext-tools/examples/po/*.po: Update.
* gettext-tools/examples/po/LINGUAS: Add 'sq'.
* gettext-tools/examples/hello-*/po/LINGUAS: Likewise.
* gettext-tools/examples/Makefile.am (EXAMPLESPOFILES): Add sq.po.

5 years agoMerge from 0.20.x branch: examples: Use infrastructure from gettext version 0.20.2.
Bruno Haible [Mon, 13 Apr 2020 20:41:54 +0000 (22:41 +0200)] 
Merge from 0.20.x branch: examples: Use infrastructure from gettext version 0.20.2.

* gettext-tools/examples/hello-*/configure.ac: Use AM_GNU_GETTEXT_VERSION with
version 0.20.2.
* gettext-tools/examples/hello-c++-kde/configure.in.in: Likewise.

5 years agoMerge from 0.20.x branch: Prepare for 0.20.2 release.
Bruno Haible [Mon, 13 Apr 2020 13:32:22 +0000 (15:32 +0200)] 
Merge from 0.20.x branch: Prepare for 0.20.2 release.

* gettext-runtime/doc/matrix.texi: Update from TP.
* gettext-runtime/doc/nls.texi (STATUS): Update.
* gettext-runtime/intl/Makefile.am (LTV_*): Bump to 9:7:1.
* gettext-runtime/intl/libgnuintl.in.h (LIBINTL_VERSION): Bump.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.20.2.
* gettext-tools/libgettextpo/Makefile.am (LTV_*): Bump to 5:6:5.
* gettext-tools/libgettextpo/gettext-po.in.h (LIBGETTEXTPO_VERSION): Bump.
* gettext-runtime/src/envsubst.c: Update copyright years in --version output.
* gettext-runtime/src/gettext.c: Likewise.
* gettext-runtime/src/gettext.sh.in: Likewise.
* gettext-runtime/src/ngettext.c: Likewise.
* gettext-tools/src/cldr-plurals.c: Likewise.
* gettext-tools/src/hostname.c: Likewise.
* gettext-tools/src/msgattrib.c: Likewise.
* gettext-tools/src/msgcat.c: Likewise.
* gettext-tools/src/msgcmp.c: Likewise.
* gettext-tools/src/msgcomm.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgexec.c: Likewise.
* gettext-tools/src/msgfilter.c: Likewise.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msggrep.c: Likewise.
* gettext-tools/src/msginit.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgunfmt.c: Likewise.
* gettext-tools/src/msguniq.c: Likewise.
* gettext-tools/src/recode-sr-latin.c: Likewise.
* gettext-tools/src/urlget.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.
* gettext-tools/misc/convert-archive.in: Likewise.
* gettext-tools/misc/gettextize.in: Likewise.
* gettext-tools/misc/autopoint.in: Likewise. Handle version 0.20.2.

5 years agomaint: Update download location of jdom-1.0.jar.
Bruno Haible [Mon, 13 Apr 2020 13:23:55 +0000 (15:23 +0200)] 
maint: Update download location of jdom-1.0.jar.

5 years agobuild: Fix the generation of hello-c-gnome3.pot (regression from 2019-10-04).
Bruno Haible [Tue, 14 Apr 2020 01:29:58 +0000 (03:29 +0200)] 
build: Fix the generation of hello-c-gnome3.pot (regression from 2019-10-04).

* gettext-tools/examples/po/Makefile.am (USE_BUILT_PROGS): Set also
GETTEXTDATADIR.

5 years agoFix a compilation error (regression from 2019-12-24).
Bruno Haible [Mon, 13 Apr 2020 12:14:20 +0000 (14:14 +0200)] 
Fix a compilation error (regression from 2019-12-24).

* gettext-tools/src/write-desktop.c: Include <stdint.h>.

5 years agointl: Drop argz processing outside of glibc.
Bruno Haible [Sun, 12 Apr 2020 17:29:36 +0000 (19:29 +0200)] 
intl: Drop argz processing outside of glibc.

* gettext-runtime/intl/l10nflist.c: Don't test HAVE_ARGZ_H.
(__argz_count, __argz_stringify, __argz_next): Remove definitions.
(_nl_make_l10nflist): Simplify !_LIBC case.
* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't test for <argz.h>,
argz_count, argz_stringify, argz_next.

5 years agointl: Improve comments.
Bruno Haible [Sun, 12 Apr 2020 16:49:42 +0000 (18:49 +0200)] 
intl: Improve comments.

* gettext-runtime/intl/Makefile.am: Add an overview of the code.
* gettext-runtime/intl/loadinfo.h (_nl_make_l10nflist): Improve comment.
* gettext-runtime/intl/dcigettext.c (guess_category_value): Likewise.
* gettext-runtime/intl/finddomain.c (_nl_find_domain): Likewise.

5 years agopo: Emit a warning when creating a tarball without POT file.
Bruno Haible [Sat, 11 Apr 2020 21:00:21 +0000 (23:00 +0200)] 
po: Emit a warning when creating a tarball without POT file.

* gettext-runtime/po/Makefile.in.in (dist2): Emit a warning when the POT file
does not exist.
* gettext-tools/examples/hello-*/po/Makefile.am (distdir1): Likewise.

5 years agolibtextstyle: Update .gitignore after 2019-12-24 change.
Bruno Haible [Sat, 11 Apr 2020 11:16:26 +0000 (13:16 +0200)] 
libtextstyle: Update .gitignore after 2019-12-24 change.

5 years agoUpdate to newest gnulib.
Bruno Haible [Sat, 11 Apr 2020 10:09:23 +0000 (12:09 +0200)] 
Update to newest gnulib.

5 years agoxgettext: Fix a report by an undefined-behaviour sanitizer.
Bruno Haible [Fri, 10 Apr 2020 19:19:36 +0000 (21:19 +0200)] 
xgettext: Fix a report by an undefined-behaviour sanitizer.

Reported by Jeffrey Walton <noloader@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-01/msg00029.html>.

* gettext-tools/src/read-properties.c (read_escaped_string): Don't call memcpy
with a NULL argument.

5 years agoxgettext: Improve JSX support in JavaScript.
Bruno Haible [Mon, 6 Apr 2020 21:29:56 +0000 (23:29 +0200)] 
xgettext: Improve JSX support in JavaScript.

Reported by Vaclav Slavik <vaclav@slavik.io> in
<https://savannah.gnu.org/bugs/?57927>.

* gettext-tools/src/x-javascript.c (enum token_type_ty): Add some more types.
(is_after_expression): New function.
(phase5_get): Distinguish the "other" tokens in more detail. Use
'is_after_expression ()' when interpreting a '<' or '/' character.
(extract_balanced): Don't let commas in braced expressions and in XML elements
disturb the argument processing outside.
(extract_javascript): Update.
* gettext-tools/tests/xgettext-javascript-6: Enhance the test.
* NEWS: Mention the change.

5 years agoxgettext: Freshly initialize all static variables for each input file.
Bruno Haible [Mon, 6 Apr 2020 12:07:01 +0000 (14:07 +0200)] 
xgettext: Freshly initialize all static variables for each input file.

* gettext-tools/src/x-c.c (extract_whole_file): Initialize
phase1_pushback_length, phase2_pushback_length, phase3_pushback_length,
phase5_pushback_length, phase6_pushback_length.
* gettext-tools/src/x-csharp.c (extract_csharp): Initialize
phase1_pushback_length, phase2_pushback_length, phase3_pushback_length,
phase5_pushback_length, phase6_pushback_length, phase7_pushback_length.
* gettext-tools/src/x-java.c (extract_java): Initialize phase1_pushback_length,
phase2_pushback_length, phase3_pushback_length, phase5_pushback_length,
phase6_pushback_length.
* gettext-tools/src/x-javascript.c (continuation_or_nonblank_line,
last_token_type): Remove static initialization.
(extract_javascript): Initialize phase1_pushback_length, phase2_pushback_length,
phase5_pushback_length, last_token_type.
* gettext-tools/src/x-lua.c (first_character): Change type to 'bool'. Remove
static initialization.
(extract_lua): Initialize phase1_pushback_length, first_character,
phase3_pushback_length, phase4_last, phase4_pushback_length.
* gettext-tools/src/x-perl.c (extract_perl): Reorder initializations.
* gettext-tools/src/x-php.c (extract_php): Initialize phase1_pushback_length,
phase3_pushback_length, phase4_pushback_length.
* gettext-tools/src/x-python.c (continuation_or_nonblank_line): Remove static
initialization.
(extract_python): Initialize phase1_pushback_length, phase2_pushback_length,
phase5_pushback_length.
* gettext-tools/src/x-sh.c (extract_sh): Initialize phase1_pushback_length,
phase2_pushback_length.
* gettext-tools/src/x-smalltalk.c (extract_smalltalk): Initialize
phase2_pushback_length, phase3_pushback_length.
* gettext-tools/src/x-tcl.c (extract_tcl): Initialize phase1_pushback_length,
phase2_pushback_length.
* gettext-tools/src/x-vala.c (last_token_type): Remove static initialization.
(extract_vala): Initialize phase1_pushback_length, phase3_pushback_length,
last_token_type.
* gettext-tools/src/x-ycp.c (extract_ycp): Initialize phase2_pushback_length,
phase5_pushback_length, phase8_pushback_length.

5 years agopo, examples: In the .po -> .gmo rules, really consider the newest changes to the...
Bruno Haible [Sun, 5 Apr 2020 13:08:34 +0000 (15:08 +0200)] 
po, examples: In the .po -> .gmo rules, really consider the newest changes to the POT file.

Reported by Petr Ovtchenkov <ptr@void-ptr.info> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00000.html>.
Helped by Paul Smith.

* gettext-runtime/po/Makefile.in.in (.po.gmo): Write dependency on the POT file
as a target rule, since inference rules don't support prerequisites.
* gettext-tools/examples/hello-*/po/Makefile.am: Likewise, also for the .po.qm
rule.
* NEWS: Mention the fix.

5 years agoThe gettext library is under LGPL 2.1, not 2.0.
Bruno Haible [Sat, 4 Apr 2020 15:28:55 +0000 (17:28 +0200)] 
The gettext library is under LGPL 2.1, not 2.0.

* gettext-runtime/m4/intl.m4: Fix comments regarding the gettext library.
* gettext-runtime/m4/intlmacosx.m4: Likewise.
* gettext-runtime/m4/nls.m4: Likewise.
* gettext-runtime/m4/po.m4: Likewise.
* gettext-runtime/m4/progtest.m4: Likewise.

5 years agoThe next release will be 0.20.2, not 0.21.
Bruno Haible [Sat, 4 Apr 2020 15:27:24 +0000 (17:27 +0200)] 
The next release will be 0.20.2, not 0.21.

* gettext-runtime/m4/gettext.m4: Update header comment.
* gettext-runtime/m4/intdiv0.m4: Likewise.
* gettext-tools/m4/exported.m4: Likewise.

5 years agodoc: Don't recommend to use the reserved identifier '_' in Java.
Bruno Haible [Sun, 29 Mar 2020 19:03:50 +0000 (21:03 +0200)] 
doc: Don't recommend to use the reserved identifier '_' in Java.

Reported by Akim Demaille <akim.demaille@gmail.com>.

* gettext-tools/doc/gettext.texi (Java): Use i18n instead _ as magic identifier.

5 years agoUpdate after gnulib changed.
Bruno Haible [Sat, 28 Mar 2020 19:03:44 +0000 (20:03 +0100)] 
Update after gnulib changed.

* gnulib-local/lib/regex_internal.h.diff: Update.
* gnulib-local/lib/unistd.in.h.diff: Update.
* gettext-runtime/intl/filename.h: New file, from gnulib.
* gettext-runtime/intl/dcigettext.c (ISSLASH, HAS_DEVICE, IS_ABSOLUTE_PATH,
IS_PATH_WITH_DIR): Remove macros. Instead, include filename.h.
(IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME, IS_FILE_NAME_WITH_DIR): New
macros.
(DCIGETTEXT): Use IS_RELATIVE_FILE_NAME, IS_FILE_NAME_WITH_DIR.
* gettext-runtime/intl/l10nflist.c (ISSLASH, HAS_DEVICE, IS_ABSOLUTE_PATH):
Remove macros. Instead, include filename.h.
(IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
(_nl_make_l10nflist): Use IS_RELATIVE_FILE_NAME.
* gettext-runtime/intl/Makefile.am (EXTRA_DIST): Add filename.h.
(l10nflist.lo, dcigettext.lo): Depend on it.
* Makefile.am (distcheck-hook): Check also gettext-runtime/intl/filename.h.
* gettext-runtime/intl/lock.c: Update from gnulib.
* gettext-runtime/intl/lock.h: Likewise.
* gettext-runtime/intl/relocatable.c: Likewise.
* gettext-tools/src/locating-rule.c (locating_rule_list_locate): Use
IS_RELATIVE_FILE_NAME instead of IS_ABSOLUTE_PATH.
* gettext-tools/src/open-catalog.c (try_open_catalog_file): Likewise.
* gettext-tools/src/xgettext.c (main, xgettext_open): Likewise.
* libtextstyle/lib/color.c (style_file_lookup): Use IS_FILE_NAME_WITH_DIR
instead of IS_PATH_WITH_DIR.