]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
6 years agoMake sure that libintl.h declares the *wprintf overrides on Windows.
Bruno Haible [Mon, 8 Apr 2019 17:45:52 +0000 (19:45 +0200)] 
Make sure that libintl.h declares the *wprintf overrides on Windows.

* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Test for wprintf, not fwprintf.

6 years agoUpdate to newest gnulib.
Bruno Haible [Mon, 8 Apr 2019 09:02:18 +0000 (11:02 +0200)] 
Update to newest gnulib.

6 years agoautopoint: Don't risk failing because of user or system git configurations.
Bruno Haible [Mon, 8 Apr 2019 01:07:08 +0000 (03:07 +0200)] 
autopoint: Don't risk failing because of user or system git configurations.

Reported by Jamie Kirkpatrick <jkp@kirkconsulting.co.uk>
in <https://savannah.gnu.org/support/?107689>.

* gettext-tools/misc/autopoint.in: Set/unset environment variables, so that git
does not read the user's git configuration nor the system's git configuration.
* gettext-tools/misc/convert-archive.in: Likewise.

6 years agoxgettext: Recognize ECMAScript-262 6th edition template literals.
Bruno Haible [Sun, 7 Apr 2019 23:54:50 +0000 (01:54 +0200)] 
xgettext: Recognize ECMAScript-262 6th edition template literals.

Reported by Philip Chimento <philip.chimento@gmail.com>
in <https://savannah.gnu.org/bugs/index.php?50920>.

* gettext-tools/src/x-javascript.c (P7_TEMPLATE_START_OF_EXPRESSION): New macro.
(enum token_type_ty): Add token_type_template, token_type_ltemplate,
token_type_mtemplate, token_type_rtemplate.
(free_token): Treat token_type_template like token_type_string.
(phase7_getuc): Add support for backquote quote_char.
(brace_depth, template_literal_depth): New variables.
(phase5_get): Parse template literals.
(x_javascript_lex): Treat token_type_template like token_type_string. Handle the
combination of symbol followed by template.
(extract_balanced): Treat token_type_template like token_type_string, and
token_type_ltemplate, token_type_mtemplate, token_type_rtemplate like
token_type_other.
(extract_javascript): Initialize brace_depth, template_literal_depth.
* gettext-tools/tests/xgettext-javascript-7: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
* gettext-tools/doc/gettext.texi (JavaScript): Mention the template literal
syntax for strings.
* NEWS: Mention the improvement.

6 years agoxgettext: Make JavaScript parser more robust.
Bruno Haible [Sun, 7 Apr 2019 23:52:20 +0000 (01:52 +0200)] 
xgettext: Make JavaScript parser more robust.

* gettext-tools/src/x-javascript.c (extract_javascript): Initialize
inside_embedded_js_in_xml.

6 years agobuild: Verify that newly added files have an appropriate copyright notice.
Bruno Haible [Sun, 7 Apr 2019 16:56:57 +0000 (18:56 +0200)] 
build: Verify that newly added files have an appropriate copyright notice.

* check-copyright-headers: New file.
* Makefile.am (EXTRA_DIST): Add it.
(distcheck-hook): Run check-copyright-headers and fail if it fails.

6 years agodoc: Add copyright notices in several files.
Bruno Haible [Sun, 7 Apr 2019 14:53:38 +0000 (16:53 +0200)] 
doc: Add copyright notices in several files.

Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.

* gettext-runtime/doc/nls.texi: Add delegating copyright notice.
* gettext-runtime/doc/rt-*.texi: Likewise.
* gettext-tools/doc/autopoint.texi: Likewise.
* gettext-tools/doc/gettextize.texi: Likewise.
* gettext-tools/doc/msg*.texi: Likewise.
* gettext-tools/doc/xgettext.texi: Likewise.

6 years agobuild: Unify the three copies of texi2html.
Bruno Haible [Sun, 7 Apr 2019 13:46:28 +0000 (15:46 +0200)] 
build: Unify the three copies of texi2html.

* build-aux/texi2html: Moved to here from libtextstyle/build-aux/texi2html.
* libtextstyle/autogen.sh: Copy texi2html.
* gettext-runtime/libasprintf/texi2html: Remove file.
* gettext-runtime/libasprintf/Makefile.am (TEXI2HTML): Use build-aux/texi2html.
(EXTRA_DIST): Remove texi2html.
* gettext-tools/doc/texi2html: Remove file.
* gettext-tools/doc/Makefile.am (TEXI2HTML): Use build-aux/texi2html.
(EXTRA_DIST): Remove texi2html.
* Makefile.am (EXTRA_DIST): Add build-aux/texi2html.
(distcheck-hook): Update.

6 years agodoc: Use a version of texi2html which is under a good license.
Bruno Haible [Sun, 7 Apr 2019 13:38:54 +0000 (15:38 +0200)] 
doc: Use a version of texi2html which is under a good license.

Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.

* gettext-tools/doc/texi2html: Copied from texi2html-1.78, with changes made in
libunistring/build-aux/texi2html and then in libtextstyle/build-aux/texi2html.
* gettext-tools/doc/gettext.texi: Enable the Top node during texi2html
processing.
* gettext-tools/doc/Makefile.am (gettext.html): Use texi2html options
-no-sec-nav -no-menu -toc-links.
(gettext_toc.html): Likewise. Pull out generated files out of subdirectory.

6 years agolibasprintf: Use a version of texi2html which is under a good license.
Bruno Haible [Sun, 7 Apr 2019 13:33:24 +0000 (15:33 +0200)] 
libasprintf: Use a version of texi2html which is under a good license.

Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.

* gettext-runtime/libasprintf/texi2html: Copied from texi2html-1.78, with
changes made in libunistring/build-aux/texi2html and then in
libtextstyle/build-aux/texi2html.
* gettext-runtime/libasprintf/fdl.texi: New file, copied from
gettext-tools/doc/fdl.texi.
* gettext-runtime/libasprintf/gpl.texi: New file, copied from
gnulib/doc/gpl-2.0.texi.
* gettext-runtime/libasprintf/lgpl.texi: New file, copied from
gnulib/doc/lgpl-2.1.texi.
* gettext-runtime/libasprintf/autosprintf.texi: Invoke @contents. Enable the
Top node during texi2html processing.
(Licenses): New appendix.
* gettext-runtime/libasprintf/Makefile.am (TEXINCLUDES): New variable.
(MAKEINFOFLAGS): Use it.
(autosprintf_TEXINFOS): New variable.
(autosprintf_all.html): Depend on it. Use texi2html options -no-sec-nav -no-menu
-toc-links.

6 years agolibtextstyle: Tweak style of HTML documentation.
Bruno Haible [Sun, 7 Apr 2019 13:19:20 +0000 (15:19 +0200)] 
libtextstyle: Tweak style of HTML documentation.

* libtextstyle/build-aux/texi2html (BIG_RULE): Set to empty.

6 years agoAdd copyright notices in several files.
Bruno Haible [Sun, 7 Apr 2019 11:48:11 +0000 (13:48 +0200)] 
Add copyright notices in several files.

Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.

* gettext-tools/doc/FAQ.html: Fix copyright notice added on 2019-04-04.
* gettext-tools/doc/tutorial.html: Add GFDL copyright notice. Permission given
by Gora Mohanty <gora_mohanty@yahoo.co.in> through private email on 2004-11-13.
* gettext-tools/po/Makevars.template: Don't mention the file name, since this
file is meant to be copied and renamed to 'Makevars'.
* gettext-tools/examples/hello-*/po/Makevars: Add all-permissive copyright
notice.
* gettext-tools/examples/hello-c-gnome3/hello.ui: Add public-domain notice.
* gettext-tools/examples/hello-c-gnome3/hello.gresource.xml: Likewise.
* gettext-tools/examples/hello-c-gnome3/hello.gschema.xml: Likewise.
* gettext-tools/examples/hello-java-awt/m4/TestAWT.java: Likewise.
* gettext-tools/examples/hello-java-swing/m4/TestAWT.java: Likewise.
* gettext-tools/examples/hello-java-qtjambi/m4/Test15.java: Likewise.
* gettext-tools/examples/check-examples: Add GPLv3+ copyright notice.
* gettext-tools/examples/installpaths.in: Likewise.
* gettext-tools/examples/po/mmsmallpo.sh: Likewise.
* gettext-tools/examples/po/xsmallpot.sh: Likewise.
* gettext-tools/its/glade.loc: Likewise.
* gettext-tools/its/gsettings.loc: Likewise.
* gettext-tools/its/metainfo.its: Likewise.
* gettext-tools/its/metainfo.loc: Likewise.
* gettext-tools/src/filters.h: Add missing copyright line.

6 years agoReduce ABOUT-NLS to just a hyperlink.
Bruno Haible [Thu, 4 Apr 2019 02:20:32 +0000 (04:20 +0200)] 
Reduce ABOUT-NLS to just a hyperlink.

The common way to distribute information, nowadays, is through the web,
not by including files in tarballs of packages.  Also, the current
contents of ABOUT-NLS is outdated.

Reported by Samuel Thibault in <https://savannah.gnu.org/bugs/?54809>.

* gettext-runtime/ABOUT-NLS: Replace text with a reference to the online
documentation.
* gettext-runtime/Makefile.am (MAKEINFO): Remove variable.
(all-local, ABOUT-NLS): Remove rules.
* gettext-tools/src/msginit.c (main): Point the user to the online documentation
instead of the ABOUT-NLS file.
* gettext-tools/doc/gettext.texi (Installing Localizations, Prerequisites,
Makefile): Don't mention ABOUT-NLS any more.
* gettext-tools/doc/gettextize.texi: Update description of ABOUT-NLS.
* gettext-tools/doc/FAQ.html: Refer to the online documentation instead of the
ABOUT-NLS file.
* README: Don't mention ABOUT-NLS any more.

6 years agodoc: Include the contents of ABOUT-NLS in the documentation.
Bruno Haible [Wed, 3 Apr 2019 23:52:58 +0000 (01:52 +0200)] 
doc: Include the contents of ABOUT-NLS in the documentation.

* gettext-runtime/doc/nls.texi (The original ABOUT-NLS): Renamed from
'Translation Intro'. Turn into a section. Mark section as historical.
* gettext-tools/doc/gettext.texi: Include nls.texi.
* gettext-tools/doc/Makefile.am (gettext_TEXINFOS): Add nls.texi and
matrix.texi.

6 years agodoc: Update ISO 639 list.
Bruno Haible [Wed, 3 Apr 2019 23:49:54 +0000 (01:49 +0200)] 
doc: Update ISO 639 list.

* gettext-tools/doc/iso-639.texi: Regenerated.

6 years agoAdd copyright notices in several files.
Bruno Haible [Wed, 3 Apr 2019 23:17:33 +0000 (01:17 +0200)] 
Add copyright notices in several files.

Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.

* gettext-runtime/m4/Makefile.am: Add GPL copyright notice.
* gettext-tools/m4/Makefile.am: Likewise.
* gettext-tools/doc/iso-639.sed: Likewise.
* gettext-tools/doc/iso-639-2.sed: Likewise.
* gettext-tools/doc/iso-3166.sed: Likewise.
* gettext-tools/its/glade1.its: Likewise.
* gettext-tools/its/glade2.its: Likewise.
* gettext-tools/its/gsettings.its: Likewise.
* gettext-tools/its/gtkbuilder.its: Likewise.
* gettext-tools/misc/cvsuser.c: Likewise.
* gettext-tools/projects/team-address: Likewise.
* gettext-tools/projects/GNOME/team-address: Likewise.
* gettext-tools/projects/GNOME/trigger: Likewise.
* gettext-tools/projects/KDE/team-address: Likewise.
* gettext-tools/projects/KDE/trigger: Likewise.
* gettext-tools/projects/TP/team-address: Likewise.
* windows/windres-options: Likewise.
* gettext-runtime/po/insert-header.sin: Add copyright notice, based on the one
in Rules-quot.
* gettext-tools/doc/FAQ.html: Add copyright notice, suitable for documentation.

6 years agoMention the support for Java 11.
Bruno Haible [Wed, 3 Apr 2019 02:04:06 +0000 (04:04 +0200)] 
Mention the support for Java 11.

This support was added in gnulib on 2018-09-26.

* NEWS: Mention the support for Java 11.

6 years agolibtextstyle: Clean up old TODO item.
Bruno Haible [Tue, 2 Apr 2019 22:02:47 +0000 (00:02 +0200)] 
libtextstyle: Clean up old TODO item.

* libtextstyle/Makefile.am: Remove obsolete comment.

6 years agolibtextstyle: Distribute two more files.
Bruno Haible [Tue, 2 Apr 2019 20:04:25 +0000 (22:04 +0200)] 
libtextstyle: Distribute two more files.

* libtextstyle/Makefile.am (EXTRA_DIST): Add
gnulib-local/lib/libxml/xmlversion.in.h.diff, gnulib-local/modules/libxml.diff.

6 years agobuild: Move local gnulib modules that are only needed in libtextstyle.
Bruno Haible [Tue, 2 Apr 2019 16:33:26 +0000 (18:33 +0200)] 
build: Move local gnulib modules that are only needed in libtextstyle.

* libtextstyle/gnulib-local/*: Many files moved to here from gnulib-local/*.
* libtextstyle/gnulib-local/modules/libglib: Apply diff.
* libtextstyle/gnulib-local/modules/libglib.diff: Remove file.
* libtextstyle/gnulib-local/modules/libcroco: Apply diff.
* libtextstyle/gnulib-local/modules/libcroco.diff: Remove file.
* libtextstyle/gnulib-local/modules/term-styled-ostream: Apply diff.
* libtextstyle/gnulib-local/modules/term-styled-ostream.diff: Remove file.
* libtextstyle/gnulib-local/modules/html-styled-ostream: Apply diff.
* libtextstyle/gnulib-local/modules/html-styled-ostream.diff: Remove file.
* libtextstyle/gnulib-local/modules/noop-styled-ostream: Apply diff.
* libtextstyle/gnulib-local/modules/noop-styled-ostream.diff: Remove file.
* libtextstyle/woe32dll/c++term-styled-ostream.cc: Remove file.
* libtextstyle/woe32dll/c++html-styled-ostream.cc: Remove file.
* libtextstyle/woe32dll/c++noop-styled-ostream.cc: Remove file.
* gettext-tools/woe32dll/c++term-styled-ostream.cc: Remove file.
* gettext-tools/woe32dll/c++html-styled-ostream.cc: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove the files that were moved away.
* libtextstyle/Makefile.am (EXTRA_DIST): Add the files that were moved to
libtextstyle/gnulib-local/. Add build-aux/moopp.
* Makefile.am (EXTRA_DIST): Remove build-aux/moopp.

6 years agolibgettextpo: Avoid closing a FILE stream when it will still be used.
Bruno Haible [Tue, 2 Apr 2019 19:14:32 +0000 (21:14 +0200)] 
libgettextpo: Avoid closing a FILE stream when it will still be used.

* gettext-tools/src/write-catalog.c (msgdomain_list_print): Don't call
ostream_free if we're using the dummy <textstyle.h>.

6 years agolibgettextpo: Use a dummy replacement for libtextstyle.
Bruno Haible [Tue, 2 Apr 2019 15:53:08 +0000 (17:53 +0200)] 
libgettextpo: Use a dummy replacement for libtextstyle.

* gnulib-local/modules/libtextstyle-dummy: New file, based on gnulib's
modules/libtextstyle-optional.
* gnulib-local/Makefile.am (EXTRA_DIST): Add it.
* autogen.sh (GNULIB_MODULES_LIBGETTEXTPO): Add libtextstyle-dummy. Remove
file-ostream, ostream.
* gettext-tools/src/write-catalog.h: Include <textstyle.h> always.
* gettext-tools/src/write-catalog.c: Likewise.
* gettext-tools/src/write-po.h: Likewise.
* gettext-tools/src/write-po.c: Likewise.

6 years agoLink the msg* and xgettext programs against libtextstyle.
Bruno Haible [Tue, 2 Apr 2019 15:53:00 +0000 (17:53 +0200)] 
Link the msg* and xgettext programs against libtextstyle.

* libtextstyle/autogen.sh: Don't generate lib/color.h and lib/color.c.
* libtextstyle/lib/color.h: Moved to here from gettext-tools/src/color.h.
* libtextstyle/lib/color.c: Moved to here from gettext-tools/src/color.c.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Remove fd-ostream, file-ostream,
html-styled-ostream, ostream, styled-ostream, term-styled-ostream. Add libxml.
* gettext-tools/gnulib-lib/Makefile.am (MOOPPFLAGS): Remove customization.
* gettext-tools/gnulib-tests/Makefile.am (test_term_ostream_LDADD): Remove
customization.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Remove color.h.
(AM_CPPFLAGS): Add -I directives to the libtextstyle/lib directory.
(libgettextsrc_la_SOURCES): Remove color.c.
(libgettextsrc_la_LDFLAGS): Link with libtextstyle.la.
* gettext-tools/src/FILES: Update.
* gettext-tools/src/write-catalog.h: Include <textstyle.h> instead of ostream.h.
* gettext-tools/src/write-catalog.c: Include <textstyle.h> instead of color.h
and *-ostream.h.
(msgdomain_list_print): Use styled_ostream_create and
noop_styled_ostream_create.
* gettext-tools/src/write-po.h: Include <textstyle.h> instead of ostream.h.
* gettext-tools/src/write-po.c: Include <textstyle.h> instead of *-ostream.h.
(is_stylable): Remove function.
(begin_css_class, end_css_class): Update. Mark as inline.
* gettext-tools/src/write-properties.c: Include <textstyle.h> instead of
ostream.h.
* gettext-tools/src/write-stringtable.c: Likewise.
* gettext-tools/src/msgattrib.c: Include <textstyle.h> instead of color.h.
* gettext-tools/src/msgcat.c: Likewise.
* gettext-tools/src/msgcomm.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgfilter.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/xgettext.c: Likewise.

6 years agolibtextstyle: Generalize fd-styled-ostream to noop-styled-ostream.
Bruno Haible [Tue, 2 Apr 2019 15:52:29 +0000 (17:52 +0200)] 
libtextstyle: Generalize fd-styled-ostream to noop-styled-ostream.

* gnulib-local/lib/noop-styled-ostream.oo.h: New file, based on
gnulib-local/lib/fd-styled-ostream.oo.h.
* gnulib-local/lib/noop-styled-ostream.oo.c: New file, based on
gnulib-local/lib/fd-styled-ostream.oo.c.
* gnulib-local/modules/noop-styled-ostream: New file, based on
gnulib-local/modules/fd-styled-ostream.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove lib/fd-styled-ostream.oo.[hc]
and modules/fd-styled-ostream. Add lib/noop-styled-ostream.oo.[hc] and
modules/noop-styled-ostream.
* libtextstyle/woe32dll/c++noop-styled-ostream.cc: New file, based on
libtextstyle/woe32dll/c++fd-styled-ostream.cc.
* libtextstyle/gnulib-local/modules/noop-styled-ostream.diff: New file, based
on libtextstyle/gnulib-local/modules/fd-styled-ostream.diff.
* gnulib-local/lib/fd-styled-ostream.oo.h: Remove file.
* gnulib-local/lib/fd-styled-ostream.oo.c: Remove file.
* gnulib-local/modules/fd-styled-ostream: Remove file.
* libtextstyle/woe32dll/c++fd-styled-ostream.cc: Remove file.
* libtextstyle/gnulib-local/modules/fd-styled-ostream.diff: Remove file.
* libtextstyle/autogen.sh (GNULIB_MODULES): Add noop-styled-ostream. Remove
fd-styled-ostream.
* libtextstyle/lib/misc.c: Include noop-styled-ostream.h, fd-ostream.h.
(styled_ostream_create): Call fd_ostream_create and noop_styled_ostream_create
instead of fd_styled_ostream_create.
* libtextstyle/lib/textstyle.h (noop_styled_ostream_t): New type.
(noop_styled_ostream_*): New declarations.
* libtextstyle/doc/libtextstyle.texi (The noop_styled_ostream class): New
subsection.

6 years agobuild: Build and install libtextstyle.
Bruno Haible [Tue, 2 Apr 2019 15:52:20 +0000 (17:52 +0200)] 
build: Build and install libtextstyle.

* autogen.sh: Recurse into libtextstyle directory.
* configure.ac: Likewise.
* Makefile.am (SUBDIRS): Add libtextstyle.
* DEPENDENCIES: Mention that libiconv and ncurses are also used by libtextstyle.
* PACKAGING: Recommend to ship libtextstyle as a third binary package.
* NEWS: Mention that libtextstyle is installed.

6 years agobuild: Separate git operations from build operations.
Bruno Haible [Tue, 2 Apr 2019 15:51:13 +0000 (17:51 +0200)] 
build: Separate git operations from build operations.

* gitsub.sh: New file, from gnulib.
* autogen.sh: Remove all git operations and the --no-git option. Look at the
GNULIB_SRCDIR environment variable. Ignore the GNULIB_TOOL environment variable.
* HACKING: Explain when to use gitsub.sh.

6 years agolibtextstyle: Bump version number.
Bruno Haible [Tue, 2 Apr 2019 13:54:24 +0000 (15:54 +0200)] 
libtextstyle: Bump version number.

6 years agodesktop: Fix whitespace handling around '='
Daiki Ueno [Mon, 1 Apr 2019 05:17:19 +0000 (07:17 +0200)] 
desktop: Fix whitespace handling around '='

While the spec only allows spaces before and after '=',
xgettext/msgfmt previously accepted all whitespaces including '\n'.
That was causing unwanted concatenation of desktop lines.

Reported by Bastien Nocera in:
https://lists.gnu.org/archive/html/bug-gettext/2019-03/msg00017.html

* gettext-tools/src/read-desktop.c (desktop_lex): Properly handle
space characters before and after '='.
* gettext-tools/tests/msgfmt-desktop-1: Add a test case.

6 years agolibtextstyle: Bump version number.
Bruno Haible [Mon, 1 Apr 2019 00:53:36 +0000 (02:53 +0200)] 
libtextstyle: Bump version number.

6 years agolibtextstyle: Add support for true-color terminals.
Bruno Haible [Sun, 31 Mar 2019 20:05:16 +0000 (22:05 +0200)] 
libtextstyle: Add support for true-color terminals.

* gnulib-local/lib/term-ostream.oo.c (colormodel_t): Add cm_xtermrgb.
(rgb_to_color_xtermrgb): New function.
(attributes_t): Extend the color fields to 25 bits.
(struct term_ostream): New fields active_attr_color, active_attr_bgcolor.
(out_color_change, out_bgcolor_change, term_ostream::rgb_to_color): Handle
cm_xtermrgb.
(out_attr_change): Set also active_attr_color, active_attr_bgcolor.
(async_set_attributes_from_default): Fetch also active_attr_color,
active_attr_bgcolor.
(term_ostream_create): Accept all $TERM values that end in -direct.
* libtextstyle/doc/libtextstyle.texi (Terminal emulators): Document the
prerequisites for true-color support.
* libtextstyle/NEWS: Mention the change.

6 years agomaint: Make code more "git diff"-friendly.
Bruno Haible [Sun, 31 Mar 2019 16:57:58 +0000 (18:57 +0200)] 
maint: Make code more "git diff"-friendly.

* gettext-runtime/src/envsubst.c: Prefer long lines to lines that start with a
non-whitespace character.
* gettext-tools/src/cldr-plurals.c: Likewise.
* gettext-tools/src/format.c: Likewise.
* gettext-tools/src/msgcmp.c: Likewise.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msggrep.c: Likewise.
* gettext-tools/src/msgl-cat.c: Likewise.
* gettext-tools/src/msgl-charset.c: Likewise.
* gettext-tools/src/msgl-check.c: Likewise.
* gettext-tools/src/msgl-iconv.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/po-lex.c: Likewise.
* gettext-tools/src/read-stringtable.c: Likewise.
* gettext-tools/src/recode-sr-latin.c: Likewise.
* gettext-tools/src/write-catalog.c: Likewise.
* gettext-tools/src/write-java.c: Likewise.
* gettext-tools/src/write-po.c: Likewise.
* gettext-tools/src/x-csharp.c: Likewise.
* gettext-tools/src/x-elisp.c: Likewise.
* gettext-tools/src/x-java.c: Likewise.
* gettext-tools/src/x-javascript.c: Likewise.
* gettext-tools/src/x-librep.c: Likewise.
* gettext-tools/src/x-lisp.c: Likewise.
* gettext-tools/src/x-perl.c: Likewise.
* gettext-tools/src/x-python.c: Likewise.
* gettext-tools/src/x-scheme.c: Likewise.
* gettext-tools/src/x-sh.c: Likewise.
* gettext-tools/src/x-tcl.c: Likewise.
* gettext-tools/src/x-vala.c: Likewise.
* gettext-tools/src/xg-encoding.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.

6 years agolibtextstyle: Improve documentation regarding the TERM value.
Bruno Haible [Sun, 31 Mar 2019 14:55:38 +0000 (16:55 +0200)] 
libtextstyle: Improve documentation regarding the TERM value.

* libtextstyle/doc/libtextstyle.texi (The TERM variable): Many more details.
(Terminal emulators, Consoles): New subsections.

6 years agolibtextstyle: Support for terminal types with 256 colors.
Bruno Haible [Sun, 31 Mar 2019 14:50:40 +0000 (16:50 +0200)] 
libtextstyle: Support for terminal types with 256 colors.

* gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Accept all $TERM
values that end in -16color or -256 color (such as Eterm-256color,
mlterm-256color, or putty-256color).
* libtextstyle/NEWS: Mention the change.

6 years agopo-mode: Enable highlighting of #, lines.
Takesi Ayanokoji [Sat, 30 Mar 2019 13:30:13 +0000 (14:30 +0100)] 
po-mode: Enable highlighting of #, lines.

* gettext-tools/emacs/po-mode.el (po-font-lock-keywords): Add rule for #, lines.

6 years agopo-mode: Remove support for Emacs versions < 22.
Bruno Haible [Sat, 30 Mar 2019 13:23:41 +0000 (14:23 +0100)] 
po-mode: Remove support for Emacs versions < 22.

Emacs 22 is the oldest version still in use, see
<https://repology.org/project/emacs/versions>.

* gettext-tools/emacs/po-compat.el: Remove conditional code for Emacs < 22.
* gettext-tools/emacs/po-mode.el: Likewise.
(po-rehighlight): Remove function.
(po-check-all-pending-edits, po-check-for-pending-edit): Update.
* gettext-tools/emacs/start-po.el: Update comment.

6 years agopo-mode: Remove support for XEmacs.
Bruno Haible [Sat, 30 Mar 2019 12:00:11 +0000 (13:00 +0100)] 
po-mode: Remove support for XEmacs.

* gettext-tools/emacs/po-mode.el: Remove conditional code for XEmacs.
* gettext-tools/emacs/po-compat.el: Likwise.

6 years agobuild: Move the Emacs package sources to subdirectory gettext-tools/emacs/.
Bruno Haible [Sat, 30 Mar 2019 10:45:00 +0000 (11:45 +0100)] 
build: Move the Emacs package sources to subdirectory gettext-tools/emacs/.

* gettext-tools/emacs/*.el: Moved here from gettext-tools/misc/.
* gettext-tools/emacs/Makefile.am: New file, based on
gettext-tools/misc/Makefile.am.
* gettext-tools/misc/Makefile.am (lisp_LISP): Remove variable.
* gettext-tools/configure.ac (AC_CONFIG_FILES): Add emacs/Makefile.
* gettext-tools/Makefile.am (SUBDIRS): Add 'emacs'.

6 years agoUpdate after gnulib changed.
Bruno Haible [Sat, 30 Mar 2019 11:05:10 +0000 (12:05 +0100)] 
Update after gnulib changed.

6 years agolibtextstyle: Add support for Windows consoles.
Bruno Haible [Wed, 27 Mar 2019 20:38:20 +0000 (21:38 +0100)] 
libtextstyle: Add support for Windows consoles.

* gnulib-local/lib/term-ostream.oo.c: Include <windows.h>, msvc-nothrow.h,
<io.h>.
(struct term_ostream): Add fields handle, is_windows_console,
default_console_attributes, current_console_attributes.
(out_color_change, out_bgcolor_change, out_underline_change, out_attr_change,
restore, async_restore, async_set_attributes_from_default, term_ostream::flush):
Add separate code path for Windows consoles.
(term_ostream_create): On Windows, test whether the handle refers to a console,
and initialize the new fields.
* gnulib-local/modules/term-ostream (Depends-on): Add msvc-nothrow.
* libtextstyle/NEWS: Mention it.

6 years agolibtextstyle: Make the SIGCONT handler work more reliably.
Bruno Haible [Wed, 27 Mar 2019 20:38:14 +0000 (21:38 +0100)] 
libtextstyle: Make the SIGCONT handler work more reliably.

* gnulib-local/lib/term-ostream.oo.c (out_attr_change): Modify active_attr
before emitting the escape sequences, not afterwards.
* libtextstyle/NEWS: Mention the fix.

6 years agolibtextstyle: Mention fixes.
Bruno Haible [Wed, 27 Mar 2019 20:38:08 +0000 (21:38 +0100)] 
libtextstyle: Mention fixes.

* libtextstyle/NEWS: Mention two fixes done in the gnulib module
'term-style-control'.

6 years agolibtextstyle: Small fix for last commit.
Bruno Haible [Wed, 27 Mar 2019 20:38:02 +0000 (21:38 +0100)] 
libtextstyle: Small fix for last commit.

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

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

6 years agoits: Simplify code.
Bruno Haible [Wed, 27 Mar 2019 20:36:14 +0000 (21:36 +0100)] 
its: Simplify code.

Suggested by Daiki Ueno.

* gettext-tools/src/its.c (normalize_whitespace): Remove local variable.

6 years agoits: Fix test failure.
Bruno Haible [Tue, 26 Mar 2019 22:05:09 +0000 (23:05 +0100)] 
its: Fix test failure.

* gettext-tools/src/its.c (normalize_whitespace): Fix detection of paragraph
boundary. Get rid of initial trim() call.
* gettext-tools/tests/xgettext-its-1: Fix typo. Verify removal of whitespace
at the end of the last paragraph.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add memchr.

6 years agobuild: Use gnulib module 'strchrnul' explicitly.
Bruno Haible [Tue, 26 Mar 2019 22:00:52 +0000 (23:00 +0100)] 
build: Use gnulib module 'strchrnul' explicitly.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add strchrnul.

6 years agolibtextstyle: Use gnulib module 'term-style-control'.
Bruno Haible [Sun, 24 Mar 2019 22:40:43 +0000 (23:40 +0100)] 
libtextstyle: Use gnulib module 'term-style-control'.

* gnulib-local/lib/term-ostream.oo.h: Include term-style-control.h.
(ttyctl_t): Remove type.
* gnulib-local/lib/term-ostream.oo.c (DEBUG_SIGNALS): Remove macro.
Don't include <signal.h>, <stdio.h>, <sys/stat.h>, fatal-signal.h,
sig-handler.h, same-inode.h.
(SIZEOF): Remove macro.
(nonintr_tcgetattr, nonintr_tcsetattr): Remove functions.
(log_message, sprintf_integer, simple_errno_string, simple_signal_string,
log_signal_handler_called): Remove functions.
(struct term_ostream): Remove fields tty_control, same_as_stderr,
non_default_active. Add control_data field instead.
(get_control_data): New function.
(BLOCK_SIGNALS_DURING_NON_DEFAULT_STYLE_OUTPUT): Remove macro.
(term_fd): Remove variable.
(pgrp_status_t): Remove type.
(pgrp_status): Remove variable.
(update_pgrp_status): Remove function.
(out_filename): Remove variable.
(out_error): Use out_stream instead of out_filename.
(restore, tcsetattr_failed): Remove functions.
(orig_lflag_set, orig_lflag): Remove variables.
(clobber_local_mode, restore_local_mode): Remove functions.
(job_control_signals): Remove variable.
(num_job_control_signals): Remove macro.
(relevant_signal_set, relevant_signal_set_initialized): Remove variables.
(init_relevant_signal_set, block_relevant_signals, unblock_relevant_signals,
is_ignored, show_signal_marker, fatal_or_stopping_signal_handler,
fatal_signal_handler, stopping_signal_handler, continuing_signal_handler,
ensure_continuing_signal_handler, ensure_other_signal_handlers): Remove
functions.
(out_attr_change): Set out_stream and out_fd.
(activate_non_default_attr, deactivate_non_default_attr): Remove functions.
(restore, async_restore, async_set_attributes_from_default): New functions.
(controller): New variable.
(activate_default_attr, output_buffer): Update.
(term_ostream::free): Invoke deactivate_term_style_controller.
(term_ostream_create): Invoke activate_term_style_controller.
* gnulib-local/m4/term-ostream.m4 (gl_TERM_OSTREAM): Don't test for tcgetattr().
* gnulib-local/modules/term-ostream (Depends-on): Add term-style-control. Remove
fatal-signal, sigaction, sigprocmask, same-inode.

6 years agomoopp: Allow forward references to the <class>_representation type.
Bruno Haible [Sun, 24 Mar 2019 21:14:21 +0000 (22:14 +0100)] 
moopp: Allow forward references to the <class>_representation type.

* gnulib-local/build-aux/moopp (func_version): Bump copyright year.
(func_emit_source_c): Move the <class>_representation type alias to the top
of the file.

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)/'.