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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.