Commit Graph

6776 Commits

Author SHA1 Message Date
Daiki Ueno a4fccf1de9 THANKS: Update 2016-06-09 14:50:15 +09:00
Daiki Ueno a89aa6f41c gnulib-local: Work around regcomp.c compile error
* gnulib-local/Makefile.am (EXTRA_DIST): Add lib/regcomp.c.diff.
* gnulib-local/lib/regcomp.c.diff: New file, partially revert Gnulib
commit f97745b0.
2016-06-08 17:18:41 +09:00
Daiki Ueno 59d9b55bb2 tests: Use Exit instead of exit if init.sh is used
* gettext-tools/tests/*: Use Exit instead of exit, as suggested by
init.sh.
2016-06-08 15:28:49 +09:00
Daiki Ueno a2a048cfe3 build: Create intl/ChangeLog
* autogen.sh: Create an empty ChangeLog for gettext-runtime/intl, which
is necessary when running "make dist" from the top level directory.
2016-06-07 18:24:18 +09:00
Daiki Ueno 7116788c5c build: Simplify placeholder ChangeLog creation
* autogen.sh: Use empty ChangeLog for placeholder.  Bail out if any
error occurs in autoreconf phase.
2016-06-02 16:27:46 +09:00
Daiki Ueno e8641d2842 maint: Update release steps 2016-06-02 12:19:20 +09:00
Daiki Ueno 0fd6d55c8d tests: Check invalid input in sentence-1-prg
* gettext-tools/tests/sentence-1-prg.c (main): Check input buffer
overflow, while it is not possible with the current test case.
2016-06-01 15:56:40 +09:00
Daiki Ueno 37eaf300e5 tests: Fix test data for sentence-1
* gettext-tools/tests/sentence-1: Use NO-BREAK SPACE instead of
IDEOGRAPHIC SPACE.
2016-06-01 11:44:33 +09:00
Daiki Ueno b617be618b tests: Fix location of valgrind suppression file
* gettext-tools/tests/Makefile.am (CHECKER): Use $(abs_srcdir) instead
of $(srcdir).
2016-05-31 19:12:03 +09:00
Daiki Ueno cb11843590 tests: Turn sentence test into a shell script
For consistency with other tests.  Also it fixes a test failure when
built with --disable-shared, since LOG_COMPILER set to $(SHELL) doesn't
recognize binary executable.
* gettext-tools/tests/Makefile.am (TESTS): Rename 'sentence' to
'sentence-1'.
(check_PROGRAMS): Rename 'sentence' to 'sentence-1-prg'.
(sentence_1_prg_SOURCES): Rename from 'sentence_SOURCES'.
(sentence_1_prg_CPPFLAGS): Rename from 'sentence_CPPFLAGS'.
(sentence_1_prg_LDADD): Rename from 'sentence_LDADD'.
* gettext-tools/tests/sentence-1: New file.
* gettext-tools/tests/sentence-1-prg.c: Rename from sentence.c, move the
test data to sentence-1.
* gettext-tools/tests/.gitignore: Ignore sentence-1-prg.
2016-05-31 19:09:53 +09:00
Daiki Ueno 3b0a08337e maint: Update copyright year 2016-05-30 15:22:27 +09:00
Daiki Ueno 63c251b50e xgettext: Update usage documentation
* gettext-tools/src/xgettext.c (usage): Mention 'bullet-unicode' check.
2016-05-30 13:47:18 +09:00
Daniel Burr 7a8f93d8de build: Make libxml2 check tighter
* gnulib-local/m4/libxml.m4 (gl_LIBXML): Try to check
xmlXPathSetContextNode, which is available in libxml2 2.9.1 or later.
Problem reported by Dominyk in:
http://savannah.gnu.org/bugs/?46844

Copyright-paperwork-exempt: yes
2016-05-28 09:33:24 +09:00
Daiki Ueno 4bbb204a55 desktop: Add missing "extern" in header
* gettext-tools/src/read-desktop.h: Add "extern" to each function
declaration.
Possibly related to: https://savannah.gnu.org/bugs/?45896
2016-05-27 18:06:28 +09:00
Daiki Ueno 12f52f13b3 NEWS: Mention gettext.m4 change 2016-05-27 17:42:13 +09:00
Daiki Ueno b67399b40b m4: Rely less on internal symbols
* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): Skip checks for the
internal symbols _nl_msg_cat_cntr, _nl_domain_bindings, and
_nl_expand_alias, if __GNU_GETTEXT_SUPPORTED_REVISION is defined.
Problem reported and fix suggested by Masanori Ogino in:
https://lists.gnu.org/archive/html/bug-gettext/2016-04/msg00000.html
The rationale behind this is: (1) those symbol checks are for detecting
certain broken implementations, namely NetBSD and Solaris 7, and
(2) __GNU_GETTEXT_SUPPORTED_REVISION is not defined in those
implementations, while it is defined on compatible implementations, such
as musl-libc which doesn't have those internal symbols.
2016-05-27 17:39:22 +09:00
Daiki Ueno 34feee233a NEWS: Add 0.19.8 changes 2016-05-25 17:15:23 +09:00
Daiki Ueno 77dde02ef0 intl: Pacify pre-C99 compilers
* gettext-runtime/intl/plural-exp.h (HAVE_STRUCT_INITIALIZER): New
macro, based on the check previously in plural-exp.c.  Also add check
for __SUNPRO_C for Solaris Studio C compiler.
(GERMANIC_PLURAL): Define as 'struct expression' not 'const struct
expression' if struct/union initializers are not supported by the
compiler.
* gettext-runtime/intl/plural-exp.c: Use HAVE_STRUCT_INITIALIZER.
Reported by Dagobert Michelsen and investigated by pan7 in:
https://savannah.gnu.org/support/?108743
2016-05-25 15:25:27 +09:00
David Shea 68ab0dafa9 desktop: Fix invalid memory access
* gettext-tools/src/read-desktop.c (desktop_lex): Don't access memory
deallocated with realloc().  Reported in:
http://savannah.gnu.org/bugs/?47991
2016-05-24 11:10:27 +09:00
Daiki Ueno 3b5753977d tests: Add more tests for JavaScript format string
* gettext-tools/tests/format-javascript-1: Add test for multiple uses of
same argument.
* gettext-tools/tests/format-javascript-2: Use proper flag to activate
javascript format checker.
2016-05-23 12:04:23 +09:00
Daiki Ueno 9920621eaa javascript: Fix format type compatibility check
* gettext-tools/src/format-javascript.c (format_check): Check if the two
argument types are the same.
2016-05-23 12:02:31 +09:00
Daiki Ueno 6555704d4c tests: Add test for ITS search path
* gettext-tools/tests/Makefile.am (TESTS): Add new test.
* gettext-tools/tests/xgettext-its-2: New file.
2016-05-20 19:03:40 +09:00
Daiki Ueno 44f7525b65 search-path: Fix XDG_DATA_DIRS traversal
* gettext-tools/src/search-path.c (foreach_elements): Append "gettext"
suffix to each element from XDG_DATA_DIRS.
2016-05-20 17:34:25 +09:00
Daiki Ueno a83370b051 search-path: Don't relocate dirs given as envvar
* gettext-tools/src/search-path.c (foreach_function_ty): New typedef.
(path_array_ty): New struct.
(foreach_components, increment, fill): New functions.
(get_search_path): Rewrite using those functions.  Relocate
GETTEXTDATADIR here.
* gettext-tools/src/search-path.h (get_search_path): Update documentation.
* gettext-tools/src/msgfmt.c (main): Don't relocate directories in ITS
search path.
* gettext-tools/src/xgettext.c (main): Likewise.
2016-05-20 15:52:20 +09:00
Daiki Ueno 246b06a664 Update after Gnulib changed
* gnulib-local/lib/gettext.h: Update from gnulib.
* gettext-runtime/m4/extern-inline.m4: Likewise.
* gettext-runtime/m4/intdiv0.m4: Likewise.
2016-05-19 12:27:19 +09:00
Daiki Ueno aab762e6c0 Update gnulib
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Explicitly pull 'gettext',
as the module is now marked as obsolete.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove m4/hard-locale.m4.diff.
* gnulib-local/m4/hard-locale.m4.diff: Remove, as it is no longer
needed.
* gettext-tools/gnulib-lib/.gitignore: Ignore files brought by gnulib-tool.
* gettext-tools/gnulib-tests/.gitignore: Likewise.
* gettext-tools/libgettextpo/.gitignore: Likewise.
2016-05-19 12:03:00 +09:00
Daiki Ueno 4c33c9e153 maint: Add --no-git option to autogen.sh
* autogen.sh: Port --no-git option from Gnulib's bootstrap.
2016-05-18 18:22:12 +09:00
Daiki Ueno e26b846fe2 msgfmt, xgettext: Respect XDG_DATA_DIRS
Suggested in https://savannah.gnu.org/bugs/?47123
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add 'xmemdup0'.
* gettext-tools/gnulib-lib/.gitignore: Ignore files brought by gnulib-tool.
* gettext-tools/gnulib-tests/.gitignore: Likewise.
* gettext-tools/src/search-path.c: New file.
* gettext-tools/src/search-path.h: New file.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add search-path.h.
(libgettextsrc_la_SOURCES): Add search-path.c.
* gettext-tools/src/msgfmt.c: Include "search-path.h".
(main): Use get_search_path to locate ITS directories.
* gettext-tools/src/xgettext.c: Include "search-path.h".
(main): Use get_search_path to locate ITS directories.
2016-05-16 17:39:38 +09:00
Daiki Ueno cd95c53951 javascript: Avoid uninitialized variable
* gettext-tools/src/format-javascript.c (format_check): Fix
loop initialization.  Spotted by clang-analyzer.
2016-05-16 17:37:32 +09:00
Hanno Boeck 0571be87e0 lua: Avoid heap buffer overflow
* gettext-tools/src/x-lua.c (string_end): Allocate a room for
terminating NUL.  Reported in: http://savannah.gnu.org/bugs/?4753

Copyright-paperwork-exempt: yes
2016-03-26 04:17:40 +09:00
Daiki Ueno b4220c509a format-python-brace: Support chained expression
* gettext-tools/src/format-python-brace.c (parse_directive): Recognize
chained getattr/getitem expressions.
* gettext-tools/tests/format-python-brace-1: Add test for the case where
both getattr and getitem are used.
Reported by Paul Franklin in:
https://lists.gnu.org/archive/html/bug-gettext/2016-03/msg00017.html
2016-03-23 15:25:24 +09:00
Daiki Ueno 009c121859 doc: Fix ngettext usage example
* gettext-tools/doc/gettext.texi (Plural forms): Fix positional argument
syntax in the C example.  Reported by Jonathan Leffler in:
http://lists.gnu.org/archive/html/bug-gettext/2016-03/msg00002.html
2016-03-23 10:20:12 +09:00
Daiki Ueno 2328b5b5a7 javascript: Fix invalid memory access
* gettext-tools/src/format-javascript.c (format_parse): Fix numbered_arg
allocation for the unnumbered case.

Reported by Roger Mc Murtrie in: <http://savannah.gnu.org/bugs/?47492>.
2016-03-22 18:38:15 +09:00
Daiki Ueno 9e106a164d maint: Clean up .gitignore
* gettext-tools/gnulib-lib/.gitignore: Sort lines.
2016-03-22 15:09:20 +09:00
Daiki Ueno 298b532592 xgettext: Put --its help in the right section
* gettext-tools/src/xgettext.c (usage): Move --its=FILE option under
"Language specific options" from "Output details".
2016-03-02 18:10:12 +09:00
Daiki Ueno b0af5330b3 xgettext: Add new check bullet-unicode
* gettext-tools/src/xgettext.c (main): Generalize --check option
handling.
* gettext-tools/src/message.h (enum syntax_check_type): New enum value
sc_bullet_unicode.
(NSYNTAXCHECKS): Increment.
* gettext-tools/src/message.c (syntax_check_name): Add name for
sc_bullet_unicode.
* gettext-tools/src/msgl-check.c (struct bullet_ty, struct
bullet_stack_ty): New struct.
(bullet_stack): New variable.
(syntax_check_bullet_unicode): New function.
(sc_funcs): Register syntax_check_bullet_unicode as a check function for
sc_bullet_unicode.
* gettext-tools/tests/xgettext-14: Add tests for --check=bullet-unicode
2016-02-22 17:59:40 +09:00
Daiki Ueno 16c93d9147 doc: Mention the behavior stripping *.in
* gettext-tools/doc/gettext.texi (Preparing ITS Rules): Add footnote
explaining the matching behavior if the input file name has the .in
suffix.  Suggested by Jan Synacek.
2016-02-10 15:50:39 +09:00
Daiki Ueno 9b9ebf8f96 javascript: Support '%m$' in format strings
Gjs has had support for numbered arguments in format strings since 1.40.
Recognize it as well in format-javascript, so msgfmt -c doesn't fail
when numbered arguments are in msgstr.  Reported by Sean Burke in:
https://lists.gnu.org/archive/html/bug-gettext/2015-10/msg00002.html
* gettext-tools/src/format-javascript.c (struct numbered_arg): New
struct.
(struct spec): Rename format_args_count to numbered_arg_count.  Add
NUMBERED field in place of FORMAT_ARGS.  All callers changed.
(numbered_arg_compare): New function.
(format_parse): Handle numbered arguments.  Based on format-awk.c.
(format_check): Add check for numbered arguments.
* gettext-tools/tests/format-javascript-1: Add tests for numbered
arguments.
* gettext-tools/tests/lang-javascript: Use numbered argument in format
strings.  Add check for Gjs version >= 1.40.
2016-02-08 12:40:23 +09:00
Daiki Ueno c1eb1c8758 moopp: Revert file modes accidentally set 2016-02-08 11:59:56 +09:00
KO Myung-Hun 62d6e88d34 gettext-tools: Use a short name for DLLs on OS/2
OS/2 does not support a DLL name longer than 8 characters.

* gettext-tools/configure.ac (OS2): Define on OS/2.
* gettext-tools/gnulib-lib/Makefile.am (libgettextlib_la_LDFLAGS):
Set a DLL name to gtlib on OS/2.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_LDFLAGS):
Set a DLL name to gtpo on OS/2.
* gettext-tools/src/Makefile.am (libgettextsrc_la_LDFLAGS): Set a DLL
name to gtsrc on OS/2.
2016-01-20 11:38:26 +09:00
KO Myung-Hun 429e302f52 libasprintf: Build a shared library on OS/2
* gettext-runtime/libasprintf/configure.ac (LTNOUNDEF): Set to
-no-undefined on OS/2.
2016-01-20 11:38:23 +09:00
KO Myung-Hun 2a23de5580 intl: Support UNIXROOT in BINDTEXTDOMAIN () on EMX
$UNIXROOT is a drive on which a root of FHS is.

* gettext-runtime/intl/bindtextdom.c (BINDTEXTDOMAIN): Prepend
$UNIXROOT to dirname if it is started '/' or it is an empty string.
2016-01-20 11:38:19 +09:00
KO Myung-Hun 9c6af03886 moop: Replace CR as well as LF with a space
On OS/2, EOL marker is CR+LF.

* gnulib-local/bulid-aux/moopp (func_check_header_syntax):
Replace CR as well as LF with a space.
2016-01-20 11:37:18 +09:00
Bruno Haible 4d475fa298 Change msgfmt to produce little-endian .mo files by default.
* gettext-tools/src/msgfmt.c (main): Initialize 'byteswap' so as to
produce little-endian .mo files by default.
* gettext-tools/doc/gettext.texi: Update documentation.
* gettext-tools/doc/msgfmt.texi (--endianness): Likewise.
2016-01-15 10:18:25 +01:00
Daiki Ueno ba5d34e523 maint: Revert copyright year changes in test data
Some test programs started failing after mass update of copyright notice
for year 2016 (commit 7fa0c277), because of embedded test data with
fixed copyright dates.  Revert the commit for those files.
Reported by Bruno Haible.
* .x-update-copyright: Exclude test programs embedding copyright date.
* gettext-tools/tests/msgcomm-22: Revert the last change.
* gettext-tools/tests/msgfilter-sr-latin-1: Likewise.
* gettext-tools/tests/msggrep-1: Likewise.
* gettext-tools/tests/msggrep-2: Likewise.
* gettext-tools/tests/msggrep-3: Likewise.
* gettext-tools/tests/msggrep-4: Likewise.
* gettext-tools/tests/msggrep-5: Likewise.
* gettext-tools/tests/msggrep-9: Likewise.
* gettext-tools/tests/msggrep-11: Likewise.
* gettext-tools/tests/msgmerge-14: Likewise.
2016-01-13 18:57:25 +09:00
Daiki Ueno 21ca680c31 its: Recognize *.glade as a GtkBuilder file too 2016-01-07 12:00:43 +09:00
Santiago Vila d9cc9dd1de * PACKAGING: List version specific files
Copyright-paperwork-exempt: yes
2016-01-05 10:05:04 +09:00
Daiki Ueno 7fa0c2779d maint: Update copyright year 2016-01-02 18:58:05 +09:00
Daiki Ueno 931677259a Update gnulib 2016-01-02 18:42:56 +09:00
Daiki Ueno faacecdc43 maint: Use maintainer-makefile from gnulib
* autogen.sh: Pull GNUmakefile, maint.mk, and dependency scripts in
build-aux.
* cfg.mk (update-copyright-env): Adjust for gettext.
* .x-update-copyright: New file.
* .gitignore: Ignore files brought in by gnulib-tool.
2016-01-02 18:42:13 +09:00