]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
6 years agolibtextstyle: Fix a memory access from a signal handler.
Bruno Haible [Wed, 20 Mar 2019 21:31:18 +0000 (22:31 +0100)] 
libtextstyle: Fix a memory access from a signal handler.

* gnulib-local/lib/term-ostream.oo.c (struct term_ostream): Mark active_attr
field as volatile.

6 years agolibtextstyle: Bump version number.
Bruno Haible [Wed, 20 Mar 2019 21:30:05 +0000 (22:30 +0100)] 
libtextstyle: Bump version number.

6 years agoUse _GL_ASYNC_SAFE from gnulib.
Bruno Haible [Wed, 20 Mar 2019 21:20:13 +0000 (22:20 +0100)] 
Use _GL_ASYNC_SAFE from gnulib.

* gettext-tools/src/plural-eval.h (sigfpe_code): Mark as volatile.
* gettext-tools/src/plural-eval.c (sigfpe_code): Likewise.
(sigfpe_handler): Mark as _GL_ASYNC_SAFE.
* gnulib-local/lib/term-ostream.oo.c (ASYNC_SAFE): Remove macro.
Use _GL_ASYNC_SAFE instead.

6 years agoUpdate to newest gnulib.
Bruno Haible [Wed, 20 Mar 2019 21:17:54 +0000 (22:17 +0100)] 
Update to newest gnulib.

6 years agoUpdate .gitignore after 2019-03-12 change.
Bruno Haible [Wed, 20 Mar 2019 21:17:19 +0000 (22:17 +0100)] 
Update .gitignore after 2019-03-12 change.

6 years agolibtextstyle: Bump version number.
Bruno Haible [Sun, 17 Mar 2019 15:54:24 +0000 (16:54 +0100)] 
libtextstyle: Bump version number.

6 years agolibtextstyle: Bump version number.
Bruno Haible [Sun, 17 Mar 2019 15:41:19 +0000 (16:41 +0100)] 
libtextstyle: Bump version number.

6 years agolibtextstyle: Implement reliable tty control.
Bruno Haible [Sun, 17 Mar 2019 13:26:03 +0000 (14:26 +0100)] 
libtextstyle: Implement reliable tty control.

* gnulib-local/lib/term-ostream.oo.c (DEBUG_SIGNALS): New macro.
Include <stdio.h>, <sys/stat.h>.
(NOFLSH): Define fallback value.
Include sig-handler.h, same-inode.h.
(ASYNC_SAFE): New macro.
(color_bgr): Mark as ASYNC_SAFE.
(nonintr_tcgetattr, nonintr_tcsetattr): New functions.
(log_message, sprintf_integer, simple_errno_string, simple_signal_string,
log_signal_handler_called): New functions.
(struct term_ostream): Add fields restore_colors, restore_weight,
restore_posture, restore_underline, tty_control, same_as_stderr.
(BLOCK_SIGNALS_DURING_NON_DEFAULT_STYLE_OUTPUT): New macro.
(term_fd): New variable.
(pgrp_status_t): New type.
(pgrp_status): New variable.
(update_pgrp_status): New function.
(out_stream): New variable.
(restore_colors, restore_weight, restore_posture, restore_underline): Remove
variables.
(out_color_change, out_bgcolor_change, out_weight_change, out_posture_change,
out_underline_change): New functions, extracted from out_attr_change.
(out_attr_change): Call these functions.
(restore): Use out_stream.
(tcsetattr_failed): New function.
(orig_lflag_set, orig_lflag): New variables.
(clobber_local_mode, restore_local_mode): New functions.
(job_control_signals): Renamed from stopping_signals. Add SIGCONT.
(num_job_control_signals): Renamed from num_stopping_signals.
(relevant_signal_set): Replaces stopping_signal_set.
(relevant_signal_set_initialized): New variable.
(init_relevant_signal_set): Replaces init_stopping_signal_set.
(block_relevant_signals): Replaces block_stopping_signals.
(unblock_relevant_signals): Replaces unblock_stopping_signals.
(is_ignored): New function.
(show_signal_marker): New function.
(fatal_or_stopping_signal_handler, fatal_signal_handler,
stopping_signal_handler, continuing_signal_handler,
ensure_continuing_signal_handler, ensure_other_signal_handlers): New functions.
(activate_non_default_attr, deactivate_non_default_attr): Rewritten.
(term_ostream::free): Unset term_fd and call update_pgrp_status.
(term_ostream_create): Initialize the fields restore_colors, restore_weight,
restore_posture, restore_underline, tty_control, same_as_stderr. Call
init_relevant_signal_set. Set term_fd and call ensure_continuing_signal_handler
and update_pgrp_status.
* gnulib-local/m4/term-ostream.m4 (gl_TERM_OSTREAM): Check for tcgetattr.
* gnulib-local/modules/term-ostream (Depends-on): Add sigaction, same-inode.
* libtextstyle/NEWS: Mention the change.

6 years agolibtextstyle: Fix build failure on Cygwin (regression from 2019-03-15).
Bruno Haible [Sun, 17 Mar 2019 15:20:15 +0000 (16:20 +0100)] 
libtextstyle: Fix build failure on Cygwin (regression from 2019-03-15).

* libtextstyle/lib/Makefile.am ($(srcdir)/libtextstyle.sym.in): Renamed
from $(srcdir)/libtextstyle.sym.
(libtextstyle.sym): New rule.
(MOSTLYCLEANFILES, MAINTAINERCLEANFILES, EXTRA_DIST): Update accordingly.
(config.h): Depend on libtextstyle.sym in the build directory.
(libtextstyle_la_LDFLAGS: Use libtextstyle.sym in the build directory.

6 years agolibtextstyle: Clean up leftovers from 2019-03-13 commit.
Bruno Haible [Sun, 17 Mar 2019 14:33:40 +0000 (15:33 +0100)] 
libtextstyle: Clean up leftovers from 2019-03-13 commit.

* libtextstyle/lib/Makefile.am (libtextstyle_la_LINK): Remove variable.

6 years agolibtextstyle: Complete styled_ostream_flush_to_current_style declaration.
Bruno Haible [Fri, 15 Mar 2019 19:57:34 +0000 (20:57 +0100)] 
libtextstyle: Complete styled_ostream_flush_to_current_style declaration.

* libtextstyle/lib/textstyle.h (term_styled_ostream_flush_to_current_style,
html_styled_ostream_flush_to_current_style): New declarations.

6 years agolibtextstyle: Protect better against EINTR.
Bruno Haible [Sat, 16 Mar 2019 22:17:39 +0000 (23:17 +0100)] 
libtextstyle: Protect better against EINTR.

* gnulib-local/lib/fd-ostream.oo.c (nonintr_tcdrain): New function.
(fd_ostream::flush): Use it instead of tcdrain.
* gnulib-local/lib/file-ostream.oo.c: Include <errno.h>.
(nonintr_tcdrain): New function.
(file_ostream::flush): Use it instead of tcdrain.
* gnulib-local/lib/term-ostream.oo.c (nonintr_tcdrain): New function.
(term_ostream::flush): Use it instead of tcdrain.

6 years agolibtextstyle: Reexport isatty() override from gnulib.
Bruno Haible [Thu, 14 Mar 2019 23:02:55 +0000 (00:02 +0100)] 
libtextstyle: Reexport isatty() override from gnulib.

This is necessary for programs that are compiled for native Windows and
run in a Cygwin console.

* libtextstyle/autogen.sh (GNULIB_MODULES): Add 'isatty'.
* libtextstyle/configure.ac: Set GNULIB_ISATTY to 0.
* libtextstyle/lib/textstyle.h (libtextstyle_isatty): New declaration.
(isatty): Redirect to libtextstyle_isatty.

6 years agolibtextstyle: Use less code from libxml.
Bruno Haible [Thu, 14 Mar 2019 18:03:38 +0000 (19:03 +0100)] 
libtextstyle: Use less code from libxml.

* libtextstyle/gnulib-local/lib/libxml/xmlversion.in.h.diff: New file.
* gnulib-local/lib/libxml/save.h (xmlEncodeAttributeEntities): Declare also when
LIBXML_OUTPUT_ENABLED is 0.

6 years agolibtextstyle: Fix "make clean" failure in VPATH builds.
Bruno Haible [Thu, 14 Mar 2019 18:01:23 +0000 (19:01 +0100)] 
libtextstyle: Fix "make clean" failure in VPATH builds.

* libtextstyle/lib/Makefile.am (CLEANDIRS_NOT_IN_SRCDIR): Remove 'textstyle'.
(DISTCLEANDIRS_NOT_IN_SRCDIR): Add 'textstyle'.

6 years agolibtextstyle: Make sure we get new versions also of mdate-sh.
Bruno Haible [Thu, 14 Mar 2019 00:21:39 +0000 (01:21 +0100)] 
libtextstyle: Make sure we get new versions also of mdate-sh.

* libtextstyle/autogen.sh: Erase more files in build-aux.

6 years agolibtextstyle: Remove unused code for exporting variables from Windows DLLs.
Bruno Haible [Thu, 14 Mar 2019 00:15:53 +0000 (01:15 +0100)] 
libtextstyle: Remove unused code for exporting variables from Windows DLLs.

Here we use the third approach listed in gettext-tools/woe32dll/export.h, not
the fourth approach.

* libtextstyle/Makefile.am: Remove code that was never enabled.
* libtextstyle/lib/Makefile.am: Likewise.
* libtextstyle/configure.ac (false): Remove conditional.

6 years agolibtextstyle: Add metainformation for Windows.
Bruno Haible [Wed, 13 Mar 2019 23:27:54 +0000 (00:27 +0100)] 
libtextstyle: Add metainformation for Windows.

6 years agolibtextstyle: Add metainformation for Windows.
Bruno Haible [Wed, 13 Mar 2019 23:01:04 +0000 (00:01 +0100)] 
libtextstyle: Add metainformation for Windows.

* libtextstyle/lib/libtextstyle.rc: New file.
* libtextstyle/lib/Makefile.am (EXTRA_DIST): Add it.
(WOE32_LIBADD): New variable.
(libtextstyle.res.lo): New rule.
(libtextstyle_la_LIBADD, libtextstyle_la_DEPENDENCIES): Augment.

6 years agolibtextstyle: Don't use a C++ compiler.
Bruno Haible [Wed, 13 Mar 2019 22:43:38 +0000 (23:43 +0100)] 
libtextstyle: Don't use a C++ compiler.

* libtextstyle/gnulib-local/modules/fd-styled-ostream.diff: New file.
* libtextstyle/gnulib-local/modules/html-styled-ostream.diff: New file.
* libtextstyle/gnulib-local/modules/term-styled-ostream.diff: New file.
* libtextstyle/lib/Makefile.am (libtextstyle_la_LINK): Use the C compiler
always.
* libtextstyle/configure.ac: Remove LT_LANG([C++]), AC_PROG_CXX, and related
invocations.

6 years agolibasprintf: Add metainformation for Windows.
Bruno Haible [Wed, 13 Mar 2019 22:24:09 +0000 (23:24 +0100)] 
libasprintf: Add metainformation for Windows.

* gettext-runtime/libasprintf/configure.ac: Set RC and WOE32 variables.
* gettext-runtime/libasprintf/libasprintf.rc: New file.
* gettext-runtime/libasprintf/Makefile.am (EXTRA_DIST): Add it.
(WOE32_LIBADD): New variable.
(libasprintf.res.lo): New rule.
(libasprintf_la_LIBADD, libasprintf_la_DEPENDENCIES): New variables.

6 years agobuild: Update Windows support.
Bruno Haible [Wed, 13 Mar 2019 21:51:55 +0000 (22:51 +0100)] 
build: Update Windows support.

* gettext-runtime/intl/libintl.rc: Update.
* gettext-tools/libgettextpo/libgettextpo.rc: Likewise.
* windows/gettext.rc: Likewise.

6 years agolibtextstyle: Bump version number.
Bruno Haible [Wed, 13 Mar 2019 09:50:18 +0000 (10:50 +0100)] 
libtextstyle: Bump version number.

6 years agolibtextstyle: Bump version number.
Bruno Haible [Tue, 12 Mar 2019 21:53:42 +0000 (22:53 +0100)] 
libtextstyle: Bump version number.

6 years agolibtextstyle: New function styled_ostream_flush_to_current_style.
Bruno Haible [Tue, 12 Mar 2019 18:28:25 +0000 (19:28 +0100)] 
libtextstyle: New function styled_ostream_flush_to_current_style.

* gnulib-local/lib/styled-ostream.oo.h (struct styled_ostream): Add method
flush_to_current_style.
* gnulib-local/lib/fd-styled-ostream.oo.c
(fd_styled_ostream::flush_to_current_style): New method.
* gnulib-local/lib/term-styled-ostream.oo.c
(term_styled_ostream::flush_to_current_style): New method.
* gnulib-local/lib/html-styled-ostream.oo.c
(html_styled_ostream::flush_to_current_style): New method.
* libtextstyle/lib/textstyle.h (styled_ostream_flush_to_current_style): New
declaration.
* libtextstyle/doc/libtextstyle.texi (The styled_ostream class): Document
styled_ostream_flush_to_current_style.
* libtextstyle/NEWS: Mention the change.

6 years agolibtextstyle: New function html_ostream_flush_to_current_style.
Bruno Haible [Tue, 12 Mar 2019 18:28:19 +0000 (19:28 +0100)] 
libtextstyle: New function html_ostream_flush_to_current_style.

* gnulib-local/lib/html-ostream.oo.h (struct html_ostream): Add method
flush_to_current_style.
* gnulib-local/lib/html-ostream.oo.c (html_ostream::flush_to_current_style): New
method.
* libtextstyle/lib/textstyle.h (html_ostream_flush_to_current_style): New
declaration.
* libtextstyle/doc/libtextstyle.texi (The html_ostream class): Document
html_ostream_flush_to_current_style.
* libtextstyle/NEWS: Mention the change.

6 years agolibtextstyle: New function term_ostream_flush_to_current_style.
Bruno Haible [Tue, 12 Mar 2019 18:28:14 +0000 (19:28 +0100)] 
libtextstyle: New function term_ostream_flush_to_current_style.

* gnulib-local/lib/term-ostream.oo.h (struct term_ostream): Add method
flush_to_current_style.
* gnulib-local/lib/term-ostream.oo.c (struct term_ostream): Add fields
default_attr, active_attr, non_default_active.
(out_attr_change): Remove second argument. Update active_attr.
(activate_non_default_attr, deactivate_non_default_attr, activate_default_attr):
New functions, extracted from output_buffer.
(output_buffer): Use them. Add a second argument.
(term_ostream::write_mem, term_ostream::flush): Update output_buffer calls.
(term_ostream::free): Add an assertion.
(term_ostream::flush_to_current_style): New method.
(term_ostream_create): Initialize the fields default_attr, active_attr,
non_default_active.
* libtextstyle/lib/textstyle.h (term_ostream_flush_to_current_style): New
declaration.
* libtextstyle/doc/libtextstyle.texi (The term_ostream class): Document
term_ostream_flush_to_current_style.
* libtextstyle/NEWS: Mention the change.

6 years agolibtextstyle: Add a second argument to the 'flush' operations.
Bruno Haible [Tue, 12 Mar 2019 18:27:02 +0000 (19:27 +0100)] 
libtextstyle: Add a second argument to the 'flush' operations.

* gnulib-local/lib/ostream.oo.h (ostream_flush_scope_t): New type.
(ostream::flush): Add scope parameter.

* gnulib-local/lib/file-ostream.oo.c: Include <unistd.h>, <termios.h>.
(file_ostream::flush): Add a scope parameter.
* gnulib-local/modules/file-ostream (Depends-on): Add 'fsync'.
(configure.ac): Check for tcdrain.

* gnulib-local/lib/fd-ostream.oo.c: Include <unistd.h>, <termios.h>.
(fd_ostream::flush): Add a scope parameter.
(fd_ostream::free): Update flush call.
* gnulib-local/modules/fd-ostream (Depends-on): Add 'fsync'.
(configure.ac): Check for tcdrain.

* gnulib-local/lib/term-ostream.oo.c: Include <unistd.h>, <termios.h>.
(term_ostream::flush): Add scope parameter.
(term_ostream::free): Update flush call.
* gnulib-local/m4/term-ostream.m4 (gl_TERM_OSTREAM): Check for tcdrain.
* gnulib-local/modules/term-ostream (Depends-on): Add 'fsync'.

* gnulib-local/lib/memory-ostream.oo.c (memory_ostream::flush): Add scope
parameter.

* gnulib-local/lib/iconv-ostream.oo.c (iconv_ostream::flush): Add scope
parameter.

* gnulib-local/lib/html-ostream.oo.c (html_ostream::flush): Add scope parameter.
Emit closing </span> tags.

* gnulib-local/lib/fd-styled-ostream.oo.c (fd_styled_ostream::flush): Add scope
parameter.
* gnulib-local/lib/term-styled-ostream.oo.c (term_styled_ostream::flush): Add
scope parameter.
* gnulib-local/lib/html-styled-ostream.oo.c (html_styled_ostream::flush): Add
scope parameter.

* libtextstyle/lib/textstyle.h (ostream_flush_scope_t): New type.
(ostream_flush, styled_ostream_flush, file_ostream_flush, fd_ostream_flush,
term_ostream_flush, memory_ostream_flush, iconv_ostream_flush,
html_ostream_flush, term_styled_ostream_flush, html_styled_ostream_flush): Add
scope parameter.
* libtextstyle/doc/libtextstyle.texi (The ostream class): Add scope parameter to
flush method.
* libtextstyle/NEWS: Mention the change.

6 years agolibtextstyle: Add a program for ad-hoc testing.
Bruno Haible [Mon, 11 Mar 2019 20:19:57 +0000 (21:19 +0100)] 
libtextstyle: Add a program for ad-hoc testing.

* libtextstyle/adhoc-tests/README: New file.
* libtextstyle/adhoc-tests/hello.c: New file, based on
libtextstyle/examples/color-hello/hello.c.
* libtextstyle/adhoc-tests/hello-default.css: New file, copied from
libtextstyle/examples/color-hello/hello-default.css.
* libtextstyle/adhoc-tests/Makefile.am: New file.
* libtextstyle/configure.ac (AC_CONFIG_FILES): Add adhoc-tests/Makefile.
* libtextstyle/Makefile.am (SUBDIRS): Add adhoc-tests.

6 years agodoc: Clarify locale name syntax.
Bruno Haible [Sun, 10 Mar 2019 23:13:47 +0000 (00:13 +0100)] 
doc: Clarify locale name syntax.

* gettext-tools/doc/gettext.texi (Locale Names): Fix typo in locale name syntax.
* gettext-tools/doc/msginit.texi: Clarify that the '-l' argument optionally
contains an encoding.
* gettext-tools/src/msginit.c (usage): Likewise.

6 years agodoc: Add reference to Pology.
Bruno Haible [Sat, 9 Mar 2019 23:52:55 +0000 (00:52 +0100)] 
doc: Add reference to Pology.

* gettext-tools/doc/gettext.texi (Other tools): New section.

6 years agobuild: Make shared library dependencies work in relocatable installation.
Bruno Haible [Mon, 4 Mar 2019 17:26:16 +0000 (18:26 +0100)] 
build: Make shared library dependencies work in relocatable installation.

* gettext-tools/gnulib-lib/Makefile.am (RELOCATABLE_LIBRARY_PATH): New variable.
(libgettextlib_la_LDFLAGS): Augment for relocatable installation.
* gettext-tools/src/Makefile.am (libgettextsrc_la_LDFLAGS): Augment for
relocatable installation.
* gettext-tools/libgettextpo/Makefile.am (RELOCATABLE_LIBRARY_PATH): New
variable.
(libgettextpo_la_LDFLAGS): Augment for relocatable installation.

6 years agoUpdate after gnulib changed.
Bruno Haible [Mon, 4 Mar 2019 17:26:06 +0000 (18:26 +0100)] 
Update after gnulib changed.

6 years agoUpdate to newest gnulib.
Bruno Haible [Mon, 4 Mar 2019 17:21:55 +0000 (18:21 +0100)] 
Update to newest gnulib.

6 years agolibintl: Fix installation with BSD 'make'.
Bruno Haible [Sun, 24 Feb 2019 21:06:41 +0000 (22:06 +0100)] 
libintl: Fix installation with BSD 'make'.

* gettext-runtime/intl/Makefile.am (install-exec-libintl): Create destination
directory first.

6 years agolibtextstyle: Improve the way the library is built.
Bruno Haible [Fri, 15 Feb 2019 23:23:10 +0000 (00:23 +0100)] 
libtextstyle: Improve the way the library is built.

* libtextstyle/lib/Makefile.am (libtextstyle_la_LDFLAGS): Add '-no-undefined',
needed for building on older versions of AIX and useful to verify no undefined
symbols are used by mistake. Add '-export-symbols', to reduce the loading time
of the shared library.

6 years agoits: Avoid uninitialized variable
Daiki Ueno [Fri, 15 Feb 2019 21:08:55 +0000 (22:08 +0100)] 
its: Avoid uninitialized variable

* gettext-tools/src/its.c (normalize_whitespace): Initialize last_ws.
Fixes commit 89e7d2663bd27b8cdd300f26095f49d2c7519030.

6 years agolibtextstyle: Omit tests that rely on more than the public libtextstyle API.
Bruno Haible [Fri, 15 Feb 2019 20:41:01 +0000 (21:41 +0100)] 
libtextstyle: Omit tests that rely on more than the public libtextstyle API.

* libtextstyle/autogen.sh: Don't pass --with-tests to gnulib-tool.
(GNULIB_MODULES): Add term-ostream-tests.
* gnulib-local/modules/term-ostream-tests (Makefile.am): Don't add
@INTL_MACOSX_LIBS@ to test_term_ostream_LDADD.
* gettext-tools/gnulib-tests/Makefile.am (test_term_ostream_LDADD): Add
@INTL_MACOSX_LIBS@ here.

6 years agolibtextstyle: Don't use an external libglib.
Bruno Haible [Fri, 15 Feb 2019 20:40:56 +0000 (21:40 +0100)] 
libtextstyle: Don't use an external libglib.

* gnulib-local/m4/libglib.m4 (gl_LIBGLIB): Accept an optional FORCE-INCLUDED
argument.
* libtextstyle/gnulib-local/modules/libglib.diff: New file.

6 years agolibtextstyle: Don't use an external libxml.
Bruno Haible [Fri, 15 Feb 2019 20:40:51 +0000 (21:40 +0100)] 
libtextstyle: Don't use an external libxml.

* gnulib-local/m4/libxml.m4 (gl_LIBXML): Accept an optional FORCE-INCLUDED
argument.
* libtextstyle/gnulib-local/modules/libxml.diff: New file.

6 years agolibtextstyle: Don't use an external libcroco.
Bruno Haible [Fri, 15 Feb 2019 20:40:36 +0000 (21:40 +0100)] 
libtextstyle: Don't use an external libcroco.

* gnulib-local/m4/libcroco.m4 (gl_LIBCROCO): Accept an optional FORCE-INCLUDED
argument.
* libtextstyle/gnulib-local/modules/libcroco.diff: New file.
* libtextstyle/autogen.sh: Pass another --local-dir option to gnulib-tool.

6 years agolibtextstyle: Fix build error on Cygwin and mingw.
Bruno Haible [Fri, 15 Feb 2019 20:40:16 +0000 (21:40 +0100)] 
libtextstyle: Fix build error on Cygwin and mingw.

* libtextstyle/lib/Makefile.am (AM_CPPFLAGS): Define LIBXML_STATIC.

6 years agolibtextstyle: Really fix hyperlinks to table of contents in HTML doc.
Bruno Haible [Fri, 15 Feb 2019 20:40:01 +0000 (21:40 +0100)] 
libtextstyle: Really fix hyperlinks to table of contents in HTML doc.

* libtextstyle/doc/Makefile.am (libunistring_toc.html): Fix typo in last commit.

6 years agolibtextstyle: Document when and how to turn off styling.
Bruno Haible [Fri, 15 Feb 2019 20:39:56 +0000 (21:39 +0100)] 
libtextstyle: Document when and how to turn off styling.

* libtextstyle/doc/libtextstyle.texi (Basic use): Document when and how to turn
off styling.
* gnulib-local/lib/term-styled-ostream.oo.c (term_styled_ostream_create): Handle
a NULL css_filename explicitly.

6 years agoits: Add new preserveSpaceRule "paragraph"
Daiki Ueno [Mon, 11 Feb 2019 10:26:53 +0000 (11:26 +0100)] 
its: Add new preserveSpaceRule "paragraph"

This implements a new text extraction rule preserving paragraph
boundaries, as mentioned in:
https://gitlab.gnome.org/GNOME/glib/issues/1350

* gettext-tools/doc/gettext.texi (Preparing ITS Rules): Mention "paragraph".
* gettext-tools/src/its.c (its_rule_list_extract_text): Accept "paragraph".
(its_merge_context_merge_node): Likewise.
(normalize_whitespace): Handle "paragraph" rule.
* gettext-tools/src/its.h (ITS_WHITESPACE_NORMALIZE_PARAGRAPH): New enum value.
* gettext-tools/tests/xgettext-its-1: Add test for "paragraph" rule.

6 years agoits: Make whitespace normalization logic simpler
Daiki Ueno [Fri, 15 Feb 2019 11:49:01 +0000 (12:49 +0100)] 
its: Make whitespace normalization logic simpler

* gettext-tools/src/its.c (normalize_whitespace): Use parallel
pointers for normalizing whitespaces, instead of memmove.
Suggested by Bruno Haible.

6 years agolibtextstyle: In the examples, actually respect the --color option.
Bruno Haible [Thu, 14 Feb 2019 21:53:27 +0000 (22:53 +0100)] 
libtextstyle: In the examples, actually respect the --color option.

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

* libtextstyle/examples/color-filter/filter.c (main): Set style_file_name to
NULL when styling should be disabled.
* libtextstyle/examples/color-hello/hello.c (main): Likewise.

6 years agolibtextstyle: Assume that the texinfo sources are in the source dir.
Bruno Haible [Thu, 14 Feb 2019 02:13:39 +0000 (03:13 +0100)] 
libtextstyle: Assume that the texinfo sources are in the source dir.

* libtextstyle/doc/Makefile.am (stamp-vti, libtextstyle.html,
libtextstyle_toc.html): Lookup libunistring.texi in $(srcdir).

6 years agolibtextstyle: Fix hyperlinks to table of contents in HTML doc.
Bruno Haible [Thu, 14 Feb 2019 02:13:34 +0000 (03:13 +0100)] 
libtextstyle: Fix hyperlinks to table of contents in HTML doc.

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

* libtextstyle/doc/Makefile.am (libunistring_toc.html): Replace references to
libtextstyle.html with references to libtextstyle_toc.html.

6 years agolibtextstyle: Document the link options more precisely.
Bruno Haible [Thu, 14 Feb 2019 02:13:29 +0000 (03:13 +0100)] 
libtextstyle: Document the link options more precisely.

* libtextstyle/doc/libtextstyle.texi (Link options): Document the link
dependencies.

6 years agolibtextstyle: Fix build failure on mingw.
Bruno Haible [Thu, 14 Feb 2019 02:12:46 +0000 (03:12 +0100)] 
libtextstyle: Fix build failure on mingw.

* gnulib-local/modules/html-styled-ostream (Depends-on): Add 'close'.

6 years agolibtextstyle: Add support for VPATH builds with OpenBSD 'make'.
Bruno Haible [Thu, 14 Feb 2019 02:12:38 +0000 (03:12 +0100)] 
libtextstyle: Add support for VPATH builds with OpenBSD 'make'.

* gnulib-local/modules/*ostream (Makefile.am): In the rules that use moopp,
prefix the target file names with '$(srcdir)/'.

6 years agolibtextstyle: Put the .sym file in the source directory.
Bruno Haible [Wed, 13 Feb 2019 08:23:53 +0000 (09:23 +0100)] 
libtextstyle: Put the .sym file in the source directory.

* libtextstyle/lib/Makefile.am (libtextstyle.sym): Generate in the source
directory.
(config.h): Update rule.

6 years agolibtextstyle: Fix configuration of the example programs.
Bruno Haible [Tue, 12 Feb 2019 22:14:07 +0000 (23:14 +0100)] 
libtextstyle: Fix configuration of the example programs.

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

* libtextstyle/Makefile.am (EXTRA_DIST): Add m4/libtextstyle.m4.

6 years agolibtextstyle: Bump version number.
Bruno Haible [Tue, 12 Feb 2019 22:12:42 +0000 (23:12 +0100)] 
libtextstyle: Bump version number.

* libtextstyle/version.sh (VERSION): Set to 0.6.

6 years agolibtextstyle: New project.
Bruno Haible [Sun, 10 Feb 2019 13:04:32 +0000 (14:04 +0100)] 
libtextstyle: New project.

* libtextstyle/AUTHORS: New file, extracted from gettext/AUTHORS.
* libtextstyle/COPYING: New file, copied from gettext/COPYING.
* libtextstyle/DEPENDENCIES: New file, based on gettext/DEPENDENCIES.
* libtextstyle/HACKING: New file, based on gettext/HACKING.
* libtextstyle/INSTALL: New file, copied from gettext/INSTALL.
* libtextstyle/Makefile.am: New file, based on libunistring/Makefile.am.
* libtextstyle/NEWS: New file.
* libtextstyle/README: New file, based on libunistring/README.
* libtextstyle/autogen.sh: New file, based on libunistring/autogen.sh.
* libtextstyle/configure.ac: New file, based on libunistring/configure.ac.
* libtextstyle/build-aux/texi2html: New file, copied from
libunistring/build-aux/texi2html.
* libtextstyle/doc/Makefile.am: New file, based on libunistring/doc/Makefile.am.
* libtextstyle/doc/fdl.texi: New file, copied from gnulib/doc/fdl.texi.
* libtextstyle/doc/gpl.texi: New file, copied from gnulib/doc/gpl-3.0.texi.
* libtextstyle/doc/libtextstyle.texi: New file, partially based on
gettext/gettext-tools/doc/gettext.texi.
* libtextstyle/examples/color-filter/INSTALL: New file, based on
gettext/gettext-tools/examples/hello-c/INSTALL.
* libtextstyle/examples/color-filter/Makefile.am: New file, based on
gettext/gettext-tools/examples/hello-c/Makefile.am.
* libtextstyle/examples/color-filter/README: New file.
* libtextstyle/examples/color-filter/autoclean.sh: New file, based on
gettext/gettext-tools/examples/hello-c/autoclean.sh.
* libtextstyle/examples/color-filter/autogen.sh: New file, based on
gettext/gettext-tools/examples/hello-c/autogen.sh.
* libtextstyle/examples/color-filter/configure.ac: New file.
* libtextstyle/examples/color-filter/filter.c: New file.
* libtextstyle/examples/color-filter/filter-default.css: New file.
* libtextstyle/examples/color-hello/INSTALL: New file, based on
gettext/gettext-tools/examples/hello-c/INSTALL.
* libtextstyle/examples/color-hello/Makefile.am: New file, based on
gettext/gettext-tools/examples/hello-c/Makefile.am.
* libtextstyle/examples/color-hello/README: New file.
* libtextstyle/examples/color-hello/autoclean.sh: New file, based on
gettext/gettext-tools/examples/hello-c/autoclean.sh.
* libtextstyle/examples/color-hello/autogen.sh: New file, based on
gettext/gettext-tools/examples/hello-c/autogen.sh.
* libtextstyle/examples/color-hello/configure.ac: New file.
* libtextstyle/examples/color-hello/hello.c: New file.
* libtextstyle/examples/color-hello/hello-default.css: New file.
* libtextstyle/examples/color-hello/names.c: New file.
* libtextstyle/lib/Makefile.am: New file, based on libunistring/lib/Makefile.am.
* libtextstyle/lib/misc.h: New file.
* libtextstyle/lib/misc.c: New file.
* libtextstyle/lib/notinline.h: New file, based on
libunistring/lib/unistring-notinline.h.
* libtextstyle/lib/stdbool.mini.h: New file, based on
libunistring/lib/stdbool.mini.h.
* libtextstyle/lib/textstyle.h: New file, based on
gnulib-local/lib/*ostream.oo.h.
* libtextstyle/lib/textstyle/version.in.h: New file, based on
libunistring/lib/unistring/version.in.h.
* libtextstyle/lib/textstyle/woe32dll.in.h: New file, based on
libunistring/lib/unistring/woe32dll.in.h.
* libtextstyle/lib/version.c: New file, based on libunistring/lib/version.c.
* libtextstyle/m4/init-package-version.m4: New file, copied from
libunistring/m4/init-package-version.m4.
* libtextstyle/tests/Makefile.am: New file, based on
libunistring/tests/Makefile.am.
* libtextstyle/version.sh: New file, based on libunistring/version.sh.
* libtextstyle/woe32dll/c++fd-styled-ostream.cc: New file.
* libtextstyle/woe32dll/c++html-styled-ostream.cc: New file.
* libtextstyle/woe32dll/c++term-styled-ostream.cc: New file.
* gnulib-local/lib/glib/gstring.c (g_string_append_c): In libtextstyle, honor a
macro definition.
* gnulib-local/lib/libxml/elfgcchack.h: In libtextstyle, make this entire file a
no-op.
* gnulib-local/lib/libxml/globals.in.h (docbDefaultSAXHandler,
htmlDefaultSAXHandler, oldXMLWDcompatibility, xmlBufferAllocScheme,
xmlDefaultBufferSize, xmlDefaultSAXHandler, xmlDefaultSAXLocator,
xmlDoValidityCheckingDefaultValue, xmlFree, xmlGenericError, xmlStructuredError,
xmlGenericErrorContext, xmlStructuredErrorContext, xmlGetWarningsDefaultValue,
xmlIndentTreeOutput, xmlTreeIndentString, xmlKeepBlanksDefaultValue,
xmlLineNumbersDefaultValue, xmlLoadExtDtdDefaultValue, xmlMalloc,
xmlMallocAtomic, xmlMemStrdup, xmlParserDebugEntities, xmlParserVersion,
xmlPedanticParserDefaultValue, xmlRealloc, xmlSaveNoEmptyTags,
xmlSubstituteEntitiesDefaultValue, xmlRegisterNodeDefaultValue,
xmlDeregisterNodeDefaultValue, xmlLastError,
xmlParserInputBufferCreateFilenameValue, xmlOutputBufferCreateFilenameValue): In
libtextstyle, honor a macro definition.
* gnulib-local/lib/libxml/globals.c (xmlFree, xmlMalloc, xmlMallocAtomic,
xmlMemStrdup, xmlRealloc, docbDefaultSAXHandler, htmlDefaultSAXHandler,
oldXMLWDcompatibility, xmlBufferAllocScheme, xmlDefaultBufferSize,
xmlDefaultSAXHandler, xmlDefaultSAXLocator, xmlDoValidityCheckingDefaultValue,
xmlGenericError, xmlStructuredError, xmlGenericErrorContext,
xmlStructuredErrorContext, xmlGetWarningsDefaultValue, xmlIndentTreeOutput,
xmlTreeIndentString, xmlKeepBlanksDefaultValue, xmlLineNumbersDefaultValue,
xmlLoadExtDtdDefaultValue, xmlParserDebugEntities, xmlParserVersion,
xmlPedanticParserDefaultValue, xmlSaveNoEmptyTags,
xmlSubstituteEntitiesDefaultValue, xmlRegisterNodeDefaultValue,
xmlDeregisterNodeDefaultValue, xmlLastError,
xmlParserInputBufferCreateFilenameValue, xmlOutputBufferCreateFilenameValue):
Likewise.
* gnulib-local/lib/libxml/xmlmemory.c (xmlMalloc): Likewise.

6 years agognulib-local: New module 'fd-styled-ostream'.
Bruno Haible [Sat, 9 Feb 2019 18:16:53 +0000 (19:16 +0100)] 
gnulib-local: New module 'fd-styled-ostream'.

* gnulib-local/lib/fd-styled-ostream.oo.h: New file.
* gnulib-local/lib/fd-styled-ostream.oo.c: New file.
* gnulib-local/modules/fd-styled-ostream: New file.
* gnulib-local/Makefile.am (EXTRA_DIST): Add them.

6 years agoterm-ostream: Remove the need for an exit handler.
Bruno Haible [Sun, 10 Feb 2019 11:56:37 +0000 (12:56 +0100)] 
term-ostream: Remove the need for an exit handler.

* gnulib-local/lib/term-ostream.oo.c (output_buffer): Delay the error() call
until the default state has been restored.

6 years agoterm-ostream: Prepare for robustness through signal handling.
Bruno Haible [Sun, 10 Feb 2019 02:01:13 +0000 (03:01 +0100)] 
term-ostream: Prepare for robustness through signal handling.

* gnulib-local/lib/term-ostream.oo.h (ttyctl_t): New type.
(term_ostream_create): Add tty_control argument.
* gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Likewise.
* gnulib-local/lib/term-styled-ostream.oo.h: Include term-ostream.h.
(term_styled_ostream_create): Add tty_control argument.
* gnulib-local/lib/term-styled-ostream.oo.c (term_styled_ostream_create):
Likewise.
* gnulib-local/tests/test-term-ostream.c (main): Use TTYCTL_AUTO.
* gettext-tools/src/color.c (print_color_test): Likewise.
* gettext-tools/src/write-catalog.c (msgdomain_list_print): Likewise.

6 years agolibasprintf: Tweak documentation formatting.
Bruno Haible [Sun, 10 Feb 2019 19:28:43 +0000 (20:28 +0100)] 
libasprintf: Tweak documentation formatting.

* gettext-runtime/libasprintf/autosprintf.texi: Indent all paragraphs the same
way.

6 years agoFix typo in comment.
Bruno Haible [Sun, 10 Feb 2019 19:31:33 +0000 (20:31 +0100)] 
Fix typo in comment.

* gettext-tools/src/color.h (style_file_prepare): Fix typo in comment.

6 years agodoc: Fix typo.
Bruno Haible [Sun, 10 Feb 2019 19:30:32 +0000 (20:30 +0100)] 
doc: Fix typo.

* gettext-tools/doc/gettext.texi (Styles rules): Fix typo.

6 years agoUpdate copyright years.
Bruno Haible [Sat, 9 Feb 2019 18:25:02 +0000 (19:25 +0100)] 
Update copyright years.

6 years agoRemove automatically generated files from version control.
Bruno Haible [Sat, 9 Feb 2019 18:13:51 +0000 (19:13 +0100)] 
Remove automatically generated files from version control.

6 years agohtml-styled-ostream: Fix memory leak.
Bruno Haible [Sat, 9 Feb 2019 14:05:53 +0000 (15:05 +0100)] 
html-styled-ostream: Fix memory leak.

* gnulib-local/lib/html-styled-ostream.oo.c (html_styled_ostream::free): Free
the stream.

6 years agohtml-ostream: Fix memory leak.
Bruno Haible [Sat, 9 Feb 2019 14:05:36 +0000 (15:05 +0100)] 
html-ostream: Fix memory leak.

* gnulib-local/lib/html-ostream.oo.c: Include minmax.h.
(verify_invariants, shrink_class_stack): New functions.
(emit_pending_spans): Use them.
(html_ostream::write_mem): Shrink class stack during newline processing.
(html_ostream::free, html_ostream::begin_span): Verify invariants.
(html_ostream::end_span): Likewise. Shrink class stack.
* gnulib-local/modules/html-ostream (Depends-on): Add 'minmax'.

6 years agoexamples: Fix build failure when building from git (regression from 2018-10-23).
Bruno Haible [Fri, 8 Feb 2019 21:25:49 +0000 (22:25 +0100)] 
examples: Fix build failure when building from git (regression from 2018-10-23).

* gettext-tools/examples/po/xsmallpot.sh: Build less of 'hello-pascal'.

6 years agocolor: Make color.c package-neutral.
Bruno Haible [Fri, 8 Feb 2019 19:29:07 +0000 (20:29 +0100)] 
color: Make color.c package-neutral.

* gettext-tools/src/color.h (style_file_prepare): Add arguments.
* gettext-tools/src/color.c: Don't include relocatable.h.
(style_file_lookup): Add stylesdir_after_install argument.
(style_file_prepare): Add arguments.
* gettext-tools/src/write-catalog.c: Include relocatable.h.
(GETTEXTSTYLESDIR): New macro.
(msgdomain_list_print): Update style_file_prepare calls.
* gettext-tools/tests/init-env.in (GETTEXTSTYLESDIR): New environment variable.

6 years agoterm-ostream: Accommodate a shell that is not in /bin/sh.
Bruno Haible [Fri, 8 Feb 2019 19:26:35 +0000 (20:26 +0100)] 
term-ostream: Accommodate a shell that is not in /bin/sh.

* gnulib-local/tests/test-term-ostream-xterm.sh: Renamed from
gnulib-local/tests/test-term-ostream-xterm.
* gnulib-local/modules/term-ostream-tests (Files, Makefile.am): Update
accordingly.
* gnulib-local/Makefile.am (EXTRA_DIST): Likewise.

6 years agolibglib: Fix list of files to clean.
Bruno Haible [Fri, 8 Feb 2019 19:25:17 +0000 (20:25 +0100)] 
libglib: Fix list of files to clean.

* gnulib-local/modules/libglib (MOSTLYCLEANFILES): Add glib.h-t, glibconfig.h-t.

6 years agobuild: Code style.
Bruno Haible [Fri, 8 Feb 2019 19:23:43 +0000 (20:23 +0100)] 
build: Code style.

* autogen.sh: Make it clear that 'touch config.h.in' is tied to autoheader.

6 years agoRemove left-over empty directories in 'make distclean'.
Bruno Haible [Tue, 5 Feb 2019 02:28:53 +0000 (03:28 +0100)] 
Remove left-over empty directories in 'make distclean'.

* gettext-tools/gnulib-tests/Makefile.am (distclean-local): New target.

6 years agoFix copyright years.
Bruno Haible [Mon, 4 Feb 2019 19:56:11 +0000 (20:56 +0100)] 
Fix copyright years.

6 years agodoc: Mention --color=test in the description of the --color option.
Bruno Haible [Fri, 25 Jan 2019 19:44:11 +0000 (20:44 +0100)] 
doc: Mention --color=test in the description of the --color option.

Reported by Nathaniel M. Beaver <nathanielmbeaver@gmail.com>
in <https://savannah.gnu.org/bugs/?55573>.

* gettext-tools/doc/gettext.texi (Colorizing): Mention that the --color and
--style options are applicable to many programs.
(The --color option): Mention the 'test' value.

6 years agomsginit: Update for current shape of Translation Project.
Bruno Haible [Mon, 21 Jan 2019 01:58:06 +0000 (02:58 +0100)] 
msginit: Update for current shape of Translation Project.

Reported by Karl Ove Hufthammer <karl@huftis.org>
in <https://lists.gnu.org/archive/html/bug-gettext/2019-01/msg00014.html>.

* gettext-tools/projects/TP/teams.html: Fetched from teams.url.
* gettext-tools/projects/TP/team-address: Update sed expressions for current
structure of teams page.

6 years agoMake cldr-plurals program more robust.
Bruno Haible [Sun, 6 Jan 2019 21:58:31 +0000 (22:58 +0100)] 
Make cldr-plurals program more robust.

* gettext-tools/src/cldr-plurals.c: Include closeout.h.
(main): Arrange to invoke close_stdout at program exit.

6 years agoAssume setlocale function.
Bruno Haible [Sun, 6 Jan 2019 21:55:46 +0000 (22:55 +0100)] 
Assume setlocale function.

* gettext-runtime/src/envsubst.c (main): Assume setlocale exists.
* gettext-runtime/src/gettext.c (main): Likewise.
* gettext-runtime/src/ngettext.c (main): Likewise.
* gettext-tools/src/cldr-plurals.c (main): Likewise.
* gettext-tools/src/hostname.c (main): Likewise.
* gettext-tools/src/msgattrib.c (main): Likewise.
* gettext-tools/src/msgcat.c (main): Likewise.
* gettext-tools/src/msgcmp.c (main): Likewise.
* gettext-tools/src/msgcomm.c (main): Likewise.
* gettext-tools/src/msgconv.c (main): Likewise.
* gettext-tools/src/msgen.c (main): Likewise.
* gettext-tools/src/msgexec.c (main): Likewise.
* gettext-tools/src/msgfilter.c (main): Likewise.
* gettext-tools/src/msgfmt.c (main): Likewise.
* gettext-tools/src/msggrep.c (main): Likewise.
* gettext-tools/src/msginit.c (main, canonical_locale_charset, get_title):
Likewise.
* gettext-tools/src/msgmerge.c (main): Likewise.
* gettext-tools/src/msgunfmt.c (main): Likewise.
* gettext-tools/src/msguniq.c (main): Likewise.
* gettext-tools/src/recode-sr-latin.c (main): Likewise.
* gettext-tools/src/urlget.c (main): Likewise.
* gettext-tools/src/xgettext.c (main): Likewise.
* gettext-tools/tests/testlocale.c (main): Likewise.
* gettext-tools/tests/tstgettext.c (main): Likewise.
* gettext-tools/tests/tstngettext.c (main): Likewise.
* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Don't test whether setlocale
exists.

6 years agoUpdate after gnulib changed.
Bruno Haible [Sun, 6 Jan 2019 21:40:38 +0000 (22:40 +0100)] 
Update after gnulib changed.

6 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 6 Jan 2019 20:29:58 +0000 (21:29 +0100)] 
Update to newest gnulib.

6 years agoFix compilation error on HP-UX with gcc.
Bruno Haible [Mon, 17 Dec 2018 04:00:49 +0000 (05:00 +0100)] 
Fix compilation error on HP-UX with gcc.

* gnulib-local/lib/libxml/trionan.c: Include <float.h>.

6 years agoAdd comment regarding HP-UX cc in C99 mode.
Bruno Haible [Sun, 16 Dec 2018 09:49:04 +0000 (10:49 +0100)] 
Add comment regarding HP-UX cc in C99 mode.

* gnulib-local/lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Update
comment.

6 years agointl: Really uninstall the intl/ subdir sources.
Bruno Haible [Sun, 25 Nov 2018 18:00:01 +0000 (19:00 +0100)] 
intl: Really uninstall the intl/ subdir sources.

* gettext-runtime/intl/Makefile.am (uninstall-sources): New target.

6 years agoFix compilation error (regression from today).
Bruno Haible [Sun, 25 Nov 2018 02:40:39 +0000 (03:40 +0100)] 
Fix compilation error (regression from today).

* autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC): Add 'unistd'.
* gettext-runtime/src/envsubst.c: Include <unistd.h>.

6 years agobuild: Use Automake in intl subdirectory.
Bruno Haible [Sun, 25 Nov 2018 01:12:13 +0000 (02:12 +0100)] 
build: Use Automake in intl subdirectory.

* gettext-runtime/intl/Makefile.am: New file, based on
gettext-runtime/intl/Makefile.in.
* gettext-runtime/intl/Makefile.in: Remove file.
* autogen.sh: Copy gettext-runtime/intl/Makefile.am to
gettext-tools/intl/Makefile.am.
* gettext-runtime/configure.ac (USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL,
PACKAGE_IS_GETTEXT_TOOLS, PRELOADABLE_LIBINTL): New conditionals.
* gettext-tools/configure.ac: Likewise.

6 years agobuild: Stop generating a VERSION file.
Bruno Haible [Sun, 25 Nov 2018 01:12:09 +0000 (02:12 +0100)] 
build: Stop generating a VERSION file.

* gettext-tools/configure.ac: Don't create intl/VERSION.
* gettext-runtime/intl/Makefile.in (DISTFILES.normal): Remove variable.
(distclean): Simplify accordingly.

6 years agobuild: Remove some duplicate .m4 files.
Bruno Haible [Sun, 25 Nov 2018 01:12:04 +0000 (02:12 +0100)] 
build: Remove some duplicate .m4 files.

* autogen.sh: Copy wchar_t.m4 and wint_t.m4 for libasprintf.
* gettext-runtime/m4/codeset.m4: Remove file.
* gettext-runtime/m4/extern-inline.m4: Remove file.
* gettext-runtime/m4/intl-thread-locale.m4: Remove file.
* gettext-runtime/m4/lcmessage.m4: Remove file.
* gettext-runtime/m4/lock.m4: Remove file.
* gettext-runtime/m4/longlong.m4: Remove file.
* gettext-runtime/m4/threadlib.m4: Remove file.
* gettext-runtime/m4/wchar_t.m4: Remove file.
* gettext-runtime/m4/wint_t.m4: Remove file.
* gettext-runtime/m4/Makefile.am (EXTRA_DIST): Don't distribute them.
* Makefile.am (distcheck-hook): Don't verify that they are identical copies.

6 years agobuild: Fix #line statements in bison-generated files.
Bruno Haible [Sun, 25 Nov 2018 01:11:23 +0000 (02:11 +0100)] 
build: Fix #line statements in bison-generated files.

* gettext-tools/src/plural-exp.c: Revert changes from 2014-12-03 and 2014-12-04.
* gettext-runtime/intl/Makefile.in (PLURAL_OBJECT): Remove variable.
(OBJECTS): Use plural.lo always.
($(srcdir)/plural.c): New rule.
(.y.c, pluralx.c, pluralx.lo): Remove rules.
(mostlyclean): Delete the temporary file of the plural.c rule.
(maintainer-clean): Delete plural.c.
* gettext-tools/configure.ac (intl/Makefile): Remove PLURAL_OBJECT hack.

6 years agobuild: Fix #line statements in bison-generated files.
Bruno Haible [Sun, 25 Nov 2018 01:11:21 +0000 (02:11 +0100)] 
build: Fix #line statements in bison-generated files.

* gettext-tools/src/Makefile.am (po-gram-gen.c, cldr-plural.c): Override the
Automake .y.c rule.
(po-gram-gen.h, cldr-plural.h): Remove separate target.
(po-gram-gen2.h): Generate in the source directory.

6 years agomaint: Add write-up of how to do code coverage.
Bruno Haible [Sun, 25 Nov 2018 01:11:18 +0000 (02:11 +0100)] 
maint: Add write-up of how to do code coverage.

6 years agolibasprintf: On mingw, really use our vasprintf function, not mingw_vasprintf.
Bruno Haible [Sun, 25 Nov 2018 01:10:44 +0000 (02:10 +0100)] 
libasprintf: On mingw, really use our vasprintf function, not mingw_vasprintf.

mingw now has a definition of 'vasprintf' in <stdio.h> that redirects to
mingw_vasprintf, which does not support argument reordering (i.e.
HAVE_POSIX_PRINTF is not defined). Make sure to avoid this function and use
the one defined in our lib-asprintf.c instead.

* gettext-runtime/libasprintf/lib-asprintf.h (asprintf): Define as macro
redirecting to libasprintf_asprintf.
(vasprintf): Define as macro redirecting to libasprintf_vasprintf.
* gettext-runtime/libasprintf/lib-asprintf.c: Define also libasprintf_asprintf
and libasprintf_vasprintf.
* gettext-runtime/libasprintf/autosprintf.cc: Include lib-asprintf.h last.

6 years agomsginit: Add comment about test failure on native Windows.
Bruno Haible [Sun, 25 Nov 2018 01:10:40 +0000 (02:10 +0100)] 
msginit: Add comment about test failure on native Windows.

* gettext-tools/tests/msginit-3: Add comment.

6 years agomsginit: On native Windows, produce same PO header as on Unix.
Bruno Haible [Sun, 25 Nov 2018 01:10:36 +0000 (02:10 +0100)] 
msginit: On native Windows, produce same PO header as on Unix.

* gettext-tools/src/msginit.c (plural_forms): Eliminate a trailing CR.

6 years agoenvsubst: On native Windows, produce output suitable for the shell.
Bruno Haible [Sun, 25 Nov 2018 01:10:31 +0000 (02:10 +0100)] 
envsubst: On native Windows, produce output suitable for the shell.

* autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC): Add 'binary-io'.
* gettext-runtime/src/envsubst.c (main): In --variables mode, put stdout in
binary mode.

6 years agoFix some mingw test failures.
Bruno Haible [Sun, 25 Nov 2018 01:10:28 +0000 (02:10 +0100)] 
Fix some mingw test failures.

* gettext-tools/tests/intl-1: Ignore different end-of-line convention in the
output.
* gettext-tools/tests/intl-2: Likewise.
* gettext-tools/tests/intl-3: Likewise.
* gettext-tools/tests/msgfmt-desktop-1: Likewise.
* gettext-tools/tests/msgfmt-desktop-2: Likewise.
* gettext-tools/tests/sentence-1: Likewise.
* gettext-tools/tests/cldr-plurals-1: Likewise.
* gettext-tools/tests/lang-c: On native Windows, ignore different end-of-line
convention in the output.
* gettext-tools/tests/lang-c++: Likewise.
* gettext-tools/tests/msgfilter-8: On native Windows, use sh, not /bin/sh.

6 years agoFix some mingw test failures.
Bruno Haible [Sun, 25 Nov 2018 01:10:23 +0000 (02:10 +0100)] 
Fix some mingw test failures.

* gettext-tools/tests/init-env.in (wabs_srcdir, wabs_top_srcdir): New variables.
(GETTEXTDATADIR): On mingw, use native Windows syntax.
* gettext-tools/tests/format-c-3: Use wabs_srcdir instead of abs_srcdir, and
wabs_top_srcdir instead of abs_top_srcdir.
* gettext-tools/tests/format-c-4: Likewise.
* gettext-tools/tests/format-c-5: Likewise.
* gettext-tools/tests/gettextpo-1: Likewise.
* gettext-tools/tests/intl-1: Likewise.
* gettext-tools/tests/intl-2: Likewise.
* gettext-tools/tests/intl-3: Likewise.
* gettext-tools/tests/intl-4: Likewise.
* gettext-tools/tests/intl-setlocale-1: Likewise.
* gettext-tools/tests/intl-setlocale-2: Likewise.
* gettext-tools/tests/intl-thread-1: Likewise.
* gettext-tools/tests/intl-thread-2: Likewise.
* gettext-tools/tests/intl-thread-3: Likewise.
* gettext-tools/tests/msgfmt-qt-1: Likewise.
* gettext-tools/tests/msgfmt-qt-2: Likewise.
* gettext-tools/tests/msginit-3: Likewise.
* gettext-tools/tests/msginit-4: Likewise.
* gettext-tools/tests/msgmerge-compendium-5: Likewise.
* gettext-tools/tests/msgmerge-compendium-6: Likewise.
* gettext-tools/tests/msgunfmt-3: Likewise.
* gettext-tools/tests/msgunfmt-tcl-1: Likewise.
* gettext-tools/tests/msguniq-1: Likewise.
* gettext-tools/tests/msguniq-2: Likewise.
* gettext-tools/tests/msguniq-3: Likewise.
* gettext-tools/tests/msguniq-4: Likewise.
* gettext-tools/tests/plural-1: Likewise.
* gettext-tools/tests/xgettext-1: Likewise.
* gettext-tools/tests/xgettext-c-1: Likewise.
* gettext-tools/tests/xgettext-c-comment-6: Likewise.
* gettext-tools/tests/xgettext-c-escape-3: Likewise.
* gettext-tools/tests/xgettext-vala-2: Likewise.

6 years agointl: Fix gettext test failures on mingw.
Bruno Haible [Sun, 25 Nov 2018 01:10:09 +0000 (02:10 +0100)] 
intl: Fix gettext test failures on mingw.

* gettext-runtime/intl/localename.c (gl_locale_name_posix): Convert the result
of gl_locale_name_environ to XPG syntax.

6 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 25 Nov 2018 01:09:37 +0000 (02:09 +0100)] 
Update to newest gnulib.

6 years agoFix typo in comment.
Bruno Haible [Sun, 25 Nov 2018 01:08:30 +0000 (02:08 +0100)] 
Fix typo in comment.

* gettext-tools/src/msgexec.c (process_string): Fix typo in comment.

6 years agoFix typos in tests.
Bruno Haible [Sun, 25 Nov 2018 01:08:26 +0000 (02:08 +0100)] 
Fix typos in tests.

* gettext-tools/tests/msgfmt-desktop-1: Fix reference to MSGFMT variable.
* gettext-tools/tests/msgfmt-desktop-2: Likewise.
* gettext-tools/tests/msgfmt-xml-1: Likewise.
* gettext-tools/tests/msgfmt-xml-2: Likewise.

6 years agobuild: Remove generated files from version control.
Bruno Haible [Sun, 25 Nov 2018 01:08:20 +0000 (02:08 +0100)] 
build: Remove generated files from version control.

This creates a bootstrapping issue, but it can be mitigated:
If a user wants to build GNU gettext on a platform which does not have the
GNU gettext programs installed, they first need to build and install a tarball
of GNU gettext; then only they can build GNU gettext from the git repository.

* gettext-runtime/po/gettext-runtime.pot: Remove file.
* gettext-tools/po/gettext-tools.pot: Remove file.
* gettext-tools/examples/po/gettext-examples.pot: Remove file.