diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-06-11 13:13:21 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-06-11 13:13:21 +0000 |
commit | 500500ec9b7b0d0cef90b48c9b4ddc8866b5f19c (patch) | |
tree | 1d7b3e6fab5c199fdbbaab53ee9532de6a4c8cf7 /gettext-tools/src | |
parent | 6eb5949dd99d174393465069c2fd0bab32deddcc (diff) | |
download | gettext-tarball-500500ec9b7b0d0cef90b48c9b4ddc8866b5f19c.tar.gz |
gettext-0.19.8.1HEADgettext-0.19.8.1master
Diffstat (limited to 'gettext-tools/src')
221 files changed, 894 insertions, 436 deletions
diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index 7109072..0538d1e 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -1,6 +1,5 @@ ## Makefile for the gettext-tools/src subdirectory of GNU gettext -## Copyright (C) 1995-1998, 2000-2011, 2015 Free Software Foundation, -## Inc. +## Copyright (C) 1995-1998, 2000-2011, 2015-2016 Free Software Foundation, Inc. ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -40,7 +39,7 @@ read-po.h read-properties.h read-stringtable.h \ str-list.h \ color.h write-catalog.h write-po.h write-properties.h write-stringtable.h \ dir-list.h file-list.h po-gram-gen.h po-gram-gen2.h cldr-plural.h \ -cldr-plural-exp.h locating-rule.h its.h \ +cldr-plural-exp.h locating-rule.h its.h search-path.h \ msgl-charset.h msgl-equal.h msgl-iconv.h msgl-ascii.h msgl-cat.h msgl-header.h \ msgl-english.h msgl-check.h msgl-fsearch.h msgfmt.h msgunfmt.h \ plural-count.h plural-eval.h plural-distrib.h \ @@ -154,7 +153,7 @@ msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \ msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c plural-eval.c \ plural-table.c quote.h sentence.h sentence.c \ $(FORMAT_SOURCE) \ -read-desktop.c locating-rule.c its.c +read-desktop.c locating-rule.c its.c search-path.c # msggrep needs pattern matching. LIBGREP = ../libgrep/libgrep.a @@ -256,6 +255,11 @@ libgettextsrc_la_LDFLAGS = \ -release @VERSION@ \ ../gnulib-lib/libgettextlib.la $(LTLIBUNISTRING) @LTLIBINTL@ @LTLIBICONV@ -lc -no-undefined +# OS/2 does not support a DLL name longer than 8 characters. +if OS2 +libgettextsrc_la_LDFLAGS += -os2dllname gtsrc +endif + libgettextsrc_la_CPPFLAGS = $(AM_CPPFLAGS) $(INCXML) # Tell the mingw or Cygwin linker which symbols to export. diff --git a/gettext-tools/src/Makefile.in b/gettext-tools/src/Makefile.in index 00da903..5b2c785 100644 --- a/gettext-tools/src/Makefile.in +++ b/gettext-tools/src/Makefile.in @@ -96,11 +96,14 @@ bin_PROGRAMS = msgcmp$(EXEEXT) msgfmt$(EXEEXT) msgmerge$(EXEEXT) \ noinst_PROGRAMS = hostname$(EXEEXT) urlget$(EXEEXT) \ cldr-plurals$(EXEEXT) +# OS/2 does not support a DLL name longer than 8 characters. +@OS2_TRUE@am__append_1 = -os2dllname gtsrc + # Tell the mingw or Cygwin linker which symbols to export. -@WOE32DLL_TRUE@am__append_1 = ../woe32dll/gettextsrc-exports.c -@WOE32DLL_TRUE@am__append_2 = -Wl,--export-all-symbols -@WOE32DLL_TRUE@am__append_3 = $(GETTEXTLIB_EXPORTS_FLAGS) -@WOE32_TRUE@am__append_4 = gettext.res +@WOE32DLL_TRUE@am__append_2 = ../woe32dll/gettextsrc-exports.c +@WOE32DLL_TRUE@am__append_3 = -Wl,--export-all-symbols +@WOE32DLL_TRUE@am__append_4 = $(GETTEXTLIB_EXPORTS_FLAGS) +@WOE32_TRUE@am__append_5 = gettext.res subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = \ @@ -133,6 +136,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/gnulib-m4/ctype.m4 \ $(top_srcdir)/gnulib-m4/curses.m4 \ $(top_srcdir)/gnulib-m4/dirent_h.m4 \ + $(top_srcdir)/gnulib-m4/dirfd.m4 \ $(top_srcdir)/gnulib-m4/double-slash-root.m4 \ $(top_srcdir)/gnulib-m4/dup.m4 $(top_srcdir)/gnulib-m4/dup2.m4 \ $(top_srcdir)/gnulib-m4/eaccess.m4 \ @@ -169,6 +173,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/gnulib-m4/gettimeofday.m4 \ $(top_srcdir)/gnulib-m4/gnulib-common.m4 \ $(top_srcdir)/gnulib-m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib-m4/hard-locale.m4 \ $(top_srcdir)/gnulib-m4/iconv_h.m4 \ $(top_srcdir)/gnulib-m4/iconv_open.m4 \ $(top_srcdir)/gnulib-m4/include_next.m4 \ @@ -417,7 +422,7 @@ am__libgettextsrc_la_SOURCES_DIST = message.c po-error.c po-xerror.c \ format-qt-plural.c format-kde.c format-kde-kuit.c \ format-boost.c format-lua.c format-javascript.c \ ../woe32dll/c++format.cc read-desktop.c locating-rule.c its.c \ - ../woe32dll/gettextsrc-exports.c + search-path.c ../woe32dll/gettextsrc-exports.c am__objects_1 = libgettextsrc_la-message.lo \ libgettextsrc_la-po-error.lo libgettextsrc_la-po-xerror.lo \ libgettextsrc_la-read-catalog-abstract.lo \ @@ -499,7 +504,7 @@ am_libgettextsrc_la_OBJECTS = $(am__objects_1) \ libgettextsrc_la-plural-table.lo libgettextsrc_la-sentence.lo \ $(am__objects_2) libgettextsrc_la-read-desktop.lo \ libgettextsrc_la-locating-rule.lo libgettextsrc_la-its.lo \ - $(am__objects_3) + libgettextsrc_la-search-path.lo $(am__objects_3) libgettextsrc_la_OBJECTS = $(am_libgettextsrc_la_OBJECTS) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_cldr_plurals_OBJECTS = cldr_plurals-cldr-plural.$(OBJEXT) \ @@ -2163,7 +2168,7 @@ AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies subdir-objects # Special rules for Tcl auxiliary program. EXTRA_DIST = FILES project-id gnu/gettext/DumpResource.java \ gnu/gettext/GetURL.java msgfmt.cs msgunfmt.cs msgunfmt.tcl -MOSTLYCLEANFILES = core *.stackdump $(am__append_4) +MOSTLYCLEANFILES = core *.stackdump $(am__append_5) CLEANFILES = gnu.gettext.DumpResource$(EXEEXT) \ gnu.gettext.GetURL$(EXEEXT) gettext.jar gnu/gettext/*.class \ msgfmt.net.exe msgfmt.net.exe.mdb msgunfmt.net.exe \ @@ -2177,7 +2182,7 @@ read-po.h read-properties.h read-stringtable.h \ str-list.h \ color.h write-catalog.h write-po.h write-properties.h write-stringtable.h \ dir-list.h file-list.h po-gram-gen.h po-gram-gen2.h cldr-plural.h \ -cldr-plural-exp.h locating-rule.h its.h \ +cldr-plural-exp.h locating-rule.h its.h search-path.h \ msgl-charset.h msgl-equal.h msgl-iconv.h msgl-ascii.h msgl-cat.h msgl-header.h \ msgl-english.h msgl-check.h msgl-fsearch.h msgfmt.h msgunfmt.h \ plural-count.h plural-eval.h plural-distrib.h \ @@ -2258,7 +2263,8 @@ libgettextsrc_la_SOURCES = $(COMMON_SOURCE) read-catalog.c color.c \ msgl-header.c msgl-english.c msgl-check.c file-list.c \ msgl-charset.c po-time.c plural-exp.c plural-eval.c \ plural-table.c quote.h sentence.h sentence.c $(FORMAT_SOURCE) \ - read-desktop.c locating-rule.c its.c $(am__append_1) + read-desktop.c locating-rule.c its.c search-path.c \ + $(am__append_2) # msggrep needs pattern matching. LIBGREP = ../libgrep/libgrep.a @@ -2329,8 +2335,8 @@ cldr_plurals_LDADD = libgettextsrc.la $(LDADD) # use iconv(). libgettextsrc_la_LDFLAGS = -release @VERSION@ \ ../gnulib-lib/libgettextlib.la $(LTLIBUNISTRING) @LTLIBINTL@ \ - @LTLIBICONV@ -lc -no-undefined $(am__append_2) -libgettextsrc_la_CPPFLAGS = $(AM_CPPFLAGS) $(INCXML) $(am__append_3) + @LTLIBICONV@ -lc -no-undefined $(am__append_1) $(am__append_3) +libgettextsrc_la_CPPFLAGS = $(AM_CPPFLAGS) $(INCXML) $(am__append_4) # Compile-time flags for particular source files. msgmerge_CFLAGS = $(AM_CFLAGS) $(OPENMP_CFLAGS) @@ -3008,6 +3014,9 @@ libgettextsrc_la-locating-rule.lo: locating-rule.c libgettextsrc_la-its.lo: its.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgettextsrc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgettextsrc_la-its.lo `test -f 'its.c' || echo '$(srcdir)/'`its.c +libgettextsrc_la-search-path.lo: search-path.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgettextsrc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgettextsrc_la-search-path.lo `test -f 'search-path.c' || echo '$(srcdir)/'`search-path.c + ../woe32dll/libgettextsrc_la-gettextsrc-exports.lo: ../woe32dll/gettextsrc-exports.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgettextsrc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../woe32dll/libgettextsrc_la-gettextsrc-exports.lo `test -f '../woe32dll/gettextsrc-exports.c' || echo '$(srcdir)/'`../woe32dll/gettextsrc-exports.c diff --git a/gettext-tools/src/cldr-plural-exp.c b/gettext-tools/src/cldr-plural-exp.c index e55b26d..c4554f3 100644 --- a/gettext-tools/src/cldr-plural-exp.c +++ b/gettext-tools/src/cldr-plural-exp.c @@ -1,5 +1,5 @@ /* Unicode CLDR plural rule parser and converter - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2015. diff --git a/gettext-tools/src/cldr-plural-exp.h b/gettext-tools/src/cldr-plural-exp.h index 84c8a73..8f69bb8 100644 --- a/gettext-tools/src/cldr-plural-exp.h +++ b/gettext-tools/src/cldr-plural-exp.h @@ -1,5 +1,5 @@ /* Unicode CLDR plural rule parser and converter - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2015. diff --git a/gettext-tools/src/cldr-plural.y b/gettext-tools/src/cldr-plural.y index d3128cd..6b2824d 100644 --- a/gettext-tools/src/cldr-plural.y +++ b/gettext-tools/src/cldr-plural.y @@ -1,5 +1,5 @@ /* Unicode CLDR plural rule parser and converter - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2015. diff --git a/gettext-tools/src/cldr-plurals.c b/gettext-tools/src/cldr-plurals.c index abbd0c2..56c4581 100644 --- a/gettext-tools/src/cldr-plurals.c +++ b/gettext-tools/src/cldr-plurals.c @@ -1,5 +1,5 @@ /* Unicode CLDR plural rule parser and converter - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2015. diff --git a/gettext-tools/src/color.c b/gettext-tools/src/color.c index b372b2e..7e3d146 100644 --- a/gettext-tools/src/color.c +++ b/gettext-tools/src/color.c @@ -1,5 +1,5 @@ /* Color and styling handling. - Copyright (C) 2006-2008, 2015 Free Software Foundation, Inc. + Copyright (C) 2006-2008, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2006. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/color.h b/gettext-tools/src/color.h index 25211ac..14bbaf9 100644 --- a/gettext-tools/src/color.h +++ b/gettext-tools/src/color.h @@ -1,5 +1,5 @@ /* Color and styling handling. - Copyright (C) 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2006. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/dir-list.c b/gettext-tools/src/dir-list.c index 2ab0fd2..09f7f92 100644 --- a/gettext-tools/src/dir-list.c +++ b/gettext-tools/src/dir-list.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1996, 1998, 2000-2002, 2006, 2015 Free Software + Copyright (C) 1996, 1998, 2000-2002, 2006, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/dir-list.h b/gettext-tools/src/dir-list.h index 954e017..d21ca60 100644 --- a/gettext-tools/src/dir-list.h +++ b/gettext-tools/src/dir-list.h @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1996, 1998, 2000-2003, 2015 Free Software Foundation, + Copyright (C) 1996, 1998, 2000-2003, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/file-list.c b/gettext-tools/src/file-list.c index c60f6a0..02ce000 100644 --- a/gettext-tools/src/file-list.c +++ b/gettext-tools/src/file-list.c @@ -1,5 +1,5 @@ /* Reading file lists. - Copyright (C) 1995-1998, 2000-2002, 2007, 2015 Free Software + Copyright (C) 1995-1998, 2000-2002, 2007, 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/file-list.h b/gettext-tools/src/file-list.h index a43f6a4..fc98d29 100644 --- a/gettext-tools/src/file-list.h +++ b/gettext-tools/src/file-list.h @@ -1,5 +1,5 @@ /* Reading file lists. - Copyright (C) 2001-2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/filter-quote.c b/gettext-tools/src/filter-quote.c index 25ac391..23967a2 100644 --- a/gettext-tools/src/filter-quote.c +++ b/gettext-tools/src/filter-quote.c @@ -1,5 +1,5 @@ /* Convert ASCII quotations to Unicode quotations. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 Free Software Foundation, Inc. Written by Daiki Ueno <ueno@gnu.org>, 2014. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/filter-sr-latin.c b/gettext-tools/src/filter-sr-latin.c index ea5457f..632ed8d 100644 --- a/gettext-tools/src/filter-sr-latin.c +++ b/gettext-tools/src/filter-sr-latin.c @@ -1,5 +1,5 @@ /* Recode Serbian text from Cyrillic to Latin script. - Copyright (C) 2006-2007, 2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Danilo Šegan <danilo@gnome.org>, 2006, and Bruno Haible <bruno@clisp.org>, 2006. diff --git a/gettext-tools/src/format-awk.c b/gettext-tools/src/format-awk.c index efaa2d7..0142649 100644 --- a/gettext-tools/src/format-awk.c +++ b/gettext-tools/src/format-awk.c @@ -1,5 +1,5 @@ /* awk format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. diff --git a/gettext-tools/src/format-boost.c b/gettext-tools/src/format-boost.c index a390078..f079f9f 100644 --- a/gettext-tools/src/format-boost.c +++ b/gettext-tools/src/format-boost.c @@ -1,5 +1,5 @@ /* Boost format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2006. diff --git a/gettext-tools/src/format-c-parse.h b/gettext-tools/src/format-c-parse.h index 4918fd5..e90e5fd 100644 --- a/gettext-tools/src/format-c-parse.h +++ b/gettext-tools/src/format-c-parse.h @@ -1,5 +1,5 @@ /* Parsing C format strings. - Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/format-c.c b/gettext-tools/src/format-c.c index b2dc9dc..6ccc8e4 100644 --- a/gettext-tools/src/format-c.c +++ b/gettext-tools/src/format-c.c @@ -1,5 +1,5 @@ /* C format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/format-csharp.c b/gettext-tools/src/format-csharp.c index 1f5e715..7a593b1 100644 --- a/gettext-tools/src/format-csharp.c +++ b/gettext-tools/src/format-csharp.c @@ -1,5 +1,5 @@ /* C# format strings. - Copyright (C) 2003-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2003-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/format-elisp.c b/gettext-tools/src/format-elisp.c index 2eb99ac..1300c1c 100644 --- a/gettext-tools/src/format-elisp.c +++ b/gettext-tools/src/format-elisp.c @@ -1,5 +1,5 @@ /* Emacs Lisp format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. diff --git a/gettext-tools/src/format-gcc-internal.c b/gettext-tools/src/format-gcc-internal.c index f5ca5e8..797756b 100644 --- a/gettext-tools/src/format-gcc-internal.c +++ b/gettext-tools/src/format-gcc-internal.c @@ -1,5 +1,5 @@ /* GCC internal format strings. - Copyright (C) 2003-2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2003-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/format-gfc-internal.c b/gettext-tools/src/format-gfc-internal.c index 1932c17..5965ab7 100644 --- a/gettext-tools/src/format-gfc-internal.c +++ b/gettext-tools/src/format-gfc-internal.c @@ -1,5 +1,5 @@ /* GFC (GNU Fortran Compiler) internal format strings. - Copyright (C) 2003-2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2003-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2009. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/format-invalid.h b/gettext-tools/src/format-invalid.h index ed6c501..1a4517e 100644 --- a/gettext-tools/src/format-invalid.h +++ b/gettext-tools/src/format-invalid.h @@ -1,5 +1,5 @@ /* Common reasons that make a format string invalid. - Copyright (C) 2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/format-java.c b/gettext-tools/src/format-java.c index a69c84f..e2b271e 100644 --- a/gettext-tools/src/format-java.c +++ b/gettext-tools/src/format-java.c @@ -1,5 +1,5 @@ /* Java format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/format-javascript.c b/gettext-tools/src/format-javascript.c index fa39e20..42f2dce 100644 --- a/gettext-tools/src/format-javascript.c +++ b/gettext-tools/src/format-javascript.c @@ -1,5 +1,5 @@ /* JavaScript format strings. - Copyright (C) 2001-2004, 2006-2009, 2013, 2015 Free Software + Copyright (C) 2001-2004, 2006-2009, 2013, 2015-2016 Free Software Foundation, Inc. Written by Andreas Stricker <andy@knitter.ch>, 2010. It's based on python format module from Bruno Haible. @@ -34,15 +34,15 @@ #define _(str) gettext (str) -/* Although JavaScript specification itself does not define any format - strings, many implementations provide printf-like functions. - We provide a permissive parser which accepts commonly used format - strings, where: +/* JavaScript format strings are not in the language specification, + but there are several implementations which provide the printf-like + feature. Here, we provide a permissive parser which at least accepts + format strings supported by Gjs version 1.40, where: A directive - - starts with '%', + - starts with '%' or '%m$' where m is a positive integer, - is optionally followed by any of the characters '0', '-', ' ', - or, each of which acts as a flag, + or 'I', each of which acts as a flag, - is optionally followed by a width specification: a nonempty digit sequence, - is optionally followed by '.' and a precision specification: a nonempty @@ -65,12 +65,18 @@ enum format_arg_type FAT_FLOAT }; +struct numbered_arg +{ + unsigned int number; + enum format_arg_type type; +}; + struct spec { unsigned int directives; - unsigned int format_args_count; + unsigned int numbered_arg_count; unsigned int allocated; - enum format_arg_type *format_args; + struct numbered_arg *numbered; }; /* Locale independent test for a decimal digit. @@ -80,32 +86,71 @@ struct spec #define isdigit(c) ((unsigned int) ((c) - '0') < 10) +static int +numbered_arg_compare (const void *p1, const void *p2) +{ + unsigned int n1 = ((const struct numbered_arg *) p1)->number; + unsigned int n2 = ((const struct numbered_arg *) p2)->number; + + return (n1 > n2 ? 1 : n1 < n2 ? -1 : 0); +} + static void * format_parse (const char *format, bool translated, char *fdi, char **invalid_reason) { const char *const format_start = format; struct spec spec; + unsigned int unnumbered_arg_count; struct spec *result; spec.directives = 0; - spec.format_args_count = 0; + spec.numbered_arg_count = 0; spec.allocated = 0; - spec.format_args = NULL; + spec.numbered = NULL; + unnumbered_arg_count = 0; for (; *format != '\0';) if (*format++ == '%') { /* A directive. */ + unsigned int number = 0; enum format_arg_type type; FDI_SET (format - 1, FMTDIR_START); spec.directives++; + if (isdigit (*format)) + { + const char *f = format; + unsigned int m = 0; + + do + { + m = 10 * m + (*f - '0'); + f++; + } + while (isdigit (*f)); + + if (*f == '$') + { + if (m == 0) + { + *invalid_reason = INVALID_ARGNO_0 (spec.directives); + FDI_SET (f, FMTDIR_ERROR); + goto bad_format; + } + number = m; + format = ++f; + } + } + + /* Parse flags. */ while (*format == '-' || *format == '+' || *format == ' ' || *format == '0' || *format == 'I') format++; + /* Parse width. */ while (isdigit (*format)) format++; @@ -152,15 +197,50 @@ format_parse (const char *format, bool translated, char *fdi, goto bad_format; } - if (*format != '%') + if (type != FAT_NONE) { - if (spec.allocated == spec.format_args_count) + if (number) + { + /* Numbered argument. */ + + /* Numbered and unnumbered specifications are exclusive. */ + if (unnumbered_arg_count > 0) + { + *invalid_reason = INVALID_MIXES_NUMBERED_UNNUMBERED (); + FDI_SET (format, FMTDIR_ERROR); + goto bad_format; + } + + if (spec.allocated == spec.numbered_arg_count) + { + spec.allocated = 2 * spec.allocated + 1; + spec.numbered = (struct numbered_arg *) xrealloc (spec.numbered, spec.allocated * sizeof (struct numbered_arg)); + } + spec.numbered[spec.numbered_arg_count].number = number; + spec.numbered[spec.numbered_arg_count].type = type; + spec.numbered_arg_count++; + } + else { - spec.allocated = 2 * spec.allocated + 1; - spec.format_args = (enum format_arg_type *) xrealloc (spec.format_args, spec.allocated * sizeof (enum format_arg_type)); + /* Unnumbered argument. */ + + /* Numbered and unnumbered specifications are exclusive. */ + if (spec.numbered_arg_count > 0) + { + *invalid_reason = INVALID_MIXES_NUMBERED_UNNUMBERED (); + FDI_SET (format, FMTDIR_ERROR); + goto bad_format; + } + + if (spec.allocated == unnumbered_arg_count) + { + spec.allocated = 2 * spec.allocated + 1; + spec.numbered = (struct numbered_arg *) xrealloc (spec.numbered, spec.allocated * sizeof (struct numbered_arg)); + } + spec.numbered[unnumbered_arg_count].number = unnumbered_arg_count + 1; + spec.numbered[unnumbered_arg_count].type = type; + unnumbered_arg_count++; } - spec.format_args[spec.format_args_count] = type; - spec.format_args_count++; } FDI_SET (format, FMTDIR_END); @@ -168,13 +248,63 @@ format_parse (const char *format, bool translated, char *fdi, format++; } + /* Convert the unnumbered argument array to numbered arguments. */ + if (unnumbered_arg_count > 0) + spec.numbered_arg_count = unnumbered_arg_count; + /* Sort the numbered argument array, and eliminate duplicates. */ + else if (spec.numbered_arg_count > 1) + { + unsigned int i, j; + bool err; + + qsort (spec.numbered, spec.numbered_arg_count, + sizeof (struct numbered_arg), numbered_arg_compare); + + /* Remove duplicates: Copy from i to j, keeping 0 <= j <= i. */ + err = false; + for (i = j = 0; i < spec.numbered_arg_count; i++) + if (j > 0 && spec.numbered[i].number == spec.numbered[j-1].number) + { + enum format_arg_type type1 = spec.numbered[i].type; + enum format_arg_type type2 = spec.numbered[j-1].type; + enum format_arg_type type_both; + + if (type1 == type2) + type_both = type1; + else + { + /* Incompatible types. */ + type_both = FAT_NONE; + if (!err) + *invalid_reason = + INVALID_INCOMPATIBLE_ARG_TYPES (spec.numbered[i].number); + err = true; + } + + spec.numbered[j-1].type = type_both; + } + else + { + if (j < i) + { + spec.numbered[j].number = spec.numbered[i].number; + spec.numbered[j].type = spec.numbered[i].type; + } + j++; + } + spec.numbered_arg_count = j; + if (err) + /* *invalid_reason has already been set above. */ + goto bad_format; + } + result = XMALLOC (struct spec); *result = spec; return result; bad_format: - if (spec.format_args != NULL) - free (spec.format_args); + if (spec.numbered != NULL) + free (spec.numbered); return NULL; } @@ -183,8 +313,8 @@ format_free (void *descr) { struct spec *spec = (struct spec *) descr; - if (spec->format_args != NULL) - free (spec->format_args); + if (spec->numbered != NULL) + free (spec->numbered); free (spec); } @@ -205,30 +335,69 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality, struct spec *spec2 = (struct spec *) msgstr_descr; bool err = false; - if (spec1->format_args_count + spec2->format_args_count > 0) + if (spec1->numbered_arg_count + spec2->numbered_arg_count > 0) { - unsigned int i; + unsigned int i, j; + unsigned int n1 = spec1->numbered_arg_count; + unsigned int n2 = spec2->numbered_arg_count; - /* Check the argument types are the same. */ - if (spec1->format_args_count != spec2->format_args_count) + /* Check the argument names are the same. + Both arrays are sorted. We search for the first difference. */ + for (i = 0, j = 0; i < n1 || j < n2; ) { - if (error_logger) - error_logger (_("number of format specifications in '%s' and '%s' does not match"), - pretty_msgid, pretty_msgstr); - err = true; - } - else - for (i = 0; i < spec2->format_args_count; i++) - if (!(spec1->format_args[i] == spec2->format_args[i] - || (!equality - && (spec1->format_args[i] == FAT_ANY - || spec2->format_args[i] == FAT_ANY)))) + int cmp = (i >= n1 ? 1 : + j >= n2 ? -1 : + spec1->numbered[i].number > spec2->numbered[j].number ? 1 : + spec1->numbered[i].number < spec2->numbered[j].number ? -1 : + 0); + if (cmp > 0) { if (error_logger) - error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"), - pretty_msgid, pretty_msgstr, i + 1); + error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"), + spec2->numbered[j].number, pretty_msgstr, + pretty_msgid); err = true; + break; } + else if (cmp < 0) + { + if (equality) + { + if (error_logger) + error_logger (_("a format specification for argument %u doesn't exist in '%s'"), + spec1->numbered[i].number, pretty_msgstr); + err = true; + break; + } + else + i++; + } + else + j++, i++; + } + /* Check the argument types are the same. */ + if (!err) + for (i = 0, j = 0; j < n2; ) + { + if (spec1->numbered[i].number == spec2->numbered[j].number) + { + if (!(spec1->numbered[i].type == spec2->numbered[j].type + || (!equality + && (spec1->numbered[i].type == FAT_ANY + || spec2->numbered[i].type == FAT_ANY)))) + { + if (error_logger) + error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"), + pretty_msgid, pretty_msgstr, + spec2->numbered[j].number); + err = true; + break; + } + j++, i++; + } + else + i++; + } } return err; @@ -265,11 +434,11 @@ format_print (void *descr) } printf ("("); - for (i = 0; i < spec->format_args_count; i++) + for (i = 0; i < spec->numbered_arg_count; i++) { if (i > 0) printf (" "); - switch (spec->format_args[i]) + switch (spec->numbered[i].type) { case FAT_ANY: printf ("*"); diff --git a/gettext-tools/src/format-kde-kuit.c b/gettext-tools/src/format-kde-kuit.c index 128d05d..ab9568d 100644 --- a/gettext-tools/src/format-kde-kuit.c +++ b/gettext-tools/src/format-kde-kuit.c @@ -1,5 +1,5 @@ /* KUIT (KDE User Interface Text) format strings. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. Written by Daiki Ueno <ueno@gnu.org>, 2015. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/format-kde.c b/gettext-tools/src/format-kde.c index 6848781..6adddba 100644 --- a/gettext-tools/src/format-kde.c +++ b/gettext-tools/src/format-kde.c @@ -1,5 +1,5 @@ /* KDE format strings. - Copyright (C) 2003-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2003-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2007. diff --git a/gettext-tools/src/format-librep.c b/gettext-tools/src/format-librep.c index 9c15aea..7e99de0 100644 --- a/gettext-tools/src/format-librep.c +++ b/gettext-tools/src/format-librep.c @@ -1,5 +1,5 @@ /* librep format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/format-lisp.c b/gettext-tools/src/format-lisp.c index 2f9949e..f6c7f93 100644 --- a/gettext-tools/src/format-lisp.c +++ b/gettext-tools/src/format-lisp.c @@ -1,5 +1,5 @@ /* Lisp format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/format-lua.c b/gettext-tools/src/format-lua.c index 6a68b82..1345555 100644 --- a/gettext-tools/src/format-lua.c +++ b/gettext-tools/src/format-lua.c @@ -1,5 +1,5 @@ /* Lua format strings. - Copyright (C) 2012, 2015 Free Software Foundation, Inc. + Copyright (C) 2012, 2015-2016 Free Software Foundation, Inc. Written by Ľubomír Remák <lubomirr@lubomirr.eu>, 2012. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/format-pascal.c b/gettext-tools/src/format-pascal.c index b443ba7..e56b3e5 100644 --- a/gettext-tools/src/format-pascal.c +++ b/gettext-tools/src/format-pascal.c @@ -1,5 +1,5 @@ /* Object Pascal format strings. - Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/format-perl-brace.c b/gettext-tools/src/format-perl-brace.c index 64a0663..b6cbf04 100644 --- a/gettext-tools/src/format-perl-brace.c +++ b/gettext-tools/src/format-perl-brace.c @@ -1,5 +1,5 @@ /* Perl brace format strings. - Copyright (C) 2004, 2006-2007, 2015 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2007, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/format-perl.c b/gettext-tools/src/format-perl.c index af741e9..3d01616 100644 --- a/gettext-tools/src/format-perl.c +++ b/gettext-tools/src/format-perl.c @@ -1,5 +1,5 @@ /* Perl format strings. - Copyright (C) 2004, 2006-2007, 2009, 2015 Free Software Foundation, + Copyright (C) 2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/format-php.c b/gettext-tools/src/format-php.c index ebaaa33..bac5a47 100644 --- a/gettext-tools/src/format-php.c +++ b/gettext-tools/src/format-php.c @@ -1,5 +1,5 @@ /* PHP format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2002. diff --git a/gettext-tools/src/format-python-brace.c b/gettext-tools/src/format-python-brace.c index 4323230..c76088c 100644 --- a/gettext-tools/src/format-python-brace.c +++ b/gettext-tools/src/format-python-brace.c @@ -1,5 +1,5 @@ /* Python brace format strings. - Copyright (C) 2004, 2006-2007, 2013, 2015 Free Software Foundation, + Copyright (C) 2004, 2006-2007, 2013, 2015-2016 Free Software Foundation, Inc. Written by Daiki Ueno <ueno@gnu.org>, 2013. @@ -140,42 +140,49 @@ parse_directive (struct spec *spec, return false; } - c = *format; - if (c == '.') + /* Parse '.' (getattr) or '[..]' (getitem) operators followed by a + name. If must not recurse, but can be specifed in a chain, such + as "foo.bar.baz[0]". */ + for (;;) { - format++; - if (!parse_named_field (spec, &format, translated, fdi, - invalid_reason)) - { - *invalid_reason = - xasprintf (_("In the directive number %u, '%c' cannot start a getattr argument."), spec->directives, *format); - FDI_SET (format, FMTDIR_ERROR); - return false; - } c = *format; - } - else if (c == '[') - { - format++; - if (!parse_named_field (spec, &format, translated, fdi, - invalid_reason) - && !parse_numeric_field (spec, &format, translated, fdi, - invalid_reason)) + + if (c == '.') { - *invalid_reason = - xasprintf (_("In the directive number %u, '%c' cannot start a getitem argument."), spec->directives, *format); - FDI_SET (format, FMTDIR_ERROR); - return false; + format++; + if (!parse_named_field (spec, &format, translated, fdi, + invalid_reason)) + { + *invalid_reason = + xasprintf (_("In the directive number %u, '%c' cannot start a getattr argument."), spec->directives, *format); + FDI_SET (format, FMTDIR_ERROR); + return false; + } } - - c = *format++; - if (c != ']') + else if (c == '[') { - *invalid_reason = INVALID_UNTERMINATED_DIRECTIVE (); - FDI_SET (format, FMTDIR_ERROR); - return false; + format++; + if (!parse_named_field (spec, &format, translated, fdi, + invalid_reason) + && !parse_numeric_field (spec, &format, translated, fdi, + invalid_reason)) + { + *invalid_reason = + xasprintf (_("In the directive number %u, '%c' cannot start a getitem argument."), spec->directives, *format); + FDI_SET (format, FMTDIR_ERROR); + return false; + } + + c = *format++; + if (c != ']') + { + *invalid_reason = INVALID_UNTERMINATED_DIRECTIVE (); + FDI_SET (format, FMTDIR_ERROR); + return false; + } } - c = *format; + else + break; } if (c == ':') diff --git a/gettext-tools/src/format-python.c b/gettext-tools/src/format-python.c index 8af3c12..408553b 100644 --- a/gettext-tools/src/format-python.c +++ b/gettext-tools/src/format-python.c @@ -1,6 +1,5 @@ /* Python format strings. - Copyright (C) 2001-2004, 2006-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2004, 2006-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/format-qt-plural.c b/gettext-tools/src/format-qt-plural.c index fafe6ab..fd26c5c 100644 --- a/gettext-tools/src/format-qt-plural.c +++ b/gettext-tools/src/format-qt-plural.c @@ -1,5 +1,5 @@ /* Qt plural format strings. - Copyright (C) 2003-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2003-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2009. diff --git a/gettext-tools/src/format-qt.c b/gettext-tools/src/format-qt.c index abdc4da..1db68c5 100644 --- a/gettext-tools/src/format-qt.c +++ b/gettext-tools/src/format-qt.c @@ -1,5 +1,5 @@ /* Qt format strings. - Copyright (C) 2003-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2003-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/format-scheme.c b/gettext-tools/src/format-scheme.c index adc1cc6..042858d 100644 --- a/gettext-tools/src/format-scheme.c +++ b/gettext-tools/src/format-scheme.c @@ -1,5 +1,5 @@ /* Scheme format strings. - Copyright (C) 2001-2007, 2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/format-sh.c b/gettext-tools/src/format-sh.c index eeeec04..fff679f 100644 --- a/gettext-tools/src/format-sh.c +++ b/gettext-tools/src/format-sh.c @@ -1,5 +1,5 @@ /* Shell format strings. - Copyright (C) 2003-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2003-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/format-tcl.c b/gettext-tools/src/format-tcl.c index 1254b2d..eb61c44 100644 --- a/gettext-tools/src/format-tcl.c +++ b/gettext-tools/src/format-tcl.c @@ -1,5 +1,5 @@ /* Tcl format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. diff --git a/gettext-tools/src/format-ycp.c b/gettext-tools/src/format-ycp.c index 398b644..880dcdf 100644 --- a/gettext-tools/src/format-ycp.c +++ b/gettext-tools/src/format-ycp.c @@ -1,5 +1,5 @@ /* YCP and Smalltalk format strings. - Copyright (C) 2001-2004, 2006-2007, 2009, 2015 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/format.c b/gettext-tools/src/format.c index 69b1f47..82e53d0 100644 --- a/gettext-tools/src/format.c +++ b/gettext-tools/src/format.c @@ -1,5 +1,5 @@ /* Format strings. - Copyright (C) 2001-2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/format.h b/gettext-tools/src/format.h index b311e48..78b729e 100644 --- a/gettext-tools/src/format.h +++ b/gettext-tools/src/format.h @@ -1,5 +1,5 @@ /* Format strings. - Copyright (C) 2001-2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/gnu/gettext/DumpResource.java b/gettext-tools/src/gnu/gettext/DumpResource.java index 40a1d92..e5eb4a3 100644 --- a/gettext-tools/src/gnu/gettext/DumpResource.java +++ b/gettext-tools/src/gnu/gettext/DumpResource.java @@ -1,5 +1,5 @@ /* GNU gettext for Java - * Copyright (C) 2001-2003, 2007, 2015 Free Software Foundation, Inc. + * Copyright (C) 2001-2003, 2007, 2015-2016 Free Software Foundation, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/gettext-tools/src/gnu/gettext/GetURL.java b/gettext-tools/src/gnu/gettext/GetURL.java index 9faac6d..a599e5c 100644 --- a/gettext-tools/src/gnu/gettext/GetURL.java +++ b/gettext-tools/src/gnu/gettext/GetURL.java @@ -1,5 +1,5 @@ /* Fetch an URL's contents. - * Copyright (C) 2001, 2008, 2015 Free Software Foundation, Inc. + * Copyright (C) 2001, 2008, 2015-2016 Free Software Foundation, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/gettext-tools/src/hostname.c b/gettext-tools/src/hostname.c index 684aa4e..399edf0 100644 --- a/gettext-tools/src/hostname.c +++ b/gettext-tools/src/hostname.c @@ -1,5 +1,5 @@ /* Display hostname in various forms. - Copyright (C) 2001-2003, 2006-2007, 2012, 2015 Free Software + Copyright (C) 2001-2003, 2006-2007, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/its.c b/gettext-tools/src/its.c index ce4880a..136299a 100644 --- a/gettext-tools/src/its.c +++ b/gettext-tools/src/its.c @@ -1,5 +1,5 @@ /* Internationalization Tag Set (ITS) handling - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2015. diff --git a/gettext-tools/src/its.h b/gettext-tools/src/its.h index 8d597f5..d1eab31 100644 --- a/gettext-tools/src/its.h +++ b/gettext-tools/src/its.h @@ -1,5 +1,5 @@ /* Internationalization Tag Set (ITS) handling - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2015. diff --git a/gettext-tools/src/lang-table.c b/gettext-tools/src/lang-table.c index ac69021..ecc7288 100644 --- a/gettext-tools/src/lang-table.c +++ b/gettext-tools/src/lang-table.c @@ -1,5 +1,5 @@ /* Table of languages. - Copyright (C) 2001-2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2005. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/lang-table.h b/gettext-tools/src/lang-table.h index 59f5802..464c4e1 100644 --- a/gettext-tools/src/lang-table.h +++ b/gettext-tools/src/lang-table.h @@ -1,5 +1,5 @@ /* Table of languages. - Copyright (C) 2001-2007, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2007, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2005. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/locating-rule.c b/gettext-tools/src/locating-rule.c index 2a1de19..382d162 100644 --- a/gettext-tools/src/locating-rule.c +++ b/gettext-tools/src/locating-rule.c @@ -1,5 +1,5 @@ /* XML resource locating rules - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2015. diff --git a/gettext-tools/src/locating-rule.h b/gettext-tools/src/locating-rule.h index f1214bc..934c3e9 100644 --- a/gettext-tools/src/locating-rule.h +++ b/gettext-tools/src/locating-rule.h @@ -1,5 +1,5 @@ /* XML resource locating rules - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2015. diff --git a/gettext-tools/src/message.c b/gettext-tools/src/message.c index bc1604c..a5ecdcc 100644 --- a/gettext-tools/src/message.c +++ b/gettext-tools/src/message.c @@ -1,6 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1998, 2000-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 1995-1998, 2000-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> @@ -111,7 +110,8 @@ const char *const syntax_check_name[NSYNTAXCHECKS] = { /* sc_ellipsis_unicode */ "ellipsis-unicode", /* sc_space_ellipsis */ "space-ellipsis", - /* sc_quote_unicode */ "quote-unicode" + /* sc_quote_unicode */ "quote-unicode", + /* sc_bullet_unicode */ "bullet-unicode" }; diff --git a/gettext-tools/src/message.h b/gettext-tools/src/message.h index ec86ff1..7b333f2 100644 --- a/gettext-tools/src/message.h +++ b/gettext-tools/src/message.h @@ -1,6 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1998, 2000-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 1995-1998, 2000-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> @@ -121,9 +120,10 @@ enum syntax_check_type { sc_ellipsis_unicode, sc_space_ellipsis, - sc_quote_unicode + sc_quote_unicode, + sc_bullet_unicode }; -#define NSYNTAXCHECKS 3 +#define NSYNTAXCHECKS 4 extern DLL_VARIABLE const char *const syntax_check_name[NSYNTAXCHECKS]; /* Is current msgid subject to a syntax check? */ diff --git a/gettext-tools/src/msgattrib.c b/gettext-tools/src/msgattrib.c index 1f945b6..e5be7d6 100644 --- a/gettext-tools/src/msgattrib.c +++ b/gettext-tools/src/msgattrib.c @@ -1,5 +1,5 @@ /* Manipulates attributes of messages in translation catalogs. - Copyright (C) 2001-2007, 2009-2010, 2012, 2015 Free Software + Copyright (C) 2001-2007, 2009-2010, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. @@ -358,7 +358,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "2001-2010"); + "2001-2016"); printf (_("Written by %s.\n"), proper_name ("Bruno Haible")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgcat.c b/gettext-tools/src/msgcat.c index c0b6fd4..735cf2b 100644 --- a/gettext-tools/src/msgcat.c +++ b/gettext-tools/src/msgcat.c @@ -1,6 +1,5 @@ /* Concatenates several translation catalogs. - Copyright (C) 2001-2007, 2009-2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2007, 2009-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify @@ -297,7 +296,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "2001-2010"); + "2001-2016"); printf (_("Written by %s.\n"), proper_name ("Bruno Haible")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgcmp.c b/gettext-tools/src/msgcmp.c index 4fadbb6..870b3c8 100644 --- a/gettext-tools/src/msgcmp.c +++ b/gettext-tools/src/msgcmp.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1998, 2000-2010, 2012, 2015 Free Software + Copyright (C) 1995-1998, 2000-2010, 2012, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> @@ -175,7 +175,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "1995-1998, 2000-2010"); + "1995-1998, 2000-2016"); printf (_("Written by %s.\n"), proper_name ("Peter Miller")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgcomm.c b/gettext-tools/src/msgcomm.c index c731297..3399a35 100644 --- a/gettext-tools/src/msgcomm.c +++ b/gettext-tools/src/msgcomm.c @@ -1,6 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1997-1998, 2000-2007, 2009-2015 Free Software - Foundation, Inc. + Copyright (C) 1997-1998, 2000-2007, 2009-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> @@ -288,7 +287,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "1995-1998, 2000-2010"); + "1995-1998, 2000-2016"); printf (_("Written by %s.\n"), proper_name ("Peter Miller")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgconv.c b/gettext-tools/src/msgconv.c index e407ac6..4575b17 100644 --- a/gettext-tools/src/msgconv.c +++ b/gettext-tools/src/msgconv.c @@ -1,5 +1,5 @@ /* Converts a translation catalog to a different character encoding. - Copyright (C) 2001-2007, 2009-2010, 2012, 2015 Free Software + Copyright (C) 2001-2007, 2009-2010, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. @@ -247,7 +247,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "2001-2010"); + "2001-2016"); printf (_("Written by %s.\n"), proper_name ("Bruno Haible")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgen.c b/gettext-tools/src/msgen.c index e6eda09..1d1b3c7 100644 --- a/gettext-tools/src/msgen.c +++ b/gettext-tools/src/msgen.c @@ -1,5 +1,5 @@ /* Creates an English translation catalog. - Copyright (C) 2001-2007, 2009-2010, 2012, 2015 Free Software + Copyright (C) 2001-2007, 2009-2010, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. @@ -244,7 +244,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "2001-2010"); + "2001-2016"); printf (_("Written by %s.\n"), proper_name ("Bruno Haible")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgexec.c b/gettext-tools/src/msgexec.c index e7594fc..1ab6c88 100644 --- a/gettext-tools/src/msgexec.c +++ b/gettext-tools/src/msgexec.c @@ -1,5 +1,5 @@ /* Pass translations to a subprocess. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify @@ -189,7 +189,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "2001-2010"); + "2001-2016"); printf (_("Written by %s.\n"), proper_name ("Bruno Haible")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgfilter.c b/gettext-tools/src/msgfilter.c index aa358e1..7290a43 100644 --- a/gettext-tools/src/msgfilter.c +++ b/gettext-tools/src/msgfilter.c @@ -1,5 +1,5 @@ /* Edit translations using a subprocess. - Copyright (C) 2001-2010, 2012, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2010, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify @@ -291,7 +291,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "2001-2010"); + "2001-2016"); printf (_("Written by %s.\n"), proper_name ("Bruno Haible")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgfmt.c b/gettext-tools/src/msgfmt.c index 0517c99..940121d 100644 --- a/gettext-tools/src/msgfmt.c +++ b/gettext-tools/src/msgfmt.c @@ -1,6 +1,6 @@ /* Converts Uniforum style .po files to binary .mo files - Copyright (C) 1995-1998, 2000-2007, 2009-2010, 2012, 2015 Free - Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2007, 2009-2010, 2012, 2015-2016 Free Software + Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. This program is free software: you can redistribute it and/or modify @@ -65,6 +65,7 @@ #include "concat-filename.h" #include "its.h" #include "locating-rule.h" +#include "search-path.h" #include "gettext.h" #define _(str) gettext (str) @@ -251,6 +252,7 @@ main (int argc, char *argv[]) /* Set default value for global variables. */ alignment = DEFAULT_OUTPUT_ALIGNMENT; + byteswap = 0 ^ ENDIANNESS; /* Set program name for messages. */ set_program_name (argv[0]); @@ -446,7 +448,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "1995-1998, 2000-2010"); + "1995-1998, 2000-2016"); printf (_("Written by %s.\n"), proper_name ("Ulrich Drepper")); exit (EXIT_SUCCESS); } @@ -663,31 +665,15 @@ There is NO WARRANTY, to the extent permitted by law.\n\ if (xml_mode) { - const char *gettextdatadir; - char *versioned_gettextdatadir; - char *its_dirs[2] = { NULL, NULL }; + char **its_dirs; + char **dirs; locating_rule_list_ty *its_locating_rules; const char *its_basename; - size_t i; - - /* Make it possible to override the locator file location. This - is necessary for running the testsuite before "make - install". */ - gettextdatadir = getenv ("GETTEXTDATADIR"); - if (gettextdatadir == NULL || gettextdatadir[0] == '\0') - gettextdatadir = relocate (GETTEXTDATADIR); - - its_dirs[0] = xconcatenated_filename (gettextdatadir, "its", NULL); - - versioned_gettextdatadir = - xasprintf ("%s%s", relocate (GETTEXTDATADIR), PACKAGE_SUFFIX); - its_dirs[1] = xconcatenated_filename (versioned_gettextdatadir, "its", - NULL); - free (versioned_gettextdatadir); + its_dirs = get_search_path ("its"); its_locating_rules = locating_rule_list_alloc (); - for (i = 0; i < SIZEOF (its_dirs); i++) - locating_rule_list_add_from_directory (its_locating_rules, its_dirs[i]); + for (dirs = its_dirs; *dirs != NULL; dirs++) + locating_rule_list_add_from_directory (its_locating_rules, *dirs); its_basename = locating_rule_list_locate (its_locating_rules, xml_template_name, @@ -698,7 +684,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\ size_t j; xml_its_rules = its_rule_list_alloc (); - for (j = 0; j < SIZEOF (its_dirs); j++) + for (j = 0; its_dirs[j] != NULL; j++) { char *its_filename = xconcatenated_filename (its_dirs[j], its_basename, NULL); @@ -711,7 +697,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\ if (ok) break; } - if (j == SIZEOF (its_dirs)) + if (its_dirs[j] == NULL) { its_rule_list_free (xml_its_rules); xml_its_rules = NULL; @@ -719,6 +705,10 @@ There is NO WARRANTY, to the extent permitted by law.\n\ } locating_rule_list_free (its_locating_rules); + for (dirs = its_dirs; *dirs != NULL; dirs++) + free (*dirs); + free (its_dirs); + if (xml_its_rules == NULL) error (EXIT_FAILURE, 0, _("cannot locate ITS rules for %s"), xml_template_name); diff --git a/gettext-tools/src/msgfmt.cs b/gettext-tools/src/msgfmt.cs index 1a97f64..bbd4d9e 100644 --- a/gettext-tools/src/msgfmt.cs +++ b/gettext-tools/src/msgfmt.cs @@ -1,5 +1,5 @@ /* GNU gettext for C# - * Copyright (C) 2003, 2015 Free Software Foundation, Inc. + * Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc. * Written by Bruno Haible <bruno@clisp.org>, 2003. * * This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgfmt.h b/gettext-tools/src/msgfmt.h index 3651a30..dd3109d 100644 --- a/gettext-tools/src/msgfmt.h +++ b/gettext-tools/src/msgfmt.h @@ -1,5 +1,5 @@ /* msgfmt specifics - Copyright (C) 1995-1998, 2000-2001, 2009, 2015 Free Software + Copyright (C) 1995-1998, 2000-2001, 2009, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. diff --git a/gettext-tools/src/msggrep.c b/gettext-tools/src/msggrep.c index b0cb87a..2b68055 100644 --- a/gettext-tools/src/msggrep.c +++ b/gettext-tools/src/msggrep.c @@ -1,5 +1,5 @@ /* Extract some translations of a translation catalog. - Copyright (C) 2001-2007, 2009-2010, 2012, 2015 Free Software + Copyright (C) 2001-2007, 2009-2010, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. @@ -422,7 +422,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "2001-2010"); + "2001-2016"); printf (_("Written by %s.\n"), proper_name ("Bruno Haible")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index f85b83c..0cdb489 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -1,5 +1,5 @@ /* Initializes a new PO file. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify @@ -271,7 +271,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "2001-2010"); + "2001-2016"); printf (_("Written by %s.\n"), proper_name ("Bruno Haible")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgl-ascii.c b/gettext-tools/src/msgl-ascii.c index c92e4df..83f31e5 100644 --- a/gettext-tools/src/msgl-ascii.c +++ b/gettext-tools/src/msgl-ascii.c @@ -1,6 +1,5 @@ /* Message list test for ASCII character set. - Copyright (C) 2001-2002, 2005-2006, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2002, 2005-2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-ascii.h b/gettext-tools/src/msgl-ascii.h index b6e09f9..2f97a4f 100644 --- a/gettext-tools/src/msgl-ascii.h +++ b/gettext-tools/src/msgl-ascii.h @@ -1,5 +1,5 @@ /* Message list test for ASCII character set. - Copyright (C) 2001-2003, 2005, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c index dfedcb6..02bc849 100644 --- a/gettext-tools/src/msgl-cat.c +++ b/gettext-tools/src/msgl-cat.c @@ -1,5 +1,5 @@ /* Message list concatenation and duplicate handling. - Copyright (C) 2001-2003, 2005-2008, 2012, 2015 Free Software + Copyright (C) 2001-2003, 2005-2008, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/msgl-cat.h b/gettext-tools/src/msgl-cat.h index 12a9f80..44b1068 100644 --- a/gettext-tools/src/msgl-cat.h +++ b/gettext-tools/src/msgl-cat.h @@ -1,5 +1,5 @@ /* Message list concatenation and duplicate handling. - Copyright (C) 2001-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-charset.c b/gettext-tools/src/msgl-charset.c index 278d270..0863427 100644 --- a/gettext-tools/src/msgl-charset.c +++ b/gettext-tools/src/msgl-charset.c @@ -1,5 +1,5 @@ /* Message list charset and locale charset handling. - Copyright (C) 2001-2003, 2005-2007, 2009, 2015 Free Software + Copyright (C) 2001-2003, 2005-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/msgl-charset.h b/gettext-tools/src/msgl-charset.h index c673d1d..0d00c4e 100644 --- a/gettext-tools/src/msgl-charset.h +++ b/gettext-tools/src/msgl-charset.h @@ -1,5 +1,5 @@ /* Message list charset and locale charset handling. - Copyright (C) 2001-2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-check.c b/gettext-tools/src/msgl-check.c index 7934120..5bbca85 100644 --- a/gettext-tools/src/msgl-check.c +++ b/gettext-tools/src/msgl-check.c @@ -1,6 +1,5 @@ /* Checking of messages in PO files. - Copyright (C) 1995-1998, 2000-2008, 2010-2015 Free Software - Foundation, Inc. + Copyright (C) 1995-1998, 2000-2008, 2010-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. This program is free software: you can redistribute it and/or modify @@ -1069,13 +1068,116 @@ syntax_check_quote_unicode (const message_ty *mp, const char *msgid) return arg.seen_errors; } +struct bullet_ty +{ + int c; + size_t depth; +}; + +struct bullet_stack_ty +{ + struct bullet_ty *items; + size_t nitems; + size_t nitems_max; +}; + +static struct bullet_stack_ty bullet_stack; + +static int +syntax_check_bullet_unicode (const message_ty *mp, const char *msgid) +{ + const char *str = msgid; + const char *str_limit = str + strlen (msgid); + struct bullet_ty *last_bullet = NULL; + bool seen_error = false; + + bullet_stack.nitems = 0; + + while (str < str_limit) + { + const char *p = str, *end; + + while (p < str_limit && c_isspace (*p)) + p++; + + if ((*p == '*' || *p == '-') && *(p + 1) == ' ') + { + size_t depth = p - str; + if (last_bullet == NULL || depth > last_bullet->depth) + { + struct bullet_ty bullet; + + bullet.c = *p; + bullet.depth = depth; + + if (bullet_stack.nitems >= bullet_stack.nitems_max) + { + bullet_stack.nitems_max = 2 * bullet_stack.nitems_max + 4; + bullet_stack.items = xrealloc (bullet_stack.items, + bullet_stack.nitems_max + * sizeof (struct bullet_ty)); + } + + last_bullet = &bullet_stack.items[bullet_stack.nitems++]; + memcpy (last_bullet, &bullet, sizeof (struct bullet_ty)); + } + else + { + if (depth < last_bullet->depth) + { + if (bullet_stack.nitems > 1) + { + bullet_stack.nitems--; + last_bullet = + &bullet_stack.items[bullet_stack.nitems - 1]; + } + else + last_bullet = NULL; + } + + if (last_bullet && depth == last_bullet->depth) + { + if (last_bullet->c != *p) + last_bullet->c = *p; + else + { + seen_error = true; + break; + } + } + } + } + else + { + bullet_stack.nitems = 0; + last_bullet = NULL; + } + + end = strchrnul (str, '\n'); + str = end + 1; + } + + if (seen_error) + { + char *msg; + msg = xasprintf (_("ASCII bullet ('%c') instead of Unicode"), + last_bullet->c); + po_xerror (PO_SEVERITY_ERROR, mp, NULL, 0, 0, false, msg); + free (msg); + return 1; + } + + return 0; +} + typedef int (* syntax_check_function) (const message_ty *mp, const char *msgid); static const syntax_check_function sc_funcs[NSYNTAXCHECKS] = { syntax_check_ellipsis_unicode, syntax_check_space_ellipsis, - syntax_check_quote_unicode + syntax_check_quote_unicode, + syntax_check_bullet_unicode }; /* Perform all syntax checks on a non-obsolete message. diff --git a/gettext-tools/src/msgl-check.h b/gettext-tools/src/msgl-check.h index cfb86fb..348f69a 100644 --- a/gettext-tools/src/msgl-check.h +++ b/gettext-tools/src/msgl-check.h @@ -1,5 +1,5 @@ /* Checking of messages in PO files. - Copyright (C) 2005, 2008, 2010, 2015 Free Software Foundation, Inc. + Copyright (C) 2005, 2008, 2010, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2005. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-english.c b/gettext-tools/src/msgl-english.c index 6304504..54c84ab 100644 --- a/gettext-tools/src/msgl-english.c +++ b/gettext-tools/src/msgl-english.c @@ -1,5 +1,5 @@ /* Message translation initialization for English. - Copyright (C) 2001-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-english.h b/gettext-tools/src/msgl-english.h index ce0af6b..e2e9878 100644 --- a/gettext-tools/src/msgl-english.h +++ b/gettext-tools/src/msgl-english.h @@ -1,5 +1,5 @@ /* Message translation initialization for English. - Copyright (C) 2001-2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-equal.c b/gettext-tools/src/msgl-equal.c index fd28d01..2efe925 100644 --- a/gettext-tools/src/msgl-equal.c +++ b/gettext-tools/src/msgl-equal.c @@ -1,5 +1,5 @@ /* Message list test for equality. - Copyright (C) 2001-2002, 2005-2006, 2008, 2015 Free Software + Copyright (C) 2001-2002, 2005-2006, 2008, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/msgl-equal.h b/gettext-tools/src/msgl-equal.h index 07f052e..2c56417 100644 --- a/gettext-tools/src/msgl-equal.h +++ b/gettext-tools/src/msgl-equal.h @@ -1,5 +1,5 @@ /* Message list test for equality. - Copyright (C) 2001-2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-fsearch.c b/gettext-tools/src/msgl-fsearch.c index 5e087e2..f7bb27c 100644 --- a/gettext-tools/src/msgl-fsearch.c +++ b/gettext-tools/src/msgl-fsearch.c @@ -1,5 +1,5 @@ /* Fast fuzzy searching among messages. - Copyright (C) 2006, 2008, 2011, 2015 Free Software Foundation, Inc. + Copyright (C) 2006, 2008, 2011, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2006. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-fsearch.h b/gettext-tools/src/msgl-fsearch.h index 825e2a8..e2ee6f8 100644 --- a/gettext-tools/src/msgl-fsearch.h +++ b/gettext-tools/src/msgl-fsearch.h @@ -1,5 +1,5 @@ /* Fast fuzzy searching among messages. - Copyright (C) 2006, 2008, 2015 Free Software Foundation, Inc. + Copyright (C) 2006, 2008, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2006. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-header.c b/gettext-tools/src/msgl-header.c index d5f6a88..987c1c4 100644 --- a/gettext-tools/src/msgl-header.c +++ b/gettext-tools/src/msgl-header.c @@ -1,5 +1,5 @@ /* Message list header manipulation. - Copyright (C) 2007, 2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2007. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-header.h b/gettext-tools/src/msgl-header.h index 6dc1779..9685157 100644 --- a/gettext-tools/src/msgl-header.h +++ b/gettext-tools/src/msgl-header.h @@ -1,5 +1,5 @@ /* Message list header manipulation. - Copyright (C) 2007, 2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2007. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-iconv.c b/gettext-tools/src/msgl-iconv.c index 06a961f..4a725fc 100644 --- a/gettext-tools/src/msgl-iconv.c +++ b/gettext-tools/src/msgl-iconv.c @@ -1,6 +1,5 @@ /* Message list charset and locale charset handling. - Copyright (C) 2001-2003, 2005-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgl-iconv.h b/gettext-tools/src/msgl-iconv.h index ab61a5b..2bd3510 100644 --- a/gettext-tools/src/msgl-iconv.h +++ b/gettext-tools/src/msgl-iconv.h @@ -1,5 +1,5 @@ /* Message list character set conversion. - Copyright (C) 2001-2003, 2005-2006, 2009, 2015 Free Software + Copyright (C) 2001-2003, 2005-2006, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c index 50faf2d..470371c 100644 --- a/gettext-tools/src/msgmerge.c +++ b/gettext-tools/src/msgmerge.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1998, 2000-2010, 2012, 2015 Free Software + Copyright (C) 1995-1998, 2000-2010, 2012, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> @@ -359,7 +359,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "1995-1998, 2000-2010"); + "1995-1998, 2000-2016"); printf (_("Written by %s.\n"), proper_name ("Peter Miller")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgunfmt.c b/gettext-tools/src/msgunfmt.c index c5163be..838fdb3 100644 --- a/gettext-tools/src/msgunfmt.c +++ b/gettext-tools/src/msgunfmt.c @@ -1,6 +1,6 @@ /* msgunfmt - converts binary .mo files to Uniforum style .po files - Copyright (C) 1995-1998, 2000-2007, 2009-2010, 2012, 2015 Free - Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2007, 2009-2010, 2012, 2015-2016 Free Software + Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. This program is free software: you can redistribute it and/or modify @@ -265,7 +265,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "1995-1998, 2000-2010"); + "1995-1998, 2000-2016"); printf (_("Written by %s.\n"), proper_name ("Ulrich Drepper")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/msgunfmt.cs b/gettext-tools/src/msgunfmt.cs index e0e8874..3eca2f5 100644 --- a/gettext-tools/src/msgunfmt.cs +++ b/gettext-tools/src/msgunfmt.cs @@ -1,5 +1,5 @@ /* GNU gettext for C# - * Copyright (C) 2003-2004, 2007, 2015 Free Software Foundation, Inc. + * Copyright (C) 2003-2004, 2007, 2015-2016 Free Software Foundation, Inc. * Written by Bruno Haible <bruno@clisp.org>, 2003. * * This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgunfmt.h b/gettext-tools/src/msgunfmt.h index fc0a505..c7940b3 100644 --- a/gettext-tools/src/msgunfmt.h +++ b/gettext-tools/src/msgunfmt.h @@ -1,6 +1,5 @@ /* msgunfmt specifics - Copyright (C) 1995-1998, 2000-2001, 2015 Free Software Foundation, - Inc. + Copyright (C) 1995-1998, 2000-2001, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/msgunfmt.tcl b/gettext-tools/src/msgunfmt.tcl index 2eadbc5..7c8988a 100644 --- a/gettext-tools/src/msgunfmt.tcl +++ b/gettext-tools/src/msgunfmt.tcl @@ -1,5 +1,5 @@ # Reading tcl/msgcat .msg files. -# Copyright (C) 2002, 2015 Free Software Foundation, Inc. +# Copyright (C) 2002, 2015-2016 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gettext-tools/src/msguniq.c b/gettext-tools/src/msguniq.c index 0a81d1e..6b17e3d 100644 --- a/gettext-tools/src/msguniq.c +++ b/gettext-tools/src/msguniq.c @@ -1,5 +1,5 @@ /* Remove, select or merge duplicate translations. - Copyright (C) 2001-2007, 2009-2010, 2012, 2015 Free Software + Copyright (C) 2001-2007, 2009-2010, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. @@ -267,7 +267,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "2001-2010"); + "2001-2016"); printf (_("Written by %s.\n"), proper_name ("Bruno Haible")); exit (EXIT_SUCCESS); } diff --git a/gettext-tools/src/open-catalog.c b/gettext-tools/src/open-catalog.c index ed87010..0918712 100644 --- a/gettext-tools/src/open-catalog.c +++ b/gettext-tools/src/open-catalog.c @@ -1,5 +1,5 @@ /* open-po - search for .po file along search path list and open for reading - Copyright (C) 1995-1996, 2000-2003, 2005-2009, 2015 Free Software + Copyright (C) 1995-1996, 2000-2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. diff --git a/gettext-tools/src/open-catalog.h b/gettext-tools/src/open-catalog.h index 282c200..5d593fe 100644 --- a/gettext-tools/src/open-catalog.h +++ b/gettext-tools/src/open-catalog.h @@ -1,5 +1,5 @@ /* Opening PO files. - Copyright (C) 1995-1997, 2000-2003, 2006, 2015 Free Software + Copyright (C) 1995-1997, 2000-2003, 2006, 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/plural-count.c b/gettext-tools/src/plural-count.c index 802ba5e..6930cb7 100644 --- a/gettext-tools/src/plural-count.c +++ b/gettext-tools/src/plural-count.c @@ -1,5 +1,5 @@ /* Plural form count. - Copyright (C) 2003, 2007, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2007, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/plural-count.h b/gettext-tools/src/plural-count.h index 9b86a17..5eac3df 100644 --- a/gettext-tools/src/plural-count.h +++ b/gettext-tools/src/plural-count.h @@ -1,5 +1,5 @@ /* Plural form count. - Copyright (C) 2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/plural-distrib.h b/gettext-tools/src/plural-distrib.h index d7d2493..09ad273 100644 --- a/gettext-tools/src/plural-distrib.h +++ b/gettext-tools/src/plural-distrib.h @@ -1,5 +1,5 @@ /* Value distribution of plural form expressions. - Copyright (C) 2001-2008, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2008, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2001-2005. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/plural-eval.c b/gettext-tools/src/plural-eval.c index b2ab856..6d22a71 100644 --- a/gettext-tools/src/plural-eval.c +++ b/gettext-tools/src/plural-eval.c @@ -1,5 +1,5 @@ /* Expression evaluation for plural form selection. - Copyright (C) 2000-2003, 2005, 2015 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2005, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@cygnus.com>, 2000. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/plural-eval.h b/gettext-tools/src/plural-eval.h index e480a9b..5e95670 100644 --- a/gettext-tools/src/plural-eval.h +++ b/gettext-tools/src/plural-eval.h @@ -1,5 +1,5 @@ /* Expression evaluation for plural form selection. - Copyright (C) 2005-2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2005. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/plural-exp.c b/gettext-tools/src/plural-exp.c index eb57ce1..d5b9deb 100644 --- a/gettext-tools/src/plural-exp.c +++ b/gettext-tools/src/plural-exp.c @@ -1,5 +1,5 @@ /* Expression parsing for plural form selection. - Copyright (C) 2000-2001, 2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2003, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@cygnus.com>, 2000. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/plural-table.c b/gettext-tools/src/plural-table.c index 25c0bd6..4c0fa21 100644 --- a/gettext-tools/src/plural-table.c +++ b/gettext-tools/src/plural-table.c @@ -1,6 +1,5 @@ /* Table of known plural form expressions. - Copyright (C) 2001-2006, 2009-2010, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2006, 2009-2010, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/plural-table.h b/gettext-tools/src/plural-table.h index 7c82480..ce8c52d 100644 --- a/gettext-tools/src/plural-table.h +++ b/gettext-tools/src/plural-table.h @@ -1,5 +1,5 @@ /* Table of known plural form expressions. - Copyright (C) 2001-2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/po-charset.c b/gettext-tools/src/po-charset.c index 2f8bae4..31dffab 100644 --- a/gettext-tools/src/po-charset.c +++ b/gettext-tools/src/po-charset.c @@ -1,5 +1,5 @@ /* Charset handling while reading PO files. - Copyright (C) 2001-2007, 2010, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2007, 2010, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/po-charset.h b/gettext-tools/src/po-charset.h index 60484e0..c7272a1 100644 --- a/gettext-tools/src/po-charset.h +++ b/gettext-tools/src/po-charset.h @@ -1,5 +1,5 @@ /* Charset handling while reading PO files. - Copyright (C) 2001-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/po-error.c b/gettext-tools/src/po-error.c index 565b9ed..837e143 100644 --- a/gettext-tools/src/po-error.c +++ b/gettext-tools/src/po-error.c @@ -1,5 +1,5 @@ /* Error handling during reading and writing of PO files. - Copyright (C) 2004, 2015 Free Software Foundation, Inc. + Copyright (C) 2004, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2004. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/po-error.h b/gettext-tools/src/po-error.h index b4eb500..cac4309 100644 --- a/gettext-tools/src/po-error.h +++ b/gettext-tools/src/po-error.h @@ -1,5 +1,5 @@ /* Error handling during reading and writing of PO files. - Copyright (C) 2004, 2006, 2012, 2015 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2004. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y index 0a34068..becf5e6 100644 --- a/gettext-tools/src/po-gram-gen.y +++ b/gettext-tools/src/po-gram-gen.y @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1996, 1998, 2000-2001, 2003, 2005-2006, 2012, 2015 + Copyright (C) 1995-1996, 1998, 2000-2001, 2003, 2005-2006, 2012, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <pmiller@agso.gov.au> diff --git a/gettext-tools/src/po-gram.h b/gettext-tools/src/po-gram.h index 4c8787e..aa22547 100644 --- a/gettext-tools/src/po-gram.h +++ b/gettext-tools/src/po-gram.h @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995, 2002-2003, 2006, 2015 Free Software Foundation, + Copyright (C) 1995, 2002-2003, 2006, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/po-lex.c b/gettext-tools/src/po-lex.c index a48f59a..00d384b 100644 --- a/gettext-tools/src/po-lex.c +++ b/gettext-tools/src/po-lex.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-2009, 2011, 2015 Free Software Foundation, Inc. + Copyright (C) 1995-2009, 2011, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au>. Multibyte character handling by Bruno Haible <haible@clisp.cons.org>. diff --git a/gettext-tools/src/po-lex.h b/gettext-tools/src/po-lex.h index 257e61a..a11bcd6 100644 --- a/gettext-tools/src/po-lex.h +++ b/gettext-tools/src/po-lex.h @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1998, 2000-2006, 2012, 2015 Free Software + Copyright (C) 1995-1998, 2000-2006, 2012, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/po-time.c b/gettext-tools/src/po-time.c index 5147389..5d89626 100644 --- a/gettext-tools/src/po-time.c +++ b/gettext-tools/src/po-time.c @@ -1,5 +1,5 @@ /* PO/POT file timestamps. - Copyright (C) 1995-1998, 2000-2003, 2006, 2015 Free Software + Copyright (C) 1995-1998, 2000-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. diff --git a/gettext-tools/src/po-time.h b/gettext-tools/src/po-time.h index 4c63006..4309512 100644 --- a/gettext-tools/src/po-time.h +++ b/gettext-tools/src/po-time.h @@ -1,5 +1,5 @@ /* PO/POT file timestamps. - Copyright (C) 2001-2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/po-xerror.c b/gettext-tools/src/po-xerror.c index f58d2bd..30e50fa 100644 --- a/gettext-tools/src/po-xerror.c +++ b/gettext-tools/src/po-xerror.c @@ -1,5 +1,5 @@ /* Error handling during reading and writing of PO files. - Copyright (C) 2005-2007, 2015 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2005. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/po-xerror.h b/gettext-tools/src/po-xerror.h index 0493de9..0fd7fc7 100644 --- a/gettext-tools/src/po-xerror.h +++ b/gettext-tools/src/po-xerror.h @@ -1,5 +1,5 @@ /* Error handling during reading and writing of PO files. - Copyright (C) 2005, 2015 Free Software Foundation, Inc. + Copyright (C) 2005, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2005. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/pos.h b/gettext-tools/src/pos.h index 9c57290..62da852 100644 --- a/gettext-tools/src/pos.h +++ b/gettext-tools/src/pos.h @@ -1,6 +1,5 @@ /* Source file positions. - Copyright (C) 1995-1998, 2000-2001, 2015 Free Software Foundation, - Inc. + Copyright (C) 1995-1998, 2000-2001, 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gettext-tools/src/project-id b/gettext-tools/src/project-id index 103f91f..6d14500 100755 --- a/gettext-tools/src/project-id +++ b/gettext-tools/src/project-id @@ -1,7 +1,7 @@ #!/bin/sh # Prints a package's identification PACKAGE VERSION or PACKAGE. # -# Copyright (C) 2001-2003, 2005, 2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2003, 2005, 2015-2016 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gettext-tools/src/quote.h b/gettext-tools/src/quote.h index df8cde2..8320201 100644 --- a/gettext-tools/src/quote.h +++ b/gettext-tools/src/quote.h @@ -1,5 +1,5 @@ /* Handle quoted segments of a string. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 Free Software Foundation, Inc. Written by Daiki Ueno <ueno@gnu.org>, 2015. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-catalog-abstract.c b/gettext-tools/src/read-catalog-abstract.c index eaa624b..6c8d1b5 100644 --- a/gettext-tools/src/read-catalog-abstract.c +++ b/gettext-tools/src/read-catalog-abstract.c @@ -1,5 +1,5 @@ /* Reading PO files, abstract class. - Copyright (C) 1995-1996, 1998, 2000-2009, 2015 Free Software + Copyright (C) 1995-1996, 1998, 2000-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/read-catalog-abstract.h b/gettext-tools/src/read-catalog-abstract.h index 7f6dbfa..1581ae3 100644 --- a/gettext-tools/src/read-catalog-abstract.h +++ b/gettext-tools/src/read-catalog-abstract.h @@ -1,6 +1,6 @@ /* Reading PO files, abstract class. Copyright (C) 1995-1996, 1998, 2000-2003, 2005-2006, 2008-2009, 2012, - 2015 Free Software Foundation, Inc. + 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c index 8a26581..571d18e 100644 --- a/gettext-tools/src/read-catalog.c +++ b/gettext-tools/src/read-catalog.c @@ -1,5 +1,5 @@ /* Reading PO files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2015 Free + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/read-catalog.h b/gettext-tools/src/read-catalog.h index f50bcb0..5075fc1 100644 --- a/gettext-tools/src/read-catalog.h +++ b/gettext-tools/src/read-catalog.h @@ -1,5 +1,5 @@ /* Reading PO files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2015 Free + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>. diff --git a/gettext-tools/src/read-csharp.c b/gettext-tools/src/read-csharp.c index c2b3879..27abcb9 100644 --- a/gettext-tools/src/read-csharp.c +++ b/gettext-tools/src/read-csharp.c @@ -1,5 +1,5 @@ /* Reading C# satellite assemblies. - Copyright (C) 2003-2004, 2006-2008, 2011, 2015 Free Software + Copyright (C) 2003-2004, 2006-2008, 2011, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/read-csharp.h b/gettext-tools/src/read-csharp.h index 3e03ccf..15b6a55 100644 --- a/gettext-tools/src/read-csharp.h +++ b/gettext-tools/src/read-csharp.h @@ -1,5 +1,5 @@ /* Reading C# satellite assemblies. - Copyright (C) 2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-desktop.c b/gettext-tools/src/read-desktop.c index 0de123c..e505045 100644 --- a/gettext-tools/src/read-desktop.c +++ b/gettext-tools/src/read-desktop.c @@ -1,6 +1,6 @@ /* Reading Desktop Entry files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2015 - Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016 Free + Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>. This program is free software: you can redistribute it and/or modify @@ -326,8 +326,9 @@ desktop_lex (token_ty *tp) case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { - const char *locale = NULL; - const char *value = NULL; + size_t locale_start; + bool found_locale = false; + size_t value_start; for (;;) { APPEND (c); @@ -353,7 +354,8 @@ desktop_lex (token_ty *tp) case '[': /* Finish the key part and start the locale part. */ APPEND (0); - locale = &buffer[bufpos]; + found_locale = true; + locale_start = bufpos; for (;;) { @@ -428,7 +430,7 @@ desktop_lex (token_ty *tp) break; } - value = &buffer[bufpos]; + value_start = bufpos; for (;;) { c = phase2_getc (); @@ -439,8 +441,8 @@ desktop_lex (token_ty *tp) APPEND (0); tp->type = token_type_pair; tp->string = xmemdup (buffer, bufpos); - tp->locale = locale; - tp->value = value; + tp->locale = found_locale ? &buffer[locale_start] : NULL; + tp->value = &buffer[value_start]; return; } default: diff --git a/gettext-tools/src/read-desktop.h b/gettext-tools/src/read-desktop.h index eebd681..f3e1b00 100644 --- a/gettext-tools/src/read-desktop.h +++ b/gettext-tools/src/read-desktop.h @@ -1,6 +1,6 @@ /* Reading Desktop Entry files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2015 - Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016 Free + Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>. This program is free software: you can redistribute it and/or modify @@ -85,34 +85,37 @@ struct desktop_reader_ty DESKTOP_READER_TY }; -desktop_reader_ty *desktop_reader_alloc (desktop_reader_class_ty *methods); -void desktop_reader_free (desktop_reader_ty *reader); +extern desktop_reader_ty * + desktop_reader_alloc (desktop_reader_class_ty *methods); +extern void desktop_reader_free (desktop_reader_ty *reader); -void desktop_reader_handle_group (desktop_reader_ty *reader, - const char *group); +extern void desktop_reader_handle_group (desktop_reader_ty *reader, + const char *group); -void desktop_reader_handle_pair (desktop_reader_ty *reader, - lex_pos_ty *key_pos, +extern void desktop_reader_handle_pair (desktop_reader_ty *reader, + lex_pos_ty *key_pos, const char *key, const char *locale, const char *value); -void desktop_reader_handle_comment (desktop_reader_ty *reader, - const char *s); +extern void desktop_reader_handle_comment (desktop_reader_ty *reader, + const char *s); -void desktop_reader_handle_blank (desktop_reader_ty *reader, - const char *s); +extern void desktop_reader_handle_blank (desktop_reader_ty *reader, + const char *s); -void desktop_parse (desktop_reader_ty *reader, FILE *file, - const char *real_filename, const char *logical_filename); +extern void desktop_parse (desktop_reader_ty *reader, FILE *file, + const char *real_filename, + const char *logical_filename); -char *desktop_escape_string (const char *s, bool is_list); -char *desktop_unescape_string (const char *s, bool is_list); +extern char *desktop_escape_string (const char *s, bool is_list); +extern char *desktop_unescape_string (const char *s, bool is_list); -void desktop_add_keyword (hash_table *keywords, const char *name, bool is_list); -void desktop_add_default_keywords (hash_table *keywords); +extern void desktop_add_keyword (hash_table *keywords, const char *name, + bool is_list); +extern void desktop_add_default_keywords (hash_table *keywords); #ifdef __cplusplus } diff --git a/gettext-tools/src/read-java.c b/gettext-tools/src/read-java.c index 1e1cce0..0eb5ed5 100644 --- a/gettext-tools/src/read-java.c +++ b/gettext-tools/src/read-java.c @@ -1,5 +1,5 @@ /* Reading Java ResourceBundles. - Copyright (C) 2001-2003, 2006-2008, 2011, 2015 Free Software + Copyright (C) 2001-2003, 2006-2008, 2011, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/read-java.h b/gettext-tools/src/read-java.h index 169263b..4f4c944 100644 --- a/gettext-tools/src/read-java.h +++ b/gettext-tools/src/read-java.h @@ -1,5 +1,5 @@ /* Reading Java ResourceBundles. - Copyright (C) 2001-2002, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-mo.c b/gettext-tools/src/read-mo.c index c3bfb22..9ddd6b2 100644 --- a/gettext-tools/src/read-mo.c +++ b/gettext-tools/src/read-mo.c @@ -1,6 +1,5 @@ /* Reading binary .mo files. - Copyright (C) 1995-1998, 2000-2007, 2015 Free Software Foundation, - Inc. + Copyright (C) 1995-1998, 2000-2007, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-mo.h b/gettext-tools/src/read-mo.h index d5f8f58..5872b79 100644 --- a/gettext-tools/src/read-mo.h +++ b/gettext-tools/src/read-mo.h @@ -1,6 +1,5 @@ /* Reading binary .mo files. - Copyright (C) 1995-1998, 2000-2003, 2015 Free Software Foundation, - Inc. + Copyright (C) 1995-1998, 2000-2003, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-po.c b/gettext-tools/src/read-po.c index 71eebc2..f339fdf 100644 --- a/gettext-tools/src/read-po.c +++ b/gettext-tools/src/read-po.c @@ -1,5 +1,5 @@ /* Reading PO files. - Copyright (C) 1995-1996, 1998, 2000-2006, 2015 Free Software + Copyright (C) 1995-1996, 1998, 2000-2006, 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-po.h b/gettext-tools/src/read-po.h index aa9c173..064e27a 100644 --- a/gettext-tools/src/read-po.h +++ b/gettext-tools/src/read-po.h @@ -1,5 +1,5 @@ /* Reading PO files. - Copyright (C) 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2006. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-properties.c b/gettext-tools/src/read-properties.c index a4919a4..19e7779 100644 --- a/gettext-tools/src/read-properties.c +++ b/gettext-tools/src/read-properties.c @@ -1,5 +1,5 @@ /* Reading Java .properties files. - Copyright (C) 2003, 2005-2007, 2009, 2015 Free Software Foundation, + Copyright (C) 2003, 2005-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/read-properties.h b/gettext-tools/src/read-properties.h index bf2279b..33d90ca 100644 --- a/gettext-tools/src/read-properties.h +++ b/gettext-tools/src/read-properties.h @@ -1,5 +1,5 @@ /* Reading Java .properties files. - Copyright (C) 2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-resources.c b/gettext-tools/src/read-resources.c index d60394e..4a14ccd 100644 --- a/gettext-tools/src/read-resources.c +++ b/gettext-tools/src/read-resources.c @@ -1,5 +1,5 @@ /* Reading C# .resources files. - Copyright (C) 2003, 2006-2008, 2011, 2015 Free Software Foundation, + Copyright (C) 2003, 2006-2008, 2011, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/read-resources.h b/gettext-tools/src/read-resources.h index 58dccef..8a191e9 100644 --- a/gettext-tools/src/read-resources.h +++ b/gettext-tools/src/read-resources.h @@ -1,5 +1,5 @@ /* Reading C# .resources files. - Copyright (C) 2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-stringtable.c b/gettext-tools/src/read-stringtable.c index 62073c4..a1f3df4 100644 --- a/gettext-tools/src/read-stringtable.c +++ b/gettext-tools/src/read-stringtable.c @@ -1,5 +1,5 @@ /* Reading NeXTstep/GNUstep .strings files. - Copyright (C) 2003, 2005-2007, 2009, 2015 Free Software Foundation, + Copyright (C) 2003, 2005-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/read-stringtable.h b/gettext-tools/src/read-stringtable.h index 6c3e069..939a67f 100644 --- a/gettext-tools/src/read-stringtable.h +++ b/gettext-tools/src/read-stringtable.h @@ -1,5 +1,5 @@ /* Reading NeXTstep/GNUstep .strings files. - Copyright (C) 2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/read-tcl.c b/gettext-tools/src/read-tcl.c index 4191864..bee0d31 100644 --- a/gettext-tools/src/read-tcl.c +++ b/gettext-tools/src/read-tcl.c @@ -1,5 +1,5 @@ /* Reading tcl/msgcat .msg files. - Copyright (C) 2002-2003, 2005-2008, 2011, 2015 Free Software + Copyright (C) 2002-2003, 2005-2008, 2011, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2002. diff --git a/gettext-tools/src/read-tcl.h b/gettext-tools/src/read-tcl.h index d66624d..c3d6549 100644 --- a/gettext-tools/src/read-tcl.h +++ b/gettext-tools/src/read-tcl.h @@ -1,5 +1,5 @@ /* Reading tcl/msgcat .msg files. - Copyright (C) 2002, 2015 Free Software Foundation, Inc. + Copyright (C) 2002, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/recode-sr-latin.c b/gettext-tools/src/recode-sr-latin.c index 44a2f49..3b6724d 100644 --- a/gettext-tools/src/recode-sr-latin.c +++ b/gettext-tools/src/recode-sr-latin.c @@ -1,5 +1,5 @@ /* Recode Serbian text from Cyrillic to Latin script. - Copyright (C) 2006-2007, 2010, 2012, 2015 Free Software Foundation, + Copyright (C) 2006-2007, 2010, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2006. diff --git a/gettext-tools/src/search-path.c b/gettext-tools/src/search-path.c new file mode 100644 index 0000000..14b417f --- /dev/null +++ b/gettext-tools/src/search-path.c @@ -0,0 +1,159 @@ +/* Routines for locating data files + Copyright (C) 2016 Free Software Foundation, Inc. + + This file was written by Daiki Ueno <ueno@gnu.org>, 2016. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +/* Specification. */ +#include "search-path.h" + +#include <stdlib.h> +#include <string.h> + +#include "concat-filename.h" +#include "relocatable.h" +#include "xalloc.h" +#include "xmemdup0.h" +#include "xvasprintf.h" + +typedef void (* foreach_function_ty) (const char *dir, size_t len, void *data); + +struct path_array_ty { + char **ptr; + size_t len; + const char *sub; +}; + +static void +foreach_elements (const char *dirs, foreach_function_ty function, void *data) +{ + const char *start = dirs; + + /* Count the number of valid elements in GETTEXTDATADIRS. */ + while (*start != '\0') + { + char *end = strchrnul (start, ':'); + + /* Skip empty element. */ + if (start != end) + function (start, end - start, data); + + if (*end == '\0') + break; + + start = end + 1; + } +} + +static void +increment (const char *dir, size_t len, void *data) +{ + size_t *count = data; + (*count)++; +} + +static void +fill (const char *dir, size_t len, void *data) +{ + struct path_array_ty *array = data; + char *base, *name; + + base = xmemdup0 (dir, len); + if (array->sub == NULL) + name = base; + else + { + name = xconcatenated_filename (base, array->sub, NULL); + free (base); + } + + array->ptr[array->len++] = name; +} + +/* Find the standard search path for data files. Returns a NULL + terminated list of strings. The order in the path is as follows: + + 1. $GETTEXTDATADIR or GETTEXTDATADIR + 2. $GETTEXTDATADIRS + 3. $XDG_DATA_DIRS, where each element is suffixed with "gettext" + 4. $GETTEXTDATADIR or GETTEXTDATADIR, suffixed with PACKAGE_SUFFIX */ +char ** +get_search_path (const char *sub) +{ + const char *gettextdatadir; + const char *gettextdatadirs; + struct path_array_ty array; + char *base, *name; + size_t count = 2; + + gettextdatadirs = getenv ("GETTEXTDATADIRS"); + if (gettextdatadirs != NULL) + foreach_elements (gettextdatadirs, increment, &count); + + gettextdatadirs = getenv ("XDG_DATA_DIRS"); + if (gettextdatadirs != NULL) + foreach_elements (gettextdatadirs, increment, &count); + + array.ptr = XCALLOC (count + 1, char *); + array.len = 0; + + gettextdatadir = getenv ("GETTEXTDATADIR"); + if (gettextdatadir == NULL || gettextdatadir[0] == '\0') + /* Make it possible to override the locator file location. This + is necessary for running the testsuite before "make + install". */ + gettextdatadir = relocate (GETTEXTDATADIR); + + /* Append element from GETTEXTDATADIR. */ + if (sub == NULL) + name = xstrdup (gettextdatadir); + else + name = xconcatenated_filename (gettextdatadir, sub, NULL); + array.ptr[array.len++] = name; + + /* Append elements from GETTEXTDATADIRS. */ + array.sub = sub; + gettextdatadirs = getenv ("GETTEXTDATADIRS"); + if (gettextdatadirs != NULL) + foreach_elements (gettextdatadirs, fill, &array); + + /* Append elements from XDG_DATA_DIRS. Note that each element needs + to have "gettext" suffix. */ + if (sub == NULL) + array.sub = xstrdup ("gettext"); + else + array.sub = xconcatenated_filename ("gettext", sub, NULL); + gettextdatadirs = getenv ("XDG_DATA_DIRS"); + if (gettextdatadirs != NULL) + foreach_elements (gettextdatadirs, fill, &array); + free (array.sub); + + /* Append version specific directory. */ + base = xasprintf ("%s%s", gettextdatadir, PACKAGE_SUFFIX); + if (sub == NULL) + name = base; + else + { + name = xconcatenated_filename (base, sub, NULL); + free (base); + } + array.ptr[array.len++] = name; + + return array.ptr; +} diff --git a/gettext-tools/src/search-path.h b/gettext-tools/src/search-path.h new file mode 100644 index 0000000..6587d23 --- /dev/null +++ b/gettext-tools/src/search-path.h @@ -0,0 +1,37 @@ +/* Routines for locating data files + Copyright (C) 2016 Free Software Foundation, Inc. + + This file was written by Daiki Ueno <ueno@gnu.org>, 2016. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _SEARCH_PATH_H +#define _SEARCH_PATH_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Find the standard search path for data files. Returns a NULL + terminated list of strings. If SUB is not NULL, append it to each + directory. */ +extern char **get_search_path (const char *sub); + + +#ifdef __cplusplus +} +#endif + +#endif /* _SEARCH_PATH_H */ diff --git a/gettext-tools/src/sentence.c b/gettext-tools/src/sentence.c index 0a4883e..fb22bae 100644 --- a/gettext-tools/src/sentence.c +++ b/gettext-tools/src/sentence.c @@ -1,5 +1,5 @@ /* Sentence handling. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. Written by Daiki Ueno <ueno@gnu.org>, 2015. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/sentence.h b/gettext-tools/src/sentence.h index 02fdc16..ca3f778 100644 --- a/gettext-tools/src/sentence.h +++ b/gettext-tools/src/sentence.h @@ -1,5 +1,5 @@ /* Sentence handling. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. Written by Daiki Ueno <ueno@gnu.org>, 2015. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/str-list.c b/gettext-tools/src/str-list.c index 0e3a9ff..23fc836 100644 --- a/gettext-tools/src/str-list.c +++ b/gettext-tools/src/str-list.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995, 1998, 2000-2004, 2006, 2009, 2015 Free Software + Copyright (C) 1995, 1998, 2000-2004, 2006, 2009, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/str-list.h b/gettext-tools/src/str-list.h index 0758171..ec81839 100644 --- a/gettext-tools/src/str-list.h +++ b/gettext-tools/src/str-list.h @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1996, 1998, 2000-2004, 2009, 2015 Free Software + Copyright (C) 1995-1996, 1998, 2000-2004, 2009, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/urlget.c b/gettext-tools/src/urlget.c index 482144c..5ac06f0 100644 --- a/gettext-tools/src/urlget.c +++ b/gettext-tools/src/urlget.c @@ -1,5 +1,5 @@ /* Get the contents of an URL. - Copyright (C) 2001-2003, 2005-2010, 2012, 2015 Free Software + Copyright (C) 2001-2003, 2005-2010, 2012, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/user-email.sh.in b/gettext-tools/src/user-email.sh.in index d5b5e49..5e8c4b2 100644 --- a/gettext-tools/src/user-email.sh.in +++ b/gettext-tools/src/user-email.sh.in @@ -1,7 +1,7 @@ #!/bin/sh # Prints the user's email address, with confirmation from the user. # -# Copyright (C) 2001-2003, 2005, 2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2003, 2005, 2015-2016 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gettext-tools/src/write-catalog.c b/gettext-tools/src/write-catalog.c index 4649efa..1b6959d 100644 --- a/gettext-tools/src/write-catalog.c +++ b/gettext-tools/src/write-catalog.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1998, 2000-2008, 2012, 2015 Free Software + Copyright (C) 1995-1998, 2000-2008, 2012, 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-catalog.h b/gettext-tools/src/write-catalog.h index 7cb18b8..6797d5c 100644 --- a/gettext-tools/src/write-catalog.h +++ b/gettext-tools/src/write-catalog.h @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2015 Free Software + Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-csharp.c b/gettext-tools/src/write-csharp.c index dd757ed..5cf573a 100644 --- a/gettext-tools/src/write-csharp.c +++ b/gettext-tools/src/write-csharp.c @@ -1,5 +1,5 @@ /* Writing C# satellite assemblies. - Copyright (C) 2003-2010, 2015 Free Software Foundation, Inc. + Copyright (C) 2003-2010, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-csharp.h b/gettext-tools/src/write-csharp.h index 509f8c1..2a6fbff 100644 --- a/gettext-tools/src/write-csharp.h +++ b/gettext-tools/src/write-csharp.h @@ -1,5 +1,5 @@ /* Writing C# satellite assemblies. - Copyright (C) 2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-desktop.c b/gettext-tools/src/write-desktop.c index 6cf1db7..898ac30 100644 --- a/gettext-tools/src/write-desktop.c +++ b/gettext-tools/src/write-desktop.c @@ -1,6 +1,6 @@ /* Writing Desktop Entry files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2015 - Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016 Free + Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-desktop.h b/gettext-tools/src/write-desktop.h index d6408e2..2941d6c 100644 --- a/gettext-tools/src/write-desktop.h +++ b/gettext-tools/src/write-desktop.h @@ -1,6 +1,6 @@ /* Reading Desktop Entry files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2015 - Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016 Free + Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-java.c b/gettext-tools/src/write-java.c index a21c002..eef8c79 100644 --- a/gettext-tools/src/write-java.c +++ b/gettext-tools/src/write-java.c @@ -1,6 +1,5 @@ /* Writing Java ResourceBundles. - Copyright (C) 2001-2003, 2005-2010, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2003, 2005-2010, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-java.h b/gettext-tools/src/write-java.h index 2bebc1f..031ecda 100644 --- a/gettext-tools/src/write-java.h +++ b/gettext-tools/src/write-java.h @@ -1,5 +1,5 @@ /* Writing Java ResourceBundles. - Copyright (C) 2001-2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-mo.c b/gettext-tools/src/write-mo.c index 92dbbe4..b4a7894 100644 --- a/gettext-tools/src/write-mo.c +++ b/gettext-tools/src/write-mo.c @@ -1,6 +1,5 @@ /* Writing binary .mo files. - Copyright (C) 1995-1998, 2000-2007, 2015 Free Software Foundation, - Inc. + Copyright (C) 1995-1998, 2000-2007, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-mo.h b/gettext-tools/src/write-mo.h index 249ed58..b438d0a 100644 --- a/gettext-tools/src/write-mo.h +++ b/gettext-tools/src/write-mo.h @@ -1,5 +1,5 @@ /* Writing binary .mo files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2015 Free Software + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2015-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. diff --git a/gettext-tools/src/write-po.c b/gettext-tools/src/write-po.c index ec413d4..7699455 100644 --- a/gettext-tools/src/write-po.c +++ b/gettext-tools/src/write-po.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1998, 2000-2010, 2012, 2015 Free Software + Copyright (C) 1995-1998, 2000-2010, 2012, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/write-po.h b/gettext-tools/src/write-po.h index ee8313a..21d39c7 100644 --- a/gettext-tools/src/write-po.h +++ b/gettext-tools/src/write-po.h @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2015 Free Software + Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/write-properties.c b/gettext-tools/src/write-properties.c index 4aaf923..e4647c7 100644 --- a/gettext-tools/src/write-properties.c +++ b/gettext-tools/src/write-properties.c @@ -1,5 +1,5 @@ /* Writing Java .properties files. - Copyright (C) 2003, 2005-2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-properties.h b/gettext-tools/src/write-properties.h index b29154e..cf6f86c 100644 --- a/gettext-tools/src/write-properties.h +++ b/gettext-tools/src/write-properties.h @@ -1,5 +1,5 @@ /* Writing Java .properties files. - Copyright (C) 2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-qt.c b/gettext-tools/src/write-qt.c index 42b2d84..978bf09 100644 --- a/gettext-tools/src/write-qt.c +++ b/gettext-tools/src/write-qt.c @@ -1,5 +1,5 @@ /* Writing Qt .qm files. - Copyright (C) 2003, 2005-2007, 2009, 2015 Free Software Foundation, + Copyright (C) 2003, 2005-2007, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/write-qt.h b/gettext-tools/src/write-qt.h index d83622a..bd5c2d4 100644 --- a/gettext-tools/src/write-qt.h +++ b/gettext-tools/src/write-qt.h @@ -1,5 +1,5 @@ /* Writing Qt .qm files. - Copyright (C) 2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-resources.c b/gettext-tools/src/write-resources.c index 2fa7e48..e5103c4 100644 --- a/gettext-tools/src/write-resources.c +++ b/gettext-tools/src/write-resources.c @@ -1,5 +1,5 @@ /* Writing C# .resources files. - Copyright (C) 2003, 2005, 2007-2009, 2011, 2015 Free Software + Copyright (C) 2003, 2005, 2007-2009, 2011, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/write-resources.h b/gettext-tools/src/write-resources.h index 2508816..47407f2 100644 --- a/gettext-tools/src/write-resources.h +++ b/gettext-tools/src/write-resources.h @@ -1,5 +1,5 @@ /* Writing C# .resources files. - Copyright (C) 2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-stringtable.c b/gettext-tools/src/write-stringtable.c index 8846ac7..4364375 100644 --- a/gettext-tools/src/write-stringtable.c +++ b/gettext-tools/src/write-stringtable.c @@ -1,5 +1,5 @@ /* Writing NeXTstep/GNUstep .strings files. - Copyright (C) 2003, 2006-2008, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2008, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-stringtable.h b/gettext-tools/src/write-stringtable.h index 4e60dc2..bf3de6c 100644 --- a/gettext-tools/src/write-stringtable.h +++ b/gettext-tools/src/write-stringtable.h @@ -1,5 +1,5 @@ /* Writing NeXTstep/GNUstep .strings files. - Copyright (C) 2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-tcl.c b/gettext-tools/src/write-tcl.c index 1439431..0dbe3aa 100644 --- a/gettext-tools/src/write-tcl.c +++ b/gettext-tools/src/write-tcl.c @@ -1,5 +1,5 @@ /* Writing tcl/msgcat .msg files. - Copyright (C) 2002-2003, 2005, 2007-2009, 2015 Free Software + Copyright (C) 2002-2003, 2005, 2007-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2002. diff --git a/gettext-tools/src/write-tcl.h b/gettext-tools/src/write-tcl.h index b10aa16..f25d04a 100644 --- a/gettext-tools/src/write-tcl.h +++ b/gettext-tools/src/write-tcl.h @@ -1,5 +1,5 @@ /* Writing tcl/msgcat .msg files. - Copyright (C) 2002-2003, 2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-xml.c b/gettext-tools/src/write-xml.c index 38e3195..79b7b5d 100644 --- a/gettext-tools/src/write-xml.c +++ b/gettext-tools/src/write-xml.c @@ -1,6 +1,6 @@ /* Writing XML files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2015 - Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016 Free + Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/write-xml.h b/gettext-tools/src/write-xml.h index e627789..c4b227b 100644 --- a/gettext-tools/src/write-xml.h +++ b/gettext-tools/src/write-xml.h @@ -1,6 +1,6 @@ /* Reading XML files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2015 - Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016 Free + Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-appdata.h b/gettext-tools/src/x-appdata.h index 6171673..42a51b9 100644 --- a/gettext-tools/src/x-appdata.h +++ b/gettext-tools/src/x-appdata.h @@ -1,5 +1,5 @@ /* xgettext AppData file backend. - Copyright (C) 2002-2003, 2006, 2013, 2015 Free Software Foundation, + Copyright (C) 2002-2003, 2006, 2013, 2015-2016 Free Software Foundation, Inc. Written by Philip Withnall <philip.withnall@collabora.co.uk>, 2015. diff --git a/gettext-tools/src/x-awk.c b/gettext-tools/src/x-awk.c index 648befe..f2ff310 100644 --- a/gettext-tools/src/x-awk.c +++ b/gettext-tools/src/x-awk.c @@ -1,6 +1,5 @@ /* xgettext awk backend. - Copyright (C) 2002-2003, 2005-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 2002-2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2002. diff --git a/gettext-tools/src/x-awk.h b/gettext-tools/src/x-awk.h index b0c1448..c37867c 100644 --- a/gettext-tools/src/x-awk.h +++ b/gettext-tools/src/x-awk.h @@ -1,5 +1,5 @@ /* xgettext awk backend. - Copyright (C) 2002-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-c.c b/gettext-tools/src/x-c.c index 68e9f5d..1844a5d 100644 --- a/gettext-tools/src/x-c.c +++ b/gettext-tools/src/x-c.c @@ -1,5 +1,5 @@ /* xgettext C/C++/ObjectiveC backend. - Copyright (C) 1995-1998, 2000-2009, 2012, 2015 Free Software + Copyright (C) 1995-1998, 2000-2009, 2012, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/x-c.h b/gettext-tools/src/x-c.h index 9dc82b0..36e1cb6 100644 --- a/gettext-tools/src/x-c.h +++ b/gettext-tools/src/x-c.h @@ -1,5 +1,5 @@ /* xgettext C/C++/ObjectiveC backend. - Copyright (C) 2001-2003, 2006, 2009, 2015 Free Software Foundation, + Copyright (C) 2001-2003, 2006, 2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c index 8bb87d4..2890d27 100644 --- a/gettext-tools/src/x-csharp.c +++ b/gettext-tools/src/x-csharp.c @@ -1,5 +1,5 @@ /* xgettext C# backend. - Copyright (C) 2003, 2005-2009, 2011, 2015 Free Software Foundation, + Copyright (C) 2003, 2005-2009, 2011, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. diff --git a/gettext-tools/src/x-csharp.h b/gettext-tools/src/x-csharp.h index e3c6173..e4c6d01 100644 --- a/gettext-tools/src/x-csharp.h +++ b/gettext-tools/src/x-csharp.h @@ -1,5 +1,5 @@ /* xgettext C# backend. - Copyright (C) 2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-desktop.c b/gettext-tools/src/x-desktop.c index e4ce5b3..3f382ff 100644 --- a/gettext-tools/src/x-desktop.c +++ b/gettext-tools/src/x-desktop.c @@ -1,5 +1,5 @@ /* xgettext Desktop Entry backend. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2014. diff --git a/gettext-tools/src/x-desktop.h b/gettext-tools/src/x-desktop.h index a5c954b..4a820e5 100644 --- a/gettext-tools/src/x-desktop.h +++ b/gettext-tools/src/x-desktop.h @@ -1,5 +1,5 @@ /* xgettext Desktop Entry backend. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 Free Software Foundation, Inc. Written by Daiki Ueno <ueno@gnu.org>, 2014. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-elisp.c b/gettext-tools/src/x-elisp.c index bbe7121..8814136 100644 --- a/gettext-tools/src/x-elisp.c +++ b/gettext-tools/src/x-elisp.c @@ -1,6 +1,5 @@ /* xgettext Emacs Lisp backend. - Copyright (C) 2001-2003, 2005-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2001-2002. diff --git a/gettext-tools/src/x-elisp.h b/gettext-tools/src/x-elisp.h index 618a495..1ca0160 100644 --- a/gettext-tools/src/x-elisp.h +++ b/gettext-tools/src/x-elisp.h @@ -1,5 +1,5 @@ /* xgettext Emacs Lisp backend. - Copyright (C) 2002-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-glade.h b/gettext-tools/src/x-glade.h index fda5876..6ec5040 100644 --- a/gettext-tools/src/x-glade.h +++ b/gettext-tools/src/x-glade.h @@ -1,5 +1,5 @@ /* xgettext glade backend. - Copyright (C) 2002-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-gsettings.h b/gettext-tools/src/x-gsettings.h index 00b968c..23637d7 100644 --- a/gettext-tools/src/x-gsettings.h +++ b/gettext-tools/src/x-gsettings.h @@ -1,5 +1,5 @@ /* xgettext GSettings schema file backend. - Copyright (C) 2002-2003, 2006, 2013, 2015 Free Software Foundation, + Copyright (C) 2002-2003, 2006, 2013, 2015-2016 Free Software Foundation, Inc. Written by Daiki Ueno <ueno@gnu.org>, 2013. diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c index 3bc75fe..626382b 100644 --- a/gettext-tools/src/x-java.c +++ b/gettext-tools/src/x-java.c @@ -1,5 +1,5 @@ /* xgettext Java backend. - Copyright (C) 2003, 2005-2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-java.h b/gettext-tools/src/x-java.h index 2719c42..f9cdacb 100644 --- a/gettext-tools/src/x-java.h +++ b/gettext-tools/src/x-java.h @@ -1,5 +1,5 @@ /* xgettext Java backend. - Copyright (C) 2001-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Tommy Johansson <tommy.johansson@kanalen.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-javascript.c b/gettext-tools/src/x-javascript.c index bc4d4c8..6320288 100644 --- a/gettext-tools/src/x-javascript.c +++ b/gettext-tools/src/x-javascript.c @@ -1,5 +1,5 @@ /* xgettext JavaScript backend. - Copyright (C) 2002-2003, 2005-2009, 2013, 2015 Free Software + Copyright (C) 2002-2003, 2005-2009, 2013, 2015-2016 Free Software Foundation, Inc. This file was written by Andreas Stricker <andy@knitter.ch>, 2010 diff --git a/gettext-tools/src/x-javascript.h b/gettext-tools/src/x-javascript.h index 5d2d980..e23c85e 100644 --- a/gettext-tools/src/x-javascript.h +++ b/gettext-tools/src/x-javascript.h @@ -1,5 +1,5 @@ /* xgettext JavaScript backend. - Copyright (C) 2002-2003, 2006, 2013, 2015 Free Software Foundation, + Copyright (C) 2002-2003, 2006, 2013, 2015-2016 Free Software Foundation, Inc. This file was written by Andreas Stricker <andy@knitter.ch>, 2010. It's based on x-python from Bruno Haible. diff --git a/gettext-tools/src/x-librep.c b/gettext-tools/src/x-librep.c index a515f29..e00261a 100644 --- a/gettext-tools/src/x-librep.c +++ b/gettext-tools/src/x-librep.c @@ -1,6 +1,5 @@ /* xgettext librep backend. - Copyright (C) 2001-2003, 2005-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/x-librep.h b/gettext-tools/src/x-librep.h index 129a6c3..41b1c9d 100644 --- a/gettext-tools/src/x-librep.h +++ b/gettext-tools/src/x-librep.h @@ -1,5 +1,5 @@ /* xgettext librep backend. - Copyright (C) 2001-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-lisp.c b/gettext-tools/src/x-lisp.c index 0d3a1c4..b53ee35 100644 --- a/gettext-tools/src/x-lisp.c +++ b/gettext-tools/src/x-lisp.c @@ -1,6 +1,5 @@ /* xgettext Lisp backend. - Copyright (C) 2001-2003, 2005-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/x-lisp.h b/gettext-tools/src/x-lisp.h index e9d0a0b..011efcf 100644 --- a/gettext-tools/src/x-lisp.h +++ b/gettext-tools/src/x-lisp.h @@ -1,5 +1,5 @@ /* xgettext Lisp backend. - Copyright (C) 2001-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-lua.c b/gettext-tools/src/x-lua.c index 5050838..78ac24f 100644 --- a/gettext-tools/src/x-lua.c +++ b/gettext-tools/src/x-lua.c @@ -1,5 +1,5 @@ /* xgettext Lua backend. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file was written by Ľubomír Remák <lubomirr@lubomirr.eu>, 2012. @@ -451,6 +451,12 @@ string_add (int c) static void string_end () { + if (string_buf_length >= string_buf_alloc) + { + string_buf_alloc = string_buf_alloc + 1; + string_buf = xrealloc (string_buf, string_buf_alloc); + } + string_buf[string_buf_length] = '\0'; } diff --git a/gettext-tools/src/x-lua.h b/gettext-tools/src/x-lua.h index 7af3525..1967242 100644 --- a/gettext-tools/src/x-lua.h +++ b/gettext-tools/src/x-lua.h @@ -1,5 +1,5 @@ /* xgettext Lua backend. - Copyright (C) 2011, 2015 Free Software Foundation, Inc. + Copyright (C) 2011, 2015-2016 Free Software Foundation, Inc. Written by Ľubomír Remák <lubomirrk@lubomirr.eu>, 2011 This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-perl.c b/gettext-tools/src/x-perl.c index 396b7b5..ea903dc 100644 --- a/gettext-tools/src/x-perl.c +++ b/gettext-tools/src/x-perl.c @@ -1,5 +1,5 @@ /* xgettext Perl backend. - Copyright (C) 2002-2010, 2015 Free Software Foundation, Inc. + Copyright (C) 2002-2010, 2015-2016 Free Software Foundation, Inc. This file was written by Guido Flohr <guido@imperia.net>, 2002-2010. diff --git a/gettext-tools/src/x-perl.h b/gettext-tools/src/x-perl.h index 4f7a2b3..5873abe 100644 --- a/gettext-tools/src/x-perl.h +++ b/gettext-tools/src/x-perl.h @@ -1,5 +1,5 @@ /* xgettext Perl backend. - Copyright (C) 2002-2003, 2006, 2010, 2015 Free Software Foundation, + Copyright (C) 2002-2003, 2006, 2010, 2015-2016 Free Software Foundation, Inc. Written by Guido Flohr <guido@imperia.net>, 2002-2003 diff --git a/gettext-tools/src/x-php.c b/gettext-tools/src/x-php.c index ac5cf96..6418e07 100644 --- a/gettext-tools/src/x-php.c +++ b/gettext-tools/src/x-php.c @@ -1,6 +1,5 @@ /* xgettext PHP backend. - Copyright (C) 2001-2003, 2005-2010, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2003, 2005-2010, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <bruno@clisp.org>, 2002. diff --git a/gettext-tools/src/x-php.h b/gettext-tools/src/x-php.h index 0d13fee..e676742 100644 --- a/gettext-tools/src/x-php.h +++ b/gettext-tools/src/x-php.h @@ -1,5 +1,5 @@ /* xgettext PHP backend. - Copyright (C) 2002-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-po.c b/gettext-tools/src/x-po.c index 65d8cc0..d16fd7d 100644 --- a/gettext-tools/src/x-po.c +++ b/gettext-tools/src/x-po.c @@ -1,5 +1,5 @@ /* xgettext PO and JavaProperties backends. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2015 Free + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Peter Miller <millerp@canb.auug.org.au> diff --git a/gettext-tools/src/x-po.h b/gettext-tools/src/x-po.h index e76d77b..030485f 100644 --- a/gettext-tools/src/x-po.h +++ b/gettext-tools/src/x-po.h @@ -1,5 +1,5 @@ /* xgettext PO backend. - Copyright (C) 2001-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-properties.h b/gettext-tools/src/x-properties.h index 0935466..40a7f0a 100644 --- a/gettext-tools/src/x-properties.h +++ b/gettext-tools/src/x-properties.h @@ -1,5 +1,5 @@ /* xgettext JavaProperties backend. - Copyright (C) 2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-python.c b/gettext-tools/src/x-python.c index 8122c34..d0e8894 100644 --- a/gettext-tools/src/x-python.c +++ b/gettext-tools/src/x-python.c @@ -1,6 +1,5 @@ /* xgettext Python backend. - Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, - Inc. + Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2002. diff --git a/gettext-tools/src/x-python.h b/gettext-tools/src/x-python.h index 57d379d..64d4d6c 100644 --- a/gettext-tools/src/x-python.h +++ b/gettext-tools/src/x-python.h @@ -1,5 +1,5 @@ /* xgettext Python backend. - Copyright (C) 2002-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c index f673299..acaadf4 100644 --- a/gettext-tools/src/x-rst.c +++ b/gettext-tools/src/x-rst.c @@ -1,6 +1,5 @@ /* xgettext RST backend. - Copyright (C) 2001-2003, 2005-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 2001-2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/x-rst.h b/gettext-tools/src/x-rst.h index a6ac552..7515498 100644 --- a/gettext-tools/src/x-rst.h +++ b/gettext-tools/src/x-rst.h @@ -1,5 +1,5 @@ /* xgettext RST backend. - Copyright (C) 2001-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-scheme.c b/gettext-tools/src/x-scheme.c index abbe0e5..0a9a9ef 100644 --- a/gettext-tools/src/x-scheme.c +++ b/gettext-tools/src/x-scheme.c @@ -1,5 +1,5 @@ /* xgettext Scheme backend. - Copyright (C) 2004-2009, 2011, 2015 Free Software Foundation, Inc. + Copyright (C) 2004-2009, 2011, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <bruno@clisp.org>, 2004-2005. diff --git a/gettext-tools/src/x-scheme.h b/gettext-tools/src/x-scheme.h index 039979f..3e5cd2c 100644 --- a/gettext-tools/src/x-scheme.h +++ b/gettext-tools/src/x-scheme.h @@ -1,5 +1,5 @@ /* xgettext Scheme backend. - Copyright (C) 2004, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2004. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-sh.c b/gettext-tools/src/x-sh.c index 3746a9a..c0da366 100644 --- a/gettext-tools/src/x-sh.c +++ b/gettext-tools/src/x-sh.c @@ -1,5 +1,5 @@ /* xgettext sh backend. - Copyright (C) 2003, 2005-2009, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-sh.h b/gettext-tools/src/x-sh.h index a31eeff..20bd427 100644 --- a/gettext-tools/src/x-sh.h +++ b/gettext-tools/src/x-sh.h @@ -1,5 +1,5 @@ /* xgettext sh backend. - Copyright (C) 2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-smalltalk.c b/gettext-tools/src/x-smalltalk.c index 9c079cc..de2cee0 100644 --- a/gettext-tools/src/x-smalltalk.c +++ b/gettext-tools/src/x-smalltalk.c @@ -1,5 +1,5 @@ /* xgettext Smalltalk backend. - Copyright (C) 2002-2003, 2005-2009, 2011, 2015 Free Software + Copyright (C) 2002-2003, 2005-2009, 2011, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2002. diff --git a/gettext-tools/src/x-smalltalk.h b/gettext-tools/src/x-smalltalk.h index 9061f29..916177a 100644 --- a/gettext-tools/src/x-smalltalk.h +++ b/gettext-tools/src/x-smalltalk.h @@ -1,5 +1,5 @@ /* xgettext Smalltalk backend. - Copyright (C) 2002-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-stringtable.h b/gettext-tools/src/x-stringtable.h index 2c519e8..10ec744 100644 --- a/gettext-tools/src/x-stringtable.h +++ b/gettext-tools/src/x-stringtable.h @@ -1,5 +1,5 @@ /* xgettext NXStringTable backend. - Copyright (C) 2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-tcl.c b/gettext-tools/src/x-tcl.c index 905d55c..a566b84 100644 --- a/gettext-tools/src/x-tcl.c +++ b/gettext-tools/src/x-tcl.c @@ -1,6 +1,5 @@ /* xgettext Tcl backend. - Copyright (C) 2002-2003, 2005-2009, 2015 Free Software Foundation, - Inc. + Copyright (C) 2002-2003, 2005-2009, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2002. diff --git a/gettext-tools/src/x-tcl.h b/gettext-tools/src/x-tcl.h index 00f6fc5..ab8013d 100644 --- a/gettext-tools/src/x-tcl.h +++ b/gettext-tools/src/x-tcl.h @@ -1,5 +1,5 @@ /* xgettext Tcl Lisp backend. - Copyright (C) 2002-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2002. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-vala.c b/gettext-tools/src/x-vala.c index 4e53b50..b36ab71 100644 --- a/gettext-tools/src/x-vala.c +++ b/gettext-tools/src/x-vala.c @@ -1,5 +1,5 @@ /* xgettext Vala backend. - Copyright (C) 2013, 2015 Free Software Foundation, Inc. + Copyright (C) 2013, 2015-2016 Free Software Foundation, Inc. This file was written by Daiki Ueno <ueno@gnu.org>, 2013. diff --git a/gettext-tools/src/x-vala.h b/gettext-tools/src/x-vala.h index fcd0cfb..5ce16b1 100644 --- a/gettext-tools/src/x-vala.h +++ b/gettext-tools/src/x-vala.h @@ -1,5 +1,5 @@ /* xgettext Vala backend. - Copyright (C) 2002-2003, 2006, 2013, 2015 Free Software Foundation, + Copyright (C) 2002-2003, 2006, 2013, 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/x-ycp.c b/gettext-tools/src/x-ycp.c index 62ab94d..f4c6e8e 100644 --- a/gettext-tools/src/x-ycp.c +++ b/gettext-tools/src/x-ycp.c @@ -1,5 +1,5 @@ /* xgettext YCP backend. - Copyright (C) 2001-2003, 2005-2009, 2011, 2015 Free Software + Copyright (C) 2001-2003, 2005-2009, 2011, 2015-2016 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2001. diff --git a/gettext-tools/src/x-ycp.h b/gettext-tools/src/x-ycp.h index 3ecb097..141247c 100644 --- a/gettext-tools/src/x-ycp.h +++ b/gettext-tools/src/x-ycp.h @@ -1,5 +1,5 @@ /* xgettext YCP backend. - Copyright (C) 2001-2003, 2006, 2015 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2015-2016 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 314d35c..f848d76 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -1,6 +1,5 @@ /* Extracts strings from C source file to Uniforum style .po file. - Copyright (C) 1995-1998, 2000-2015 Free Software Foundation, - Inc. + Copyright (C) 1995-1998, 2000-2016 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. This program is free software: you can redistribute it and/or modify @@ -74,6 +73,7 @@ #include "unistr.h" #include "its.h" #include "locating-rule.h" +#include "search-path.h" #include "gettext.h" /* A convenience macro. I don't like writing gettext() every time. */ @@ -329,7 +329,8 @@ main (int argc, char *argv[]) bool some_additional_keywords = false; bool sort_by_msgid = false; bool sort_by_filepos = false; - char *its_dirs[2] = { NULL, NULL }; + char **dirs; + char **its_dirs; char *explicit_its_filename = NULL; const char *file_name; const char *files_from = NULL; @@ -638,13 +639,15 @@ main (int argc, char *argv[]) break; case CHAR_MAX + 17: /* --check */ - if (strcmp (optarg, "ellipsis-unicode") == 0) - default_syntax_check[sc_ellipsis_unicode] = yes; - else if (strcmp (optarg, "space-ellipsis") == 0) - default_syntax_check[sc_space_ellipsis] = yes; - else if (strcmp (optarg, "quote-unicode") == 0) - default_syntax_check[sc_quote_unicode] = yes; - else + for (i = 0; i < NSYNTAXCHECKS; i++) + { + if (strcmp (optarg, syntax_check_name[i]) == 0) + { + default_syntax_check[i] = yes; + break; + } + } + if (i == NSYNTAXCHECKS) error (EXIT_FAILURE, 0, _("syntax check '%s' unknown"), optarg); break; @@ -680,7 +683,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ "), - "1995-1998, 2000-2013"); + "1995-1998, 2000-2016"); printf (_("Written by %s.\n"), proper_name ("Ulrich Drepper")); exit (EXIT_SUCCESS); } @@ -725,36 +728,20 @@ xgettext cannot work without keywords to look for")); usage (EXIT_FAILURE); } - { - const char *gettextdatadir; - char *versioned_gettextdatadir; - - /* Make it possible to override the locator file location. This - is necessary for running the testsuite before "make - install". */ - gettextdatadir = getenv ("GETTEXTDATADIR"); - if (gettextdatadir == NULL || gettextdatadir[0] == '\0') - gettextdatadir = relocate (GETTEXTDATADIR); - - its_dirs[0] = xconcatenated_filename (gettextdatadir, "its", NULL); - - versioned_gettextdatadir = - xasprintf ("%s%s", relocate (GETTEXTDATADIR), PACKAGE_SUFFIX); - its_dirs[1] = xconcatenated_filename (versioned_gettextdatadir, "its", - NULL); - free (versioned_gettextdatadir); - - its_locating_rules = locating_rule_list_alloc (); - for (i = 0; i < SIZEOF (its_dirs); i++) - locating_rule_list_add_from_directory (its_locating_rules, its_dirs[i]); - } - /* Explicit ITS file selection and language specification are mutually exclusive. */ if (explicit_its_filename != NULL && language != NULL) error (EXIT_FAILURE, 0, _("%s and %s are mutually exclusive"), "--its", "--language"); + if (explicit_its_filename == NULL) + { + its_dirs = get_search_path ("its"); + its_locating_rules = locating_rule_list_alloc (); + for (dirs = its_dirs; *dirs != NULL; dirs++) + locating_rule_list_add_from_directory (its_locating_rules, *dirs); + } + /* Determine extractor from language. */ if (language != NULL) extractor = language_to_extractor (language); @@ -929,7 +916,7 @@ warning: ITS rule file '%s' does not exist"), explicit_its_filename); its_rule_list_add_from_string (its_rules, ITS_ROOT_UNTRANSLATABLE); - for (j = 0; j < SIZEOF (its_dirs); j++) + for (j = 0; its_dirs[j] != NULL; j++) { char *its_filename = xconcatenated_filename (its_dirs[j], its_basename, @@ -944,7 +931,7 @@ warning: ITS rule file '%s' does not exist"), explicit_its_filename); if (ok) break; } - if (j == SIZEOF (its_dirs)) + if (its_dirs[j] == NULL) { error (0, 0, _("\ warning: ITS rule file '%s' does not exist; check your gettext installation"), @@ -1029,8 +1016,9 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension) if (its_locating_rules) locating_rule_list_free (its_locating_rules); - for (i = 0; i < SIZEOF (its_dirs); i++) + for (i = 0; its_dirs[i] != NULL; i++) free (its_dirs[i]); + free (its_dirs); exit (EXIT_SUCCESS); } @@ -1117,7 +1105,7 @@ Operation mode:\n")); printf (_("\ --check=NAME perform syntax check on messages\n\ (ellipsis-unicode, space-ellipsis,\n\ - quote-unicode)\n")); + quote-unicode, bullet-unicode)\n")); printf (_("\ --sentence-end=TYPE type describing the end of sentence\n\ (single-space, which is the default, \n\ @@ -1153,6 +1141,10 @@ Language specific options:\n")); printf (_("\ (only languages C, C++, ObjectiveC)\n")); printf (_("\ + --its=FILE apply ITS rules from FILE\n")); + printf (_("\ + (only XML based languages)\n")); + printf (_("\ --qt recognize Qt format strings\n")); printf (_("\ (only language C++)\n")); @@ -1194,8 +1186,6 @@ Output details:\n")); printf (_("\ --stringtable-output write out a NeXTstep/GNUstep .strings file\n")); printf (_("\ - --its=FILE apply ITS rules from FILE\n")); - printf (_("\ --itstool write out itstool comments\n")); printf (_("\ -w, --width=NUMBER set output page width\n")); diff --git a/gettext-tools/src/xgettext.h b/gettext-tools/src/xgettext.h index 167fcd3..5bdf94e 100644 --- a/gettext-tools/src/xgettext.h +++ b/gettext-tools/src/xgettext.h @@ -1,6 +1,6 @@ /* xgettext common functions. - Copyright (C) 2001-2003, 2005-2006, 2008-2009, 2011, 2015 Free - Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2006, 2008-2009, 2011, 2015-2016 Free Software + Foundation, Inc. Written by Peter Miller <millerp@canb.auug.org.au> and Bruno Haible <haible@clisp.cons.org>, 2001. |