]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
6 years agodoc: Don't need an ar_SA locale.
Bruno Haible [Fri, 4 Oct 2019 20:02:46 +0000 (22:02 +0200)] 
doc: Don't need an ar_SA locale.

* HACKING: Remove command that creates an ar_SA locale.

6 years agodoc: Update list of external dependencies.
Bruno Haible [Fri, 4 Oct 2019 18:22:33 +0000 (20:22 +0200)] 
doc: Update list of external dependencies.

* DEPENDENCIES: Don't list glib2 and libcroco (not needed any more since
2019-02-15).

6 years agobuild: Fix the build error in gettext-tools/examples/po.
Bruno Haible [Fri, 4 Oct 2019 15:59:22 +0000 (17:59 +0200)] 
build: Fix the build error in gettext-tools/examples/po.

Reported by Nick Alcock <nix@esperi.org.uk>
at <https://savannah.gnu.org/bugs/?56529>.

* gettext-tools/examples/po/Makefile.am (USE_BUILT_PROGS): New variable.
(hello-*.pot): Use it.
($(srcdir)/../hello-*/po/$(LL).po): Likewise.
* HACKING: Remove the workaround.

6 years agoMake it easier to build the code when the documentation tools don't work.
Bruno Haible [Fri, 4 Oct 2019 15:26:08 +0000 (17:26 +0200)] 
Make it easier to build the code when the documentation tools don't work.

* libtextstyle/Makefile.am (SUBDIRS): Move 'doc' to the end.

6 years agolibxml: Simplify autoconf macro.
Bruno Haible [Fri, 4 Oct 2019 11:20:12 +0000 (13:20 +0200)] 
libxml: Simplify autoconf macro.

* gnulib-local/m4/libxml.m4 (gl_LIBXML): Don't test for dlopen and shlload.
The test for dlopen failed, because it would require linking with '-ldl'.
The test for shlload failed, because the function on HP-UX is called 'shl_load'
and it would require linking with '-ldld'.

6 years agobuild: Don't fetch gnulib a second time in libtextstyle.
Bruno Haible [Fri, 4 Oct 2019 09:47:18 +0000 (11:47 +0200)] 
build: Don't fetch gnulib a second time in libtextstyle.

* autogen.sh: Set GNULIB_SRCDIR when invoking libtextstyle/autogen.sh.
* libtextstyle/autogen.sh: Remove all git operations. Look at the GNULIB_SRCDIR
environment variable. Ignore the GNULIB_TOOL environment variable.

6 years agolibtextstyle: Fix failure to download texinfo.tex.
Bruno Haible [Fri, 4 Oct 2019 09:36:40 +0000 (11:36 +0200)] 
libtextstyle: Fix failure to download texinfo.tex.

* libtextstyle/autogen.sh: Create build-aux directory.

6 years agoUpdate NEWS file.
Bruno Haible [Sun, 29 Sep 2019 22:07:30 +0000 (00:07 +0200)] 
Update NEWS file.

* NEWS: Include the news about libtextstyle.

6 years agoxgettext: Signal a warning when the same msgid is used with and without plural.
Bruno Haible [Sun, 29 Sep 2019 18:52:48 +0000 (20:52 +0200)] 
xgettext: Signal a warning when the same msgid is used with and without plural.

* gettext-tools/src/xg-message.h (remember_a_message): Add pluralp argument.
* gettext-tools/src/xg-message.c (remember_a_message): Likewise. Signal a
warning when the same msgid is used with and without plural.
* gettext-tools/src/xg-arglist-parser.c (arglist_parser_done): Update
remember_a_message invocation.
* gettext-tools/src/xgettext.c (xgettext_its_extract_callback): Update
remember_a_message invocations.
* gettext-tools/src/x-awk.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-c.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-csharp.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-desktop.c (extract_desktop_handle_pair): Likewise.
* gettext-tools/src/x-elisp.c (read_object): Likewise.
* gettext-tools/src/x-java.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-javascript.c (extract_balanced): Likewise.
* gettext-tools/src/x-librep.c (read_object): Likewise.
* gettext-tools/src/x-lisp.c (read_object): Likewise.
* gettext-tools/src/x-lua.c (extract_balanced): Likewise.
* gettext-tools/src/x-perl.c (extract_variable, interpolate_keywords,
extract_balanced): Likewise.
* gettext-tools/src/x-php.c (extract_balanced): Likewise.
* gettext-tools/src/x-python.c (extract_balanced): Likewise.
* gettext-tools/src/x-rst.c (extract_rst, extract_rsj): Likewise.
* gettext-tools/src/x-scheme.c (read_object): Likewise.
* gettext-tools/src/x-sh.c (read_word, read_command): Likewise.
* gettext-tools/src/x-tcl.c (read_command): Likewise.
* gettext-tools/src/x-vala.c (extract_balanced): Likewise.
* gettext-tools/src/x-smalltalk.c (phase3_pushback, phase3_pushback_length): New
variables.
(phase3_get): Renamed from x_smalltalk_lex. Handle pushback.
(phase3_unget): New function.
(extract_smalltalk): Update remember_a_message invocations through a lookahead
of one token.
* gettext-tools/src/x-ycp.c (phase8_pushback, phase8_pushback_length): New
variables.
(phase8_get): Handle pushback.
(phase8_unget): New function.
(extract_parenthesized): Update remember_a_message invocations through a
lookahead of one token.
* gettext-tools/tests/xgettext-15: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

6 years agomsgcat: Signal error when the same msgid is used with and without msgid_plural.
Bruno Haible [Sun, 29 Sep 2019 18:20:36 +0000 (20:20 +0200)] 
msgcat: Signal error when the same msgid is used with and without msgid_plural.

Suggested by Mikko Rantalainen <mikko.rantalainen@peda.net>
in <https://lists.gnu.org/archive/html/bug-gettext/2019-09/msg00020.html>.

* gettext-tools/src/msgl-cat.c (catenate_msgdomain_list): Signal an error when
the same msgid is used with and without msgid_plural.
* gettext-tools/src/msgcat.c (main): Exit with failure code if there was an
error.
* gettext-tools/src/msgcomm.c (main): Likewise.
* gettext-tools/src/msguniq.c (main): Likewise.
* gettext-tools/tests/msgcat-21: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

6 years agolibxml: Fix buffer overrun.
Bruno Haible [Sun, 29 Sep 2019 14:50:15 +0000 (16:50 +0200)] 
libxml: Fix buffer overrun.

Reported by GCC 8 -Wformat-truncation warning.

* gnulib-local/lib/libxml/parser.c (xmlParseReference): Increase size of buffer
'out' to 12 bytes.

6 years agoxgettext: Fix parsing of XML tags.
Bruno Haible [Sun, 29 Sep 2019 12:35:37 +0000 (14:35 +0200)] 
xgettext: Fix parsing of XML tags.

* gettext-tools/src/x-javascript.c (phase5_get): Fix lexical_context after
decrementing xml_element_depth.

6 years agoxgettext: Fix parsing of XML tags that end in /> and have attributes.
Bruno Haible [Sun, 29 Sep 2019 12:29:41 +0000 (14:29 +0200)] 
xgettext: Fix parsing of XML tags that end in /> and have attributes.

Reported by Matej Marusak <marusak.matej@gmail.com>
in <https://savannah.gnu.org/bugs/?56848>.

* gettext-tools/src/x-javascript.c (phase5_get): After reading a string, reset
the lexical_context to the previous one, not to lc_outside. When reading /> at
the end of an XML element, decrement xml_element_depth.
* gettext-tools/tests/xgettext-javascript-6: Add a test.

6 years agoxgettext: Recognize text blocks in Java parser.
Bruno Haible [Sun, 29 Sep 2019 10:58:09 +0000 (12:58 +0200)] 
xgettext: Recognize text blocks in Java parser.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add
unictype/syntax-java-whitespace.
* gettext-tools/src/x-java.c: Include unictype.h.
(strip_indent): New function.
(phase5_get): Parse text blocks (Java 13 syntax).
* gettext-tools/tests/xgettext-java-2: Add tests of text blocks.
* gettext-tools/doc/gettext.texi (Java): Mention the text block syntax.
* NEWS: Mention the change.

6 years agoxgettext: Verify parsing of JavaScript template literals inside objects.
Bruno Haible [Sun, 29 Sep 2019 08:54:32 +0000 (10:54 +0200)] 
xgettext: Verify parsing of JavaScript template literals inside objects.

Reported by Andy Holmes <andrew.g.r.holmes@gmail.com>
in <https://savannah.gnu.org/bugs/?50920>.

* gettext-tools/tests/xgettext-javascript-7: Test template literals inside an
object.

6 years agoxgettext: Recognize 'env' and assignments in Shell scripts.
Bruno Haible [Mon, 16 Sep 2019 00:47:44 +0000 (02:47 +0200)] 
xgettext: Recognize 'env' and assignments in Shell scripts.

Reported by Jason Vas Dias <jason.vas.dias@gmail.com>
in <https://lists.gnu.org/archive/html/bug-gettext/2019-08/msg00032.html>.

* gettext-tools/src/x-sh.c (enum word_type): Add t_assignment.
(read_word): Recognize assignments.
(read_command): In a function position, ignore assignments and 'env' tokens.
* gettext-tools/tests/xgettext-sh-7: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
* NEWS: Mention the change.

6 years agoDocument improvement done on 2019-05-20.
Bruno Haible [Sun, 15 Sep 2019 23:45:20 +0000 (01:45 +0200)] 
Document improvement done on 2019-05-20.

* gettext-runtime/NEWS: Document improvement.
* NEWS: Likewise.

6 years agobuild: Install gettext.h with the LGPL license header, not with the GPL header.
Bruno Haible [Sat, 14 Sep 2019 13:25:36 +0000 (15:25 +0200)] 
build: Install gettext.h with the LGPL license header, not with the GPL header.

Reported by Joachim Metz <joachim.metz@gmail.com>
in <https://lists.gnu.org/archive/html/bug-gettext/2012-09/msg00000.html>.

* gettext-tools/gnulib-lib/Makefile.am (gettextsrcdir, gettextsrc_DATA): Remove
variables.
* gnulib-local/Makefile.am (gettextsrcdir, gettextsrc_DATA): Define them here.

6 years agoClarify license of gettext.m4.
Bruno Haible [Sat, 14 Sep 2019 13:20:21 +0000 (15:20 +0200)] 
Clarify license of gettext.m4.

* gettext-runtime/m4/gettext.m4: Update comments: libintl is under LGPLv2.1+.

6 years agobuild: Avoid failing a configure test due to CFLAGS="-Werror".
Bruno Haible [Sat, 14 Sep 2019 11:30:24 +0000 (13:30 +0200)] 
build: Avoid failing a configure test due to CFLAGS="-Werror".

Reported by Florian Weimer <fweimer@redhat.com>.

* gettext-runtime/m4/intdiv0.m4 (gt_INTDIV0): In the test program, include
<unistd.h>, for the declaration of _exit().

6 years agobuild: Add support for shallow-cloning of subdirectories.
Bruno Haible [Sun, 1 Sep 2019 15:51:31 +0000 (17:51 +0200)] 
build: Add support for shallow-cloning of subdirectories.

* gitsub.sh (func_usage): Document allowed git options with 'git pull'.
(func_pull): Accept GIT_OPTIONS argument.
(pull): Parse git options before complaining about too many arguments.
Pass the git options to func_pull.

6 years agoxgettext: Assume that Python source files are in UTF-8 by default.
Bruno Haible [Sun, 25 Aug 2019 21:37:44 +0000 (23:37 +0200)] 
xgettext: Assume that Python source files are in UTF-8 by default.

Reported by ilias iliadis <apiuano-bugs@yahoo.gr>
at <https://savannah.gnu.org/bugs/?55231>.

* gettext-tools/src/xg-encoding.h (xgettext_global_source_encoding): Allow a
NULL value.
* gettext-tools/src/xg-encoding.c (xgettext_global_source_encoding): Likewise.
* gettext-tools/src/xgettext.c (main): Initialize
xgettext_global_source_encoding with NULL, not "ASCII". Handle a NULL
xgettext_global_source_encoding.
(extract_from_file): Use ASCII as default for xgettext_global_source_encoding.
* gettext-tools/src/x-javascript.c (extract_javascript): Likewise.
* gettext-tools/src/x-python.c (phase2_getc): Signal an error when encountering
an invalid or incomplete UTF-8 character.
(set_current_file_source_encoding): In the error message, use
xgettext_current_file_source_encoding instead of
xgettext_global_source_encoding.
(extract_python): Use UTF-8 as default for xgettext_global_source_encoding.
* gettext-tools/tests/xgettext-python-3: Verify that if the source file has no
magic coding comment but is UTF-8 encoded, xgettext succeeds.
* NEWS: Mention the change.

6 years agoAdd support for Java format strings in the Formatter syntax.
Bruno Haible [Sun, 25 Aug 2019 17:17:21 +0000 (19:17 +0200)] 
Add support for Java format strings in the Formatter syntax.

* gettext-tools/src/message.h (format_type): Add format_java_printf.
(NFORMATS): Increment.
* gettext-tools/src/message.c (format_language, format_language_pretty): Add
entry for format_java_printf.
* gettext-tools/src/format.h (formatstring_java_printf): New declaration.
* gettext-tools/src/format-java.c: Update comments.
* gettext-tools/src/format-java-printf.c: New file.
* gettext-tools/src/format.c (formatstring_parsers): Add entry for
format_java_printf.
* gettext-tools/src/x-java.h (SCANNERS_JAVA): Use formatstring_java_printf.
* gettext-tools/src/x-java.c (init_flag_table_java): Add entries relevant to
format strings in Formatter syntax.
* gettext-tools/src/xgettext.c (xgettext_record_flag): Add support for
format_java_printf.
* gettext-tools/src/FILES: Add format-java-printf.c.
* gettext-tools/src/Makefile.am (FORMAT_SOURCE): Add format-java-printf.c.
* gettext-tools/woe32dll/gettextsrc-exports.c: Export formatstring_java_printf.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Likewise.
* gettext-tools/tests/xgettext-6 (xg-test6.java): Add test for recognition of
format strings in Formatter syntax.
* gettext-tools/tests/format-java-printf-1: New file.
* gettext-tools/tests/format-java-printf-2: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
* gettext-tools/tests/lang-java: Add two uses of String.format to the program.
* gettext-tools/doc/gettext.texi (PO Files): Document java-printf-format and
no-java-printf-format.
(java-format): Describe both kinds of format strings. Update URLs.
(Java): Mention the second kind of format string as well.
* NEWS: Mention the improvement.

6 years agotests: Remove comments about GCJ.
Bruno Haible [Sun, 25 Aug 2019 17:00:26 +0000 (19:00 +0200)] 
tests: Remove comments about GCJ.

We don't support GCJ any more since 2017-05-04.

* gettext-tools/tests/lang-java: Remove comment about failure with GCJ.
* gettext-tools/tests/msgunfmt-java-1: Likewise.

6 years agoUpdate compile-command in comments.
Bruno Haible [Sun, 25 Aug 2019 14:21:09 +0000 (16:21 +0200)] 
Update compile-command in comments.

* gettext-tools/src/format-*.c: Fix -I options in compile-command.

6 years agodesktop: Small parser fix.
Bruno Haible [Sun, 25 Aug 2019 09:46:48 +0000 (11:46 +0200)] 
desktop: Small parser fix.

* gettext-tools/src/read-desktop.c (desktop_lex): Fix handling of control
characters in group names.

6 years agocode style: Avoid gratuitous 'continue;' statements.
Bruno Haible [Sun, 25 Aug 2019 09:38:22 +0000 (11:38 +0200)] 
code style: Avoid gratuitous 'continue;' statements.

* gettext-tools/src/file-list.c (read_names_from_file): Use 'if' instead of
'continue'.
* gettext-tools/src/its.c (its_rule_list_add_from_doc): Likewise.
* gettext-tools/src/locating-rule.c (locating_rule_list_add_from_file):
Likewise.
* gettext-tools/src/msgfmt.c (get_languages): Likewise.
* gettext-tools/src/x-javascript.c (phase5_scan_xml_markup): Likewise.
* gettext-tools/src/x-lua.c (phase2_getc): Likewise.
* gettext-tools/src/read-desktop.c (desktop_lex): Use 'if' instead of 'switch'
with few alternatives. Test for EOF first.

6 years agoautogen.sh: Make more reliable.
Bruno Haible [Sat, 24 Aug 2019 17:25:06 +0000 (19:25 +0200)] 
autogen.sh: Make more reliable.

* autogen.sh: Really bail out if gnulib-tool fails to copy config.{guess,sub}.

6 years agoxgettext: Handle newlines in Lua long bracket literal strings correctly.
Bruno Haible [Thu, 22 Aug 2019 14:36:59 +0000 (16:36 +0200)] 
xgettext: Handle newlines in Lua long bracket literal strings correctly.

Reported by Frans de Jonge <fransdejonge@gmail.com>
at <https://savannah.gnu.org/bugs/?56794>.

* gettext-tools/src/x-lua.c (phase3_get): Test for EOF first. After an opening
long bracket, swallow one newline.
* gettext-tools/tests/xgettext-lua-1: Add tests for newlines in long brackets.
* gettext-tools/tests/xgettext-lua-2: Update comment.

6 years agoxgettext: Recognize gettext -e invocations in shell parser.
Bruno Haible [Mon, 19 Aug 2019 08:52:36 +0000 (10:52 +0200)] 
xgettext: Recognize gettext -e invocations in shell parser.

Reported by Eugene V. Lyubimkin <jackyf.devel@gmail.com>
in <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507091>.

* gettext-runtime/src/escapes.h: New file, extracted from
gettext-runtime/src/gettext.c.
* gettext-runtime/src/gettext.c: Include escapes.h.
(expand_escape): Remove function.
(inhibit_added_newline): New variable.
(add_newline): Remove variable.
(main): Initialize inhibit_added_newline. Invoke expand_escapes instead of
expand_escape.
* gettext-runtime/src/ngettext.c: Include escapes.h.
(expand_escape): Remove function.
(main): Invoke expand_escapes instead of expand_escape.
* gettext-runtime/src/Makefile.am (gettext_SOURCES, ngettext_SOURCES): Add
escapes.h.
* gettext-tools/tests/tstgettext.c: Include escapes.h.
(expand_escape): Remove function.
(inhibit_added_newline): New variable.
(add_newline): Remove variable.
(main): Initialize inhibit_added_newline. Invoke expand_escapes instead of
expand_escape.
* gettext-tools/tests/Makefile.am (tstgettext_SOURCES): Add escapes.h.
* gettext-tools/src/x-sh.c: Include escapes.h.
(read_command): Recognize a '-e' option in the argument list of gettext and
ngettext.
* gettext-tools/src/Makefile.am (xgettext_SOURCES): Add escapes.h.
* gettext-tools/tests/xgettext-sh-1: Test the recognition of gettext -e
arguments.
* NEWS: Mention the change.

6 years agodoc: Fix documentation of gettext, ngettext programs.
Bruno Haible [Mon, 19 Aug 2019 08:24:30 +0000 (10:24 +0200)] 
doc: Fix documentation of gettext, ngettext programs.

* gettext-runtime/doc/rt-gettext.texi: Clarify when the additional newline is
emitted.
* gettext-runtime/doc/rt-ngettext.texi: Remove '\c' from the list of recognized
escape sequences.

6 years agoUpdate after gnulib changed.
Bruno Haible [Mon, 19 Aug 2019 02:10:38 +0000 (04:10 +0200)] 
Update after gnulib changed.

* gettext-runtime/intl/localcharset.c: Update from gnulib.
* gettext-runtime/intl/verify.h: Likewise.

6 years agogettext, ngettext: Fix the expansion of '\\' and octal escape sequences.
Bruno Haible [Mon, 19 Aug 2019 00:16:43 +0000 (02:16 +0200)] 
gettext, ngettext: Fix the expansion of '\\' and octal escape sequences.

* gettext-runtime/src/gettext.c (expand_escape): Don't swallow the expansion
of '\\' and octal escape sequences.
* gettext-runtime/src/ngettext.c (expand_escape): Likewise.
* gettext-tools/tests/tstgettext.c (expand_escape): Likewise.
* NEWS: Mention the change.

6 years agoxgettext: Fix parsing of escaped single-quote characters in shell parser.
Bruno Haible [Sun, 18 Aug 2019 23:34:34 +0000 (01:34 +0200)] 
xgettext: Fix parsing of escaped single-quote characters in shell parser.

Reported by Markus Gothe <nietzsche@lysator.liu.se>
at <https://savannah.gnu.org/bugs/?49809>.

* gettext-tools/src/x-sh.c (phase2_getc): Handle the case c == '\''
&& !open_singlequote && !open_doublequote differently.
* gettext-tools/tests/xgettext-sh-1: Add test with an escape single-quote.

6 years agoxgettext: Fix endless loop in shell parser.
Bruno Haible [Sun, 18 Aug 2019 23:02:26 +0000 (01:02 +0200)] 
xgettext: Fix endless loop in shell parser.

Reported by Hanno Boeck at <https://savannah.gnu.org/bugs/?45408>.
Based on patch by Daiki Ueno.

* gettext-tools/src/x-sh.c (read_word): React on CLOSING_BACKQUOTE even when we
are currently not looking for a closing backquote.

6 years agobuild: Don't use an obsolete libtool macro.
Bruno Haible [Sun, 18 Aug 2019 15:06:49 +0000 (17:06 +0200)] 
build: Don't use an obsolete libtool macro.

* gettext-tools/m4/exported.m4 (gt_GLOBAL_SYMBOL_PIPE): Require
_LT_CMD_GLOBAL_SYMBOLS, not AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE.

6 years agoUpdate to the newest gnulib.
Bruno Haible [Sun, 18 Aug 2019 14:15:30 +0000 (16:15 +0200)] 
Update to the newest gnulib.

6 years agolibtextstyle: Fix VPATH build (regression from yesterday).
Bruno Haible [Sun, 18 Aug 2019 14:40:51 +0000 (16:40 +0200)] 
libtextstyle: Fix VPATH build (regression from yesterday).

* libtextstyle/lib/Makefile.am (AM_CPPFLAGS): Search also the glib subdirectory
of the build dir.

6 years agoDon't extract Icon values from .desktop files into POT files.
Bruno Haible [Sun, 18 Aug 2019 11:27:30 +0000 (13:27 +0200)] 
Don't extract Icon values from .desktop files into POT files.

Reported by Piotr Drąg <piotrdrag@gmail.com>
at <https://savannah.gnu.org/support/?108887>
and by Will Thompson <wjt@endlessm.com>
at <https://savannah.gnu.org/bugs/?56543>.

There was a discussion starting at
<https://lists.freedesktop.org/archives/xdg/2019-June/014158.html>.
The most interesting posts in this thread were
<https://lists.freedesktop.org/archives/xdg/2019-June/014164.html>
<https://lists.freedesktop.org/archives/xdg/2019-June/014167.html>.

* gettext-tools/doc/gettext.texi (Icons): New subsubsection.
* gettext-tools/src/read-desktop.c (desktop_add_default_keywords): Don't add
"Icon".
* gettext-tools/src/x-desktop.c: Update comments.
* gettext-tools/doc/xgettext.texi (Desktop): Remove 'Icon' from the list of
extracted keys.
* gettext-tools/tests/xgettext-desktop-2: New file.
* gettext-tools/tests/msgfmt-desktop-3: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
* NEWS: Mention the change.

6 years agomaint: Document how to deal with the build error in gettext-tools/examples/po.
Bruno Haible [Sun, 18 Aug 2019 08:59:40 +0000 (10:59 +0200)] 
maint: Document how to deal with the build error in gettext-tools/examples/po.

Reported by Nick Alcock <nix@esperi.org.uk>
at <https://savannah.gnu.org/bugs/?56529>.

* HACKING (Building off the Git repository): Explain the common build error and
how to fix it.

6 years agolibtextstyle: Upgrade to libcroco-0.6.13.
Bruno Haible [Tue, 21 May 2019 01:29:55 +0000 (03:29 +0200)] 
libtextstyle: Upgrade to libcroco-0.6.13.

This fixes a couple of warnings.

Reported by Frank Hunleth <fhunleth@troodon-software.com>
at <https://savannah.gnu.org/bugs/?55356>.

* libtextstyle/gnulib-local/lib/libcroco/*: Upgrade to version 0.6.13.
* libtextstyle/gnulib-local/modules/libcroco: Update.
* libtextstyle/gnulib-local/lib/glib/gmacros.in.h: New file, based on
glib-2.12.4/glib/gmacros.h.
* libtextstyle/gnulib-local/lib/glib/gprintfint.in.h: New file, based on
glib-2.12.4/glib/gprintfint.h.
* libtextstyle/Makefile.am (EXTRA_DIST): Add them.
* libtextstyle/gnulib-local/m4/libglib.m4 (gl_LIBGLIB): Add glib/gmacros.h and
glib/gprintfint.h to LIBGLIB_H.
* libtextstyle/gnulib-local/modules/libglib (Files): Add lib/glib/gmacros.in.h,
lib/glib/gprintfint.in.h.
(Depends-on): Add snprintf-posix.
(glib/gmacros.h, glib/gprintfint.h): New rules.
(MOSTLYCLEANFILES): Add glib/gmacros.h, glib/gprintfint.h.
* libtextstyle/gnulib-local/lib/glib.in.h: Include glib/gmacros.h.
* libtextstyle/gnulib-local/lib/glib/gstrfuncs.in.h (g_ascii_dtostr,
g_ascii_formatd, g_ascii_strcasecmp): Enable declarations.
* libtextstyle/gnulib-local/lib/glib/gstrfuncs.c: Include gprintfint.h.
(g_ascii_dtostr, g_ascii_formatd): Enable.
(ISSPACE, ISUPPER, ISLOWER, ISALPHA, TOUPPER, TOLOWER): Move out of function
g_parse_long_long.
(g_ascii_strcasecmp): Enable.

6 years agolibtextstyle: Document the hyperlink support.
Bruno Haible [Wed, 14 Aug 2019 18:52:35 +0000 (20:52 +0200)] 
libtextstyle: Document the hyperlink support.

* libtextstyle/doc/libtextstyle.texi (The NO_TERM_HYPERLINKS variable): New
section.
(Hyperlinks): New subsection.
(The abstract styled_ostream class): Document styled_ostream_get_hyperlink_ref,
styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink.
(The term_ostream class): Document term_ostream_get_hyperlink_ref,
term_ostream_get_hyperlink_id, term_ostream_set_hyperlink.
(The html_ostream class): Document html_ostream_get_hyperlink_ref,
html_ostream_set_hyperlink_ref.
* libtextstyle/NEWS: Mention it.

6 years agolibtextstyle: styled-ostream: Add hyperlink support.
Bruno Haible [Wed, 14 Aug 2019 18:52:30 +0000 (20:52 +0200)] 
libtextstyle: styled-ostream: Add hyperlink support.

* libtextstyle/gnulib-local/lib/styled-ostream.oo.h (struct styled_ostream): Add
methods get_hyperlink_ref, get_hyperlink_id, set_hyperlink.
* libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c
(term_styled_ostream::get_hyperlink_ref, term_styled_ostream::get_hyperlink_id,
term_styled_ostream::set_hyperlink): New functions.
* libtextstyle/gnulib-local/lib/html-styled-ostream.oo.c
(struct html_styled_ostream): Add field hyperlink_id.
(html_styled_ostream::free): Free the hyperlink_id field.
(html_styled_ostream::get_hyperlink_ref, html_styled_ostream::get_hyperlink_id,
html_styled_ostream::set_hyperlink): New functions.
(html_styled_ostream_create): Initialize the hyperlink_id field.
* libtextstyle/gnulib-local/lib/noop-styled-ostream.oo.c
(struct noop_styled_ostream): Add fields hyperlink_ref, hyperlink_id.
(noop_styled_ostream::free): Free the hyperlink_ref and hyperlink_id fields.
(noop_styled_ostream::get_hyperlink_ref, noop_styled_ostream::get_hyperlink_id,
noop_styled_ostream::set_hyperlink): New functions.
(noop_styled_ostream_create): Initialize the hyperlink_ref and hyperlink_id
fields.
* libtextstyle/lib/textstyle.h (styled_ostream_get_hyperlink_ref,
styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
term_styled_ostream_get_hyperlink_ref, term_styled_ostream_get_hyperlink_id,
term_styled_ostream_set_hyperlink, html_styled_ostream_get_hyperlink_ref,
html_styled_ostream_get_hyperlink_id, html_styled_ostream_set_hyperlink,
noop_styled_ostream_get_hyperlink_ref, noop_styled_ostream_get_hyperlink_id,
noop_styled_ostream_set_hyperlink): New declarations.
* libtextstyle/adhoc-tests/hello.c (main): Invoke styled_ostream_set_hyperlink.

6 years agolibtextstyle: html-ostream: Add hyperlink support.
Bruno Haible [Wed, 14 Aug 2019 18:52:25 +0000 (20:52 +0200)] 
libtextstyle: html-ostream: Add hyperlink support.

* libtextstyle/gnulib-local/lib/html-ostream.oo.h (struct html_ostream): Add
methods get_hyperlink_ref, set_hyperlink_ref.
* libtextstyle/gnulib-local/lib/html-ostream.oo.c (struct html_ostream): Add
field hyperlink_ref;
(write_attribute_value): New function.
(html_ostream::free): Emit an anchor end if needed.
(html_ostream::get_hyperlink_ref, html_ostream::set_hyperlink_ref): New
functions.
(html_ostream_create): Initialize the hyperlink_ref field.
* libtextstyle/lib/textstyle.h (html_ostream_get_hyperlink_ref,
html_ostream_set_hyperlink_ref): New declarations.

6 years agolibtextstyle: term-ostream: Add hyperlink support.
Bruno Haible [Wed, 14 Aug 2019 18:52:21 +0000 (20:52 +0200)] 
libtextstyle: term-ostream: Add hyperlink support.

* libtextstyle/gnulib-local/lib/term-ostream.oo.h (struct term_ostream): Add
methods get_hyperlink_ref, get_hyperlink_id, set_hyperlink.
* libtextstyle/gnulib-local/lib/term-ostream.oo.c: Include <stdint.h>,
<sys/time.h>, get_ppid_of.h, get_progname_of.h, xgethostname.h.
(hyperlink_t): New type.
(free_hyperlink): New function.
(attributes_t): Add 'hyperlink' field.
(equal_attributes): Compare also the 'hyperlink' field.
(struct term_ostream): Add fields supports_hyperlink, restore_hyperlink,
hostname_hash, start_time, id_serial, hyperlinks_array, hyperlinks_count,
hyperlinks_allocated, active_attr_hyperlink.
(simplify_attributes): Deal with 'hyperlink' field.
(generate_hyperlink_id): New function.
(out_hyperlink_change): New function.
(out_attr_change): Set active_attr_hyperlink. Invoke out_hyperlink_change.
(restore, async_restore): Use stream->restore_hyperlink.
(async_set_attributes_from_default): Invoke out_hyperlink_change.
(output_buffer): At the end, free the unused hyperlink_t objects.
(term_ostream::free): Free the hyperlinks_array and its contents.
(term_ostream::get_hyperlink_ref, term_ostream::get_hyperlink_id,
term_ostream::set_hyperlink): New functions.
(get_terminal_emulator_progname, should_enable_hyperlinks): New functions.
(term_ostream_create): Set the fields supports_hyperlink, restore_hyperlink,
hostname_hash, start_time, id_serial, hyperlinks_array, hyperlinks_count,
hyperlinks_allocated.
* libtextstyle/gnulib-local/m4/term-ostream.m4 (gl_TERM_OSTREAM): Test for
getsid function.
* libtextstyle/gnulib-local/modules/term-ostream (Depends-on): Add gettimeofday,
get_ppid_of, get_progname_of, stdint, xgethostname.
* libtextstyle/lib/textstyle.h (term_ostream_get_hyperlink_ref,
term_ostream_get_hyperlink_id, term_ostream_set_hyperlink): New declarations.

6 years agoUpdate to the newest gnulib.
Bruno Haible [Wed, 14 Aug 2019 18:50:30 +0000 (20:50 +0200)] 
Update to the newest gnulib.

6 years agolibtextstyle: Support the NO_COLOR environment variable.
Bruno Haible [Wed, 14 Aug 2019 00:46:36 +0000 (02:46 +0200)] 
libtextstyle: Support the NO_COLOR environment variable.

It follows the specification at https://no-color.org/.

The support is in the example programs, not in the function
styled_ostream_create, so that it can be overridden through the command-line
option --color=always.

We only test whether the environment variable is set, not whether its value
is non-empty. POSIX-specified environment variables are treated like unset
when their value is empty; this is because in the old days it was not possible
to unset an environment variable. But nowadays:
  - all shells support the 'unset' built-in,
  - all platforms that have the setenv() function also have the unsetenv()
    function, and
  - the 'env' program from GNU coreutils supports --unset=VARIABLE to unset a
    variable.
This makes it possible to unset an environment variable that is set by the
parent process.

* libtextstyle/adhoc-tests/hello.c (main): Do not emit styling when the
environment variable NO_COLOR is set.
* libtextstyle/examples/color-filter/filter.c (main): Likewise.
* libtextstyle/examples/color-hello/hello.c (main): Likewise.
* gettext-tools/src/write-catalog.c (msgdomain_list_print): Likewise.
* libtextstyle/doc/libtextstyle.texi (The NO_COLOR variable): New section.
* libtextstyle/NEWS: Mention it.

6 years agoxalloc: Add x2realloc function, from gnulib.
Bruno Haible [Mon, 12 Aug 2019 01:31:49 +0000 (03:31 +0200)] 
xalloc: Add x2realloc function, from gnulib.

* gnulib-local/lib/xalloc.h (x2realloc): New declaration, from
gnulib/lib/xalloc.h.
* gnulib-local/lib/xmalloc.c (x2nrealloc): New function, from
gnulib/lib/xalloc.h.
(x2realloc): New function, from gnulib/lib/xmalloc.c.
* gnulib-local/modules/xalloc (configure.ac): Require AC_C_INLINE.

6 years agoDrop our xalloc_oversized macro in favour of gnulib's xalloc_oversized macro.
Bruno Haible [Mon, 12 Aug 2019 01:05:48 +0000 (03:05 +0200)] 
Drop our xalloc_oversized macro in favour of gnulib's xalloc_oversized macro.

* gnulib-local/lib/xalloc.h: Include xalloc-oversized.h.
(xalloc_oversized): Remove macro.
* gnulib-local/modules/xalloc (Depends-on): Add 'xalloc-oversized'.

6 years agoxgettext: Fix parsing of JavaScript template literals inside functions.
Bruno Haible [Sun, 28 Jul 2019 17:21:32 +0000 (19:21 +0200)] 
xgettext: Fix parsing of JavaScript template literals inside functions.

Reported by Dmitry Vinnik <vinnik.dmitry07@gmail.com>
in <https://savannah.gnu.org/bugs/?56678>.

* gettext-tools/src/x-javascript.c (brace_depths, brace_depths_alloc): New
variables.
(brace_depth): Remove variable.
(new_brace_depth_level): New function.
(phase5_get): Invoke it. Access the top of the brace_depths stack.
(extract_javascript): Don't set brace_depth. Invoke new_brace_depth_level
instead.
* gettext-tools/tests/xgettext-javascript-7: Test template literals inside a
function.

6 years agoUpdate to the newest gnulib.
Bruno Haible [Sun, 28 Jul 2019 15:35:48 +0000 (17:35 +0200)] 
Update to the newest gnulib.

6 years agoFix test failure on MSVC.
Bruno Haible [Sat, 20 Jul 2019 12:32:33 +0000 (14:32 +0200)] 
Fix test failure on MSVC.

* gettext-tools/tests/lang-c++: On MSVC, use <iostream>, not <iostream.h>.

6 years agoUpdate after gnulib changed.
Bruno Haible [Sat, 20 Jul 2019 12:25:21 +0000 (14:25 +0200)] 
Update after gnulib changed.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES): Add
windows-rwlock.
* gettext-runtime/intl/windows-rwlock.h: New file, from gnulib.
* gettext-runtime/intl/windows-rwlock.c: New file, from gnulib.
* gettext-runtime/intl/windows-initguard.h: New file, from gnulib.
* gettext-runtime/intl/windows-spinlock.h: Remove file.
* gettext-runtime/intl/lock.h: Update from gnulib.
* gettext-runtime/intl/lock.c: Likewise.
* gettext-runtime/intl/verify.h: Likewise.
* gettext-runtime/intl/windows-mutex.h: Likewise.
* gettext-runtime/intl/windows-recmutex.h: Likewise.
* gettext-runtime/intl/Makefile.am (EXTRA_DIST): Add windows-rwlock.h,
windows-initguard.h. Remove windows-spinlock.h.
(LIBINTLSOURCES): Conditionally add windows-rwlock.c.
(windows-rwlock.lo): New rule.
(*.lo): Update dependencies.
* Makefile.am (distcheck-hook): Check that gettext-runtime/intl/windows-*.[hc]
are up-to-date.
* gnulib-local/lib/libxml/threads.c: Test HAVE_PTHREAD_H, HAVE_WIN32_THREADS,
HAVE_BEOS_THREADS only if LIBXML_THREAD_ENABLED is defined; otherwise use a
fallback suitable for single-threaded applications.

6 years agoUpdate to the newest gnulib.
Bruno Haible [Sat, 20 Jul 2019 11:40:24 +0000 (13:40 +0200)] 
Update to the newest gnulib.

6 years agobuild: Avoid warnings from bison versions >= 3.3.
Bruno Haible [Fri, 19 Jul 2019 21:23:06 +0000 (23:23 +0200)] 
build: Avoid warnings from bison versions >= 3.3.

Reported by Bernhard Voelker <mail@bernhard-voelker.de>.

* gettext-runtime/intl/Makefile.am (YACC): Remove option '-y'.

6 years agointl: Make autoconf macro more robust.
Bruno Haible [Fri, 19 Jul 2019 21:11:48 +0000 (23:11 +0200)] 
intl: Make autoconf macro more robust.

Reported by Bernhard Voelker <mail@bernhard-voelker.de>.

* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't make assumptions about
the version numbers of future Bison versions.

6 years agolibtextstyle: Fix link error when compiled with GCC 3.3.x.
Bruno Haible [Wed, 17 Jul 2019 18:40:11 +0000 (20:40 +0200)] 
libtextstyle: Fix link error when compiled with GCC 3.3.x.

Reported by Jeffrey Walton <noloader@gmail.com>.

* gnulib-local/lib/libxml/timsort.h (CLZ): Don't define based on __builtin_clzll
in GCC versions < 3.4.

6 years agointl: Don't export the glwthread* symbols from libintl on native Windows.
Bruno Haible [Sun, 7 Jul 2019 08:19:25 +0000 (10:19 +0200)] 
intl: Don't export the glwthread* symbols from libintl on native Windows.

* gettext-runtime/intl/Makefile.am (OTHER_LDFLAGS): Add an -export-symbols-regex
option.

6 years agobuild: Fix build errors with MSVC.
Bruno Haible [Thu, 4 Jul 2019 14:27:44 +0000 (16:27 +0200)] 
build: Fix build errors with MSVC.

* gettext-tools/src/lang-table.h (language_table, language_variant_table):
Declare with C linkage.
* gettext-tools/src/read-po.h (input_format_po): Likewise.
* gettext-tools/src/read-properties.h (input_format_properties): Likewise.
* gettext-tools/src/read-stringtable.h (input_format_stringtable): Likewise.
* gettext-tools/src/write-properties.h (output_format_properties): Likewise.
* gettext-tools/src/write-stringtable.h (output_format_stringtable): Likewise.

6 years agobuild: Fix build error with MSVC.
Bruno Haible [Thu, 4 Jul 2019 14:27:41 +0000 (16:27 +0200)] 
build: Fix build error with MSVC.

* gettext-runtime/intl/Makefile.am (INTL_WINDOWS_LIBS): New variable.
(OTHER_LDFLAGS): Add it.

6 years agobuild: Fix build error with MSVC.
Bruno Haible [Thu, 4 Jul 2019 14:27:37 +0000 (16:27 +0200)] 
build: Fix build error with MSVC.

* gettext-runtime/intl/export.h (LIBINTL_DLL_EXPORTED): Define differently for
MSVC.

6 years agobuild: Fix build errors with MSVC.
Bruno Haible [Thu, 4 Jul 2019 14:27:33 +0000 (16:27 +0200)] 
build: Fix build errors with MSVC.

* gettext-tools/libgettextpo/exported.sh.in: Remove one level of eval.
* gettext-tools/libgettextpo/Makefile.am (config.h): Redirect compiler output to
stderr. Remove symbols that contain an '@'.
* libtextstyle/lib/Makefile.am (config.h): Likewise.

6 years agoUpdate after gnulib changed.
Bruno Haible [Wed, 3 Jul 2019 21:58:02 +0000 (23:58 +0200)] 
Update after gnulib changed.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES): Add
windows-mutex, windows-once, windows-recmutex.
* gettext-runtime/m4/flexmember.m4: Update from gnulib.
* gettext-runtime/intl/flexmember.h: Likewise.
* gettext-runtime/intl/localcharset.c: Likewise.
* gettext-runtime/intl/windows-mutex.h: New file, from gnulib.
* gettext-runtime/intl/windows-mutex.c: New file, from gnulib.
* gettext-runtime/intl/windows-once.h: New file, from gnulib.
* gettext-runtime/intl/windows-once.c: New file, from gnulib.
* gettext-runtime/intl/windows-recmutex.h: New file, from gnulib.
* gettext-runtime/intl/windows-recmutex.c: New file, from gnulib.
* gettext-runtime/intl/windows-spinlock.h: New file, from gnulib.
* gettext-runtime/intl/lock.h: Update from gnulib.
* gettext-runtime/intl/lock.c: Likewise.
* gettext-runtime/intl/Makefile.am (EXTRA_DIST): Add windows-*.h.
(LIBINTLSOURCES): Conditionally add windows-*.c.
(windows-mutex.lo, windows-recmutex.lo, windows-once.lo): New rules.
(*.lo): Update dependencies.
* gettext-runtime/configure.ac: New condition WINDOWS_NATIVE.
* gettext-tools/configure.ac: Likewise.
* Makefile.am (distcheck-hook): Check that gettext-runtime/intl/windows-*.[hc]
are up-to-date.

6 years agoUpdate to the newest gnulib.
Bruno Haible [Tue, 2 Jul 2019 21:19:49 +0000 (23:19 +0200)] 
Update to the newest gnulib.

6 years agoUpdate after gnulib changed.
Bruno Haible [Mon, 20 May 2019 19:26:30 +0000 (21:26 +0200)] 
Update after gnulib changed.

* gettext-runtime/intl/setlocale.c (search): Optimize away a redundant strcmp()
invocation.
(locales_with_principal_territory): New array.
(langcmp, get_main_locale_with_same_language): New functions.
(locales_with_principal_language): New array.
(terrcmp, get_main_locale_with_same_territory): New functions.
(rpl_setlocale): When setlocale_single failed, try again with a locale that is
more likely to exist. Don't warn if the environment variable SETLOCALE_VERBOSE
is not set.

6 years agoUpdate after gnulib changed.
Bruno Haible [Mon, 20 May 2019 01:04:18 +0000 (03:04 +0200)] 
Update after gnulib changed.

* gettext-runtime/m4/intlmacosx.m4 (gt_INTL_MACOSX): Don't test for
CFLocaleCopyCurrent.
* gettext-runtime/intl/localename.c: Remove includes for
HAVE_CFLOCALECOPYCURRENT.
(gl_locale_name_environ, gl_locale_name_default): Remove code for
HAVE_CFLOCALECOPYCURRENT.

6 years agoUpdate to the newest gnulib.
Bruno Haible [Mon, 20 May 2019 01:02:51 +0000 (03:02 +0200)] 
Update to the newest gnulib.

6 years agomsginit: Define default territory for some more languages.
Bruno Haible [Mon, 20 May 2019 17:02:44 +0000 (19:02 +0200)] 
msginit: Define default territory for some more languages.

* gettext-tools/src/msginit.c (catalogname_for_locale): Add information about
Bislama, Kyrgyz, Mauritian Creole, Chichewa, Kinyarwanda, Tok Pisin.

6 years agoUpdate a country name.
Bruno Haible [Mon, 20 May 2019 10:07:16 +0000 (12:07 +0200)] 
Update a country name.

* gettext-tools/doc/ISO_3166: Write "North Macedonia", not "Macedonia".
* gettext-tools/doc/iso-3166.texi: Likewise.
* gettext-tools/src/msginit.c (catalogname_for_locale): Likewise.

6 years agobuild: Avoid endless "config.status --recheck" loop (regression from yesterday).
Bruno Haible [Mon, 20 May 2019 00:28:24 +0000 (02:28 +0200)] 
build: Avoid endless "config.status --recheck" loop (regression from yesterday).

* gettext-tools/configure.ac: Use AC_MSG_WARN instead of AC_MSG_ERROR.

6 years agointl: Work around setlocale bug on Android 4.3.
Bruno Haible [Sun, 19 May 2019 22:25:51 +0000 (00:25 +0200)] 
intl: Work around setlocale bug on Android 4.3.

* gettext-runtime/intl/setlocale.c (setlocale_unixlike): New wrapper for
Android.

6 years agomsgmerge: Fix behaviour of --for-msgfmt on PO files with no translations.
Bruno Haible [Sun, 19 May 2019 11:10:06 +0000 (13:10 +0200)] 
msgmerge: Fix behaviour of --for-msgfmt on PO files with no translations.

Reported by Don Lawrence <dlawrence@iecok.com>
in <https://lists.freedesktop.org/archives/p11-glue/2019-May/000700.html>
via Daiki Ueno
in <https://lists.gnu.org/archive/html/bug-gettext/2019-05/msg00124.html>.

* gettext-tools/src/msgmerge.c (main): Treat force_po like true if for_msgfmt
is true.
* gettext-tools/tests/msgmerge-26: Add test of PO file with no translations.

6 years agobuild: Restore the ability to build gettext-tools separately, part 2.
Bruno Haible [Sat, 18 May 2019 22:33:19 +0000 (00:33 +0200)] 
build: Restore the ability to build gettext-tools separately, part 2.

* gettext-tools/configure.ac: New option --with-installed-csharp-dll.
(USE_INSTALLED_CSHARP_DLL): New conditional.
* gettext-tools/src/Makefile.am (CSHARP_DLL_DIR): New variable.
(msgunfmt.net.exe): Use it.
* configure.ac: Filter out --with-installed-csharp-dll from inherited --help
output.
* PACKAGING: Document that gettext-tools's configure needs to be invoked with
--with-installed-csharp-dll.

6 years agobuild: Restore the ability to build gettext-tools separately, part 1.
Bruno Haible [Sat, 18 May 2019 21:33:06 +0000 (23:33 +0200)] 
build: Restore the ability to build gettext-tools separately, part 1.

Reported by Hanspeter Niederstrasser <nieder@users.sourceforge.net>
in <https://savannah.gnu.org/bugs/?56333>.

Code based on patch by Miguel Ángel Arruga Vivas <rosen644835@gmail.com>.

* autogen.sh: Copy libtextstyle.m4 for use by gettext-tools.
* gettext-tools/configure.ac: New option --with-installed-libtextstyle.
(USE_INSTALLED_LIBTEXTSTYLE): New conditional.
* gettext-tools/src/Makefile.am (textstyle.h): Disable rule if
USE_INSTALLED_LIBTEXTSTYLE is true.
(LT_LIBTEXTSTYLE): New variable.
(libgettextsrc_la_LDFLAGS): Use it instead of hardcoding a relative filename of
libtextstyle.la.
* configure.ac: Filter out --with-installed-libtextstyle from inherited --help
output.
* Makefile.am (distcheck-hook): Compare different copies of libtextstyle.m4.
* PACKAGING: Document that gettext-tools's configure needs to be invoked with
--with-installed-libtextstyle.

6 years agolibtextstyle: Complete commit from 2019-04-28.
Bruno Haible [Sat, 18 May 2019 20:33:43 +0000 (22:33 +0200)] 
libtextstyle: Complete commit from 2019-04-28.

* libtextstyle/Makefile.am (EXTRA_DIST): Add
test-term-ostream-xterm-freebsd-italic.out.

6 years agobuild: Avoid the use of mingw winpthreads for multithreading.
Bruno Haible [Sat, 18 May 2019 16:56:18 +0000 (18:56 +0200)] 
build: Avoid the use of mingw winpthreads for multithreading.

* gettext-runtime/configure.ac: Invoke gl_AVOID_WINPTHREAD.
* gettext-tools/configure.ac: Likewise.

6 years agoUpdate to the newest gnulib.
Bruno Haible [Sat, 18 May 2019 23:09:02 +0000 (01:09 +0200)] 
Update to the newest gnulib.

6 years agobuild: Avoid trouble on mingw caused by mingw's *printf functions.
Bruno Haible [Sat, 18 May 2019 16:01:31 +0000 (18:01 +0200)] 
build: Avoid trouble on mingw caused by mingw's *printf functions.

Reported by Michele Locati <michele@locati.it>
in <https://lists.gnu.org/archive/html/bug-gettext/2019-05/msg00103.html>.

* gettext-runtime/intl/Makefile.am (AM_CPPFLAGS): Define __USE_MINGW_ANSI_STDIO
to 0.
* gettext-runtime/libasprintf/Makefile.am (DEFS): Likewise.
* libtextstyle/lib/Makefile.am (AM_CPPFLAGS): Likewise.

6 years agolibasprintf: Avoid compilation error on mingw with -D__USE_MINGW_ANSI_STDIO=1.
Bruno Haible [Sat, 18 May 2019 15:25:10 +0000 (17:25 +0200)] 
libasprintf: Avoid compilation error on mingw with -D__USE_MINGW_ANSI_STDIO=1.

* gettext-runtime/libasprintf/lib-asprintf.c (asprintf, vasprintf): Don't define
on mingw when __USE_MINGW_ANSI_STDIO is non-zero.

6 years agodoc: Don't mention trademarks.
Bruno Haible [Sat, 18 May 2019 10:05:30 +0000 (12:05 +0200)] 
doc: Don't mention trademarks.

Reported by John Darrington <john@darrington.wattle.id.au>
in <https://savannah.gnu.org/bugs/?56340>.

* gettext-tools/doc/gettext.texi (catgets): Drop trademark annotation.

6 years agobuild: Fix typo in comment.
Bruno Haible [Sat, 18 May 2019 09:39:01 +0000 (11:39 +0200)] 
build: Fix typo in comment.

* check-copyright-headers: Fix typo in comment.

6 years agobuild: Fix "make install" failure with --disable-shared on glibc systems.
Bruno Haible [Sun, 12 May 2019 21:26:04 +0000 (23:26 +0200)] 
build: Fix "make install" failure with --disable-shared on glibc systems.

Reported by Gabor Z. Papp <gzp@papp.hu>.

This is a regression from 2018-11-25.

* gettext-tools/configure.ac (PRELOADABLE_LIBINTL): Set to false if
--disable-shared was specified.

6 years agoRelease 0.20.1 v0.20.1
Bruno Haible [Sun, 12 May 2019 15:00:23 +0000 (17:00 +0200)] 
Release 0.20.1

6 years agoUpdate translations (from the TP).
Bruno Haible [Sun, 12 May 2019 14:39:24 +0000 (16:39 +0200)] 
Update translations (from the TP).

6 years agoUpdate release steps.
Bruno Haible [Sun, 12 May 2019 14:21:07 +0000 (16:21 +0200)] 
Update release steps.

6 years agointl: Fix wrong libtool versioning information.
Bruno Haible [Sun, 12 May 2019 13:59:24 +0000 (15:59 +0200)] 
intl: Fix wrong libtool versioning information.

Reported by Ken Takata <ktakata65536@gmail.com>
in <https://savannah.gnu.org/bugs/?56305>.

* gettext-runtime/intl/Makefile.am (LTV_*): Bump to 9:6:1, not 9:6:2.
* NEWS: Mention the change.

6 years agoUpdate bug reporting instructions.
Bruno Haible [Sat, 11 May 2019 22:21:16 +0000 (00:21 +0200)] 
Update bug reporting instructions.

* README: Tell users to report bugs in the bug tracker or by email. Use the
mailing list address, not the alias.
* gettext-runtime/libasprintf/README: Likewise.
* gettext-tools/doc/gettext.texi (Introduction): Likewise.
(Plural forms): Use the mailing list address, not the alias.
* configure.ac (AC_INIT): Use the mailing list address, not the alias.
* gettext-runtime/configure.ac (AC_INIT): Likewise.
* gettext-tools/configure.ac (AC_INIT): Likewise.
* gettext-tools/examples/configure.ac (AC_INIT): Likewise.
* gettext-runtime/po/Makevars (MSGID_BUGS_ADDRESS): Use the mailing list
address, not the alias.
* gettext-tools/po/Makevars (MSGID_BUGS_ADDRESS): Likewise.
* gettext-tools/examples/po/Makefile.am (MSGID_BUGS_ADDRESS): Likewise.
* gettext-tools/examples/hello-*/po/Makevars (MSGID_BUGS_ADDRESS): Likewise.
* gettext-tools/examples/hello-*/po/Makefile.am (MSGID_BUGS_ADDRESS): Likewise.
* gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile (MSGID_BUGS_ADDRESS):
Likewise.
* gettext-tools/examples/hello-c++-kde/hello.cc (main): Likewise.
* gettext-runtime/src/envsubst.c (main): Move URL out of translatable string.
(usage): Tell users to report bugs in the bug tracker or by email. Use the
mailing list address, not the alias.
* 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/recode-sr-latin.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.
* gettext-tools/misc/autopoint.in (func_usage): Tell users to report bugs in the
bug tracker or by email. Use the mailing list address, not the alias.
* gettext-tools/misc/convert-archive.in (func_usage): Likewise.
* gettext-tools/misc/gettextize.in (func_usage): Likewise.

6 years agodoc: Recommend to avoid literal URLs in translatable strings.
Bruno Haible [Sat, 11 May 2019 19:55:33 +0000 (21:55 +0200)] 
doc: Recommend to avoid literal URLs in translatable strings.

Suggested by John Darrington <john@darrington.wattle.id.au>
in <https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00033.html>.

* gettext-tools/doc/gettext.texi (Preparing Strings): Add recommendation against
embedded URLs. Add sub-headers.

6 years agobuild: Fix build failure with parallel make.
Bruno Haible [Sat, 11 May 2019 01:26:56 +0000 (03:26 +0200)] 
build: Fix build failure with parallel make.

Reported by Lars Wendler <polynomial-c@gentoo.org>.

* gettext-tools/src/Makefile.am (.NOTPARALLEL): Add this special target.

6 years agointl: Remove obsolete code.
Bruno Haible [Fri, 10 May 2019 20:08:54 +0000 (22:08 +0200)] 
intl: Remove obsolete code.

* gettext-runtime/intl/plural.y: Assume bison >= 2.0.

6 years agoUpdate after gnulib changed.
Bruno Haible [Fri, 10 May 2019 20:06:52 +0000 (22:06 +0200)] 
Update after gnulib changed.

* autogen.sh: Don't copy intl.m4.
* Makefile.am (distcheck-hook): Don't check glibc2.m4, glibc21.m4, intdiv0.m4,
intl.m4, intmax.m4, printf-posix.m4, uintmax_t.m4, visibility.m4.
* gettext-runtime/intl/verify.h: Update from gnulib.

6 years agoUpdate to newest gnulib.
Bruno Haible [Fri, 10 May 2019 20:03:59 +0000 (22:03 +0200)] 
Update to newest gnulib.

6 years agoRelease 0.20 v0.20
Bruno Haible [Wed, 8 May 2019 21:49:09 +0000 (23:49 +0200)] 
Release 0.20

6 years agoUpdate release steps.
Bruno Haible [Wed, 8 May 2019 21:48:05 +0000 (23:48 +0200)] 
Update release steps.

6 years agoexamples: Use infrastructure from gettext version 0.20.
Bruno Haible [Wed, 8 May 2019 20:01:33 +0000 (22:01 +0200)] 
examples: Use infrastructure from gettext version 0.20.

* gettext-tools/examples/hello-*/configure.ac: Use AM_GNU_GETTEXT_VERSION with
version 0.20.
* gettext-tools/examples/hello-c++-kde/configure.in.in: Likewise.
* gettext-tools/examples/hello-*/m4/Makefile.am: Update .m4 file list.
* gettext-tools/examples/hello-*/autoclean.sh: Likewise.

6 years agoUpdate translations (from the TP).
Bruno Haible [Wed, 8 May 2019 19:24:38 +0000 (21:24 +0200)] 
Update translations (from the TP).

6 years agoPrepare for 0.20 release.
Bruno Haible [Wed, 8 May 2019 19:22:22 +0000 (21:22 +0200)] 
Prepare for 0.20 release.

* gettext-runtime/doc/matrix.texi: Update from TP.
* gettext-runtime/doc/nls.texi (STATUS): Update.
* libtextstyle/version.sh: Update RELEASE_DATE.

6 years agolibtextstyle: examples: Enable --color=html, for debuggability.
Bruno Haible [Mon, 6 May 2019 23:27:33 +0000 (01:27 +0200)] 
libtextstyle: examples: Enable --color=html, for debuggability.

Reported by Akim Demaille.

* libtextstyle/examples/color-hello/hello.c (main): Handle color_html case.
* libtextstyle/examples/color-filter/filter.c (main): Likewise.

6 years agoexamples: hello-c++-widgets: Update build infrastructure.
Bruno Haible [Sun, 5 May 2019 20:48:18 +0000 (22:48 +0200)] 
examples: hello-c++-widgets: Update build infrastructure.

Gnulib changed on 2018-11-11: asm-underscore.m4 is no longer needed for havelib.

* gettext-tools/examples/hello-c++-widgets/autogen.sh: Don't pull in
asm-underscore.m4.
* gettext-tools/examples/hello-c++-widgets/autoclean.sh: Don't remove
asm-underscore.m4.

6 years agoAdd unit test for libintl_version.
Bruno Haible [Sun, 5 May 2019 14:59:55 +0000 (16:59 +0200)] 
Add unit test for libintl_version.

* gettext-tools/tests/intl-version-prg.c: New file.
* gettext-tools/tests/intl-version: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
(check_PROGRAMS): Add intl-version-prg.
(intl_version_prg_SOURCES, intl_version_prg_LDADD): New variables.