]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
12 months agolibgettextpo: Make function po_format_list() multithread-safe.
Bruno Haible [Sun, 4 Aug 2024 23:32:32 +0000 (01:32 +0200)] 
libgettextpo: Make function po_format_list() multithread-safe.

* autogen.sh (GNULIB_MODULES_LIBGETTEXTPO): Add 'once'.
* gettext-tools/libgettextpo/gettext-po.c: Include glthread/once.h.
(all_formats): New variable.
(all_formats_init): New function, extracted from po_format_list.
(all_formats_init_once): New variable.
(po_format_list): Invoke all_formats_init once.

12 months agolibgettextpo: Don't use static variable gram_max_allowed_errors.
Bruno Haible [Sat, 3 Aug 2024 12:28:32 +0000 (14:28 +0200)] 
libgettextpo: Don't use static variable gram_max_allowed_errors.

* gettext-tools/src/read-po.h (gram_max_allowed_errors): New declaration.
* gettext-tools/src/read-po-lex.h (gram_max_allowed_errors): Remove declaration.
* gettext-tools/src/read-po.c: Include <limits.h>.
(gram_max_allowed_errors): Moved to here. Change initial value to UINT_MAX.
* gettext-tools/src/read-po-lex.c: Include read-po.h.
(gram_max_allowed_errors): Remove variable.
* gettext-tools/libgettextpo/gettext-po.c: Don't include read-po-lex.h.
(po_file_read): Don't assign gram_max_allowed_errors.
* gettext-tools/src/msgattrib.c (main): Initialize gram_max_allowed_errors.
* gettext-tools/src/msgcat.c (main): Likewise.
* gettext-tools/src/msgcomm.c (main): Likewise.
* gettext-tools/src/msgconv.c (main): Likewise.
* gettext-tools/src/msgen.c (main): Likewise.
* gettext-tools/src/msgexec.c (main): Likewise.
* gettext-tools/src/msgfilter.c (main): Likewise.
* gettext-tools/src/msggrep.c (main): Likewise.
* gettext-tools/src/msginit.c (main): Likewise.
* gettext-tools/src/msguniq.c (main): Likewise.
* gettext-tools/src/xgettext.c (main): Likewise.
* gettext-tools/src/msgcmp.c: Don't include read-po-lex.h.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgfmt.c: Don't include read-po-lex.h.
(main): Initialize gram_max_allowed_errors.

12 months agoRefactor: Remove code duplication.
Bruno Haible [Sat, 3 Aug 2024 11:10:46 +0000 (13:10 +0200)] 
Refactor: Remove code duplication.

* gettext-tools/src/po-xerror.h: Include xerror-handler.h. Remove all
declarations.
(PO_SEVERITY_*): Define as aliases of CAT_SEVERITY_*.
(po_xerror, po_xerror2): New macros.
* gettext-tools/src/po-xerror.c: Remove file.
* gettext-tools/src/Makefile.am (COMMON_SOURCE): Remove po-xerror.c.
* gettext-tools/src/msgmerge.c (silent_xerror2): New function.
(match_domain): Pass a stack-allocated xerror_handler to check_plural_eval.
* gettext-tools/woe32dll/gettextsrc-exports.c (po_xerror, po_xerror2): Remove
exports.
* gettext-tools/po/POTFILES.in: Add src/xerror-handler.c. Remove
src/po-xerror.c.

12 months agolibgettextpo: Remove unused object files.
Bruno Haible [Sat, 3 Aug 2024 10:21:26 +0000 (12:21 +0200)] 
libgettextpo: Remove unused object files.

* gettext-tools/src/read-po-lex.h: Don't include xerror.h.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Remove
po-xerror.c and po-error.c.
* autogen.sh (GNULIB_MODULES_LIBGETTEXTPO): Remove xerror.

12 months agoAdd an xerror_handler parameter to check_message and check_message_list.
Bruno Haible [Sat, 3 Aug 2024 10:14:48 +0000 (12:14 +0200)] 
Add an xerror_handler parameter to check_message and check_message_list.

* gettext-tools/src/msgl-check.h: Include xerror-handler.h.
(check_plural_eval, check_message, check_message_list): Add xerror_handler_ty
parameter.
* gettext-tools/src/msgl-check.c (check_plural_eval, check_plural, check_pair,
check_header_entry, check_message, check_message_list): Add xerror_handler_ty
parameter. Use it for error handling.
(struct formatstring_error_logger_locals): Add xeh field.
(formatstring_error_logger): Use it for error handling.
* gettext-tools/libgettextpo/gettext-po.c: Don't include po-xerror.h.
(po_file_check_all, po_message_check_all): Pass a stack-allocated xerror_handler
to check_message_list.
(po_message_check_format): Pass a stack-allocated xerror_handler to
check_message.
* gettext-tools/src/msgfmt.c (main, msgfmt_operand_list_add_from_directory): Use
the default xerror_handler.
* gettext-tools/src/msgmerge.c (match_domain): Likewise.

12 months agoAdd an xerror_handler parameter to msgdomain_list_print.
Bruno Haible [Sat, 3 Aug 2024 09:40:26 +0000 (11:40 +0200)] 
Add an xerror_handler parameter to msgdomain_list_print.

* gettext-tools/src/write-catalog.h: Include xerror-handler.h.
(struct catalog_output_format): Add xerror_handler_ty parameter to the print
method.
(msgdomain_list_print): Add xerror_handler_ty parameter.
* gettext-tools/src/write-catalog.c: Include xerror-handler.h instead of
po-xerror.h.
(msgdomain_list_print): Add xerror_handler_ty parameter. Use it for error
handling.
* gettext-tools/src/write-po.c: Include xerror-handler.h instead of po-xerror.h.
(wrap, message_print, message_print_obsolete, msgdomain_list_print_po): Add
xerror_handler_ty parameter. Use it for error handling.
* gettext-tools/src/write-properties.c: Include xerror-handler.h.
(write_properties, msgdomain_list_print_properties): Add xerror_handler_ty
parameter. Use it for error handling.
* gettext-tools/src/write-stringtable.c: Include xerror-handler.h.
(write_stringtable, msgdomain_list_print_stringtable): Add xerror_handler_ty
parameter. Use it for error handling.
* gettext-tools/libgettextpo/gettext-po.c (po_file_write): Pass a
stack-allocated xerror_handler to msgdomain_list_print.
* gettext-tools/src/msgl-iconv.h: Include xerror-handler.h.
(iconv_message_list, iconv_msgdomain_list): Add xerror_handler_ty parameter.
* gettext-tools/src/msgl-iconv.c: Include xerror-handler.h instead of
po-xerror.h.
(conversion_error, convert_string, convert_string_list, convert_prev_msgid,
convert_msgid, convert_msgstr, iconv_message_list_internal, iconv_message_list,
iconv_msgdomain_list): Add xerror_handler_ty parameter. Use it for error
handling.
(convert_string_directly, convert_string_desc_directly): Use the default
xerror_handler.
* gettext-tools/src/msgattrib.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/msgcat.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/msgcmp.c: Include xerror-handler.h.
(compare): Use the default xerror_handler.
* gettext-tools/src/msgcomm.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/msgconv.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/msgen.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/msgfilter.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/msgfmt.c: Include xerror-handler.h.
(msgfmt_operand_list_add_from_directory): Use the default xerror_handler.
* gettext-tools/src/msggrep.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/msginit.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/msgl-cat.c: Include xerror-handler.h.
(catenate_msgdomain_list): Use the default xerror_handler.
* gettext-tools/src/msgmerge.c: Include xerror-handler.h.
(main, merge): Use the default xerror_handler.
* gettext-tools/src/msgunfmt.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/msguniq.c: Include xerror-handler.h.
(main): Use the default xerror_handler.
* gettext-tools/src/write-csharp.c: Include xerror-handler.h.
(msgdomain_write_csharp): Use the default xerror_handler.
* gettext-tools/src/write-desktop.c: Include xerror-handler.h.
(msgdomain_write_desktop): Use the default xerror_handler.
* gettext-tools/src/write-java.c: Include xerror-handler.h.
(msgdomain_write_java): Use the default xerror_handler.
* gettext-tools/src/write-mo.c: Include xerror-handler.h.
(msgdomain_write_mo): Use the default xerror_handler.
* gettext-tools/src/write-qt.c: Include xerror-handler.h.
(msgdomain_write_qt): Use the default xerror_handler.
* gettext-tools/src/write-resources.c: Include xerror-handler.h.
(msgdomain_write_csharp_resources): Use the default xerror_handler.
* gettext-tools/src/write-tcl.c: Include xerror-handler.h.
(msgdomain_write_tcl): Use the default xerror_handler.
* gettext-tools/src/write-xml.c: Include xerror-handler.h.
(msgdomain_write_xml): Use the default xerror_handler.
* gettext-tools/src/x-po.c (extract): Use the default xerror_handler.
* gettext-tools/src/xgettext.c: Include xerror-handler.h.
(main, finalize_header): Use the default xerror_handler.

12 months agoAdd an xerror_handler parameter to read_catalog_stream.
Bruno Haible [Sat, 3 Aug 2024 01:11:18 +0000 (03:11 +0200)] 
Add an xerror_handler parameter to read_catalog_stream.

* gettext-tools/src/read-catalog-abstract.h: Include xerror-handler.h.
(ABSTRACT_CATALOG_READER_TY): Add xeh field.
(catalog_reader_alloc): Add xerror_handler parameter.
* gettext-tools/src/read-catalog-abstract.c: Include xerror-handler.h instead of
po-xerror.h.
(catalog_reader_alloc): Add xerror_handler parameter.
(catalog_reader_parse): Use catr->xeh for error handling.
* gettext-tools/src/read-catalog.h: Include xerror-handler.h.
(default_catalog_reader_alloc, read_catalog_stream): Add xerror_handler
parameter.
* gettext-tools/src/read-catalog.c: Include xerror-handler.h instead of
po-xerror.h.
(default_set_domain, default_add_message): Use catr->xeh for error handling.
(default_catalog_reader_alloc, read_catalog_stream): Add xerror_handler
parameter.
* gettext-tools/src/read-po-lex.h: Include read-catalog-abstract.h.
(po_gram_error_at_line): Add catr parameter.
* gettext-tools/src/read-po-lex.c: Include xerror-handler.h instead of
po-xerror.h.
(po_gram_error): Use ps->catr->xeh for error handling.
(po_gram_error_at_line): Add catr parameter. Use catr->xeh for error handling.
(po_lex_charset_set, mbfile_getc, lex_getc): Use ps->catr->xeh for error
handling.
(keyword_p, po_gram_lex): Update invocations of po_gram_error_at_line.
* gettext-tools/src/read-po-gram.y: Update invocations of po_gram_error_at_line.
* gettext-tools/src/read-properties.c: Include xerror-handler.h instead of
po-xerror.h.
(phase4_getuc, read_escaped_string): Add catr parameter. Use catr->xeh for error
handling.
(properties_parse): Use catr->xeh for error handling.
* gettext-tools/src/read-stringtable.c: Include xerror-handler.h instead of
po-xerror.h.
(phase1_getc, phase2_getc, phase3_getc): Add catr parameter. Use catr->xeh for
error handling.
(phase4_getc): Update.
(read_string, stringtable_parse): Use catr->xeh for error handling.
* gettext-tools/libgettextpo/gettext-po.c (po_file_read): Pass a stack-allocated
xerror_handler to read_catalog_stream.
* gettext-tools/src/msgfmt.c: Include xerror-handler.h.
(read_catalog_file_msgfmt): Use the default xerror_handler.
* gettext-tools/src/read-catalog-file.c: Include xerror-handler.h.
(read_catalog_file): Use the default xerror_handler.
* gettext-tools/src/read-csharp.c: Include xerror-handler.h.
(execute_and_read_po_output): Use the default xerror_handler.
* gettext-tools/src/read-java.c: Include xerror-handler.h.
(execute_and_read_po_output): Use the default xerror_handler.
* gettext-tools/src/read-resources.c: Include xerror-handler.h.
(execute_and_read_po_output): Use the default xerror_handler.
* gettext-tools/src/read-tcl.c: Include xerror-handler.h.
(msgdomain_read_tcl): Use the default xerror_handler.
* gettext-tools/src/x-po.c: Include xerror-handler.h.
(extract): Use the default xerror_handler.
* gettext-tools/src/xgettext.c: Include xerror-handler.h.
(read_exclusion_file): Use the default xerror_handler.

12 months agoAdd xerror-handler.
Bruno Haible [Fri, 2 Aug 2024 22:40:17 +0000 (00:40 +0200)] 
Add xerror-handler.

* gettext-tools/src/xerror-handler.h: New file, based on gettext-tools/src/po-xerror.h.
* gettext-tools/src/xerror-handler.c: New file, based on gettext-tools/src/po-xerror.c.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add xerror-handler.h.
(COMMON_SOURCE): Add xerror-handler.c.
* gettext-tools/src/FILES: Update.
* gettext-tools/woe32dll/gettextsrc-exports.c (textmode_xerror_handler_struct):
New export.

12 months agoRefactor: Remove K&R C cruft.
Bruno Haible [Sat, 3 Aug 2024 00:15:22 +0000 (02:15 +0200)] 
Refactor: Remove K&R C cruft.

* gettext-tools/src/read-po-lex.c: Remove VARARGS1 and VARARGS2 comments.

12 months agolibgettextpo: Remove backward compatibility with versions < 0.15 (July 2006).
Bruno Haible [Fri, 2 Aug 2024 20:57:06 +0000 (22:57 +0200)] 
libgettextpo: Remove backward compatibility with versions < 0.15 (July 2006).

* gettext-tools/libgettextpo/gettext-po.c (_GL_NO_INLINE_ERROR): Remove macro.
Don't include <error.h>, <stdbool.h>, <stdarg.h>, xerror.h, po-error.h,
format.h.
(orig_error, orig_error_at_line): Remove variables.
(void_multiline_warning, void_multiline_error): Remove functions.
(po_file_read_v2, po_file_read, po_file_write, po_error_logger,
po_message_check_format): Remove functions.
* gettext-tools/libgettextpo/gettext-po.in.h (struct po_error_handler): Update
comment.
* gettext-tools/src/po-xerror.c: Update comment.

12 months agoRefactor: Don't use po_gram_error_at_line outside the PO file reader.
Bruno Haible [Fri, 2 Aug 2024 20:33:13 +0000 (22:33 +0200)] 
Refactor: Don't use po_gram_error_at_line outside the PO file reader.

* gettext-tools/src/msgcmp.c: Include po-xerror.h, xvasprintf.h.
(match_domain, compare): Use po_xerror, po_xerror2 instead of
po_gram_error_at_line.
* gettext-tools/src/msgfmt.c: Include po-xerror.h.
(msgfmt_set_domain): Use po_xerror instead of po_gram_error_at_line.
* gettext-tools/src/msgmerge.c: Include xvasprintf.h.
(match_domain): Use po_xerror, po_xerror2 instead of po_gram_error_at_line.
* gettext-tools/src/read-catalog.c (default_set_domain): Use po_xerror instead
of po_gram_error_at_line.
* gettext-tools/src/xgettext.c: Include po-xerror.h.
(exclude_directive_domain): Use po_xerror instead of po_gram_error_at_line.

12 months agoRename some files, part 2.
Bruno Haible [Fri, 2 Aug 2024 20:28:46 +0000 (22:28 +0200)] 
Rename some files, part 2.

12 months agoRename some files.
Bruno Haible [Fri, 2 Aug 2024 02:40:40 +0000 (04:40 +0200)] 
Rename some files.

* gettext-tools/src/read-po-internal.h: Renamed from
gettext-tools/src/po-gram.h.
* gettext-tools/src/read-po-lex.h: Renamed from gettext-tools/src/po-lex.h.
* gettext-tools/src/read-po-lex.c: Renamed from gettext-tools/src/po-lex.c.
* gettext-tools/src/read-po-gram.y: Renamed from
gettext-tools/src/po-gram-gen.y.
* gettext-tools/src/*.h: Update.
* gettext-tools/src/*.c: Update.
* gettext-tools/src/FILES: Update.
* gettext-tools/src/Makefile.am: Update.
* gettext-tools/libgettextpo/Makefile.am: Update.

12 months agoRefactor includes.
Bruno Haible [Fri, 2 Aug 2024 02:17:50 +0000 (04:17 +0200)] 
Refactor includes.

* gettext-tools/src/read-catalog-abstract.h: Include <stdio.h>. Don't include
po-lex.h.
* gettext-tools/src/read-catalog.c: Include po-lex.h.
* gettext-tools/src/msgcmp.c: Include po-lex.h.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.
* gettext-tools/libgettextpo/gettext-po.c: Likewise.
* gettext-tools/src/x-po.c: Include <error.h>. Don't include po-lex.h.
* gettext-tools/src/read-desktop.h: Include pos.h. Don't include po-lex.h.
* gettext-tools/src/read-desktop.c: Don't include po-lex.h.

12 months agolibgettextpo: Remove static variable gram_pos.
Bruno Haible [Thu, 1 Aug 2024 21:34:37 +0000 (23:34 +0200)] 
libgettextpo: Remove static variable gram_pos.

* gettext-tools/src/po-gram.h (struct po_parser_state): Add field gram_pos.
* gettext-tools/src/po-lex.h (gram_pos): Remove declaration.
* gettext-tools/src/po-lex.c (gram_pos): Remove variable.
(po_gram_error, lex_start, lex_end, lex_getc, lex_ungetc, keyword_p,
po_gram_lex): Access ps->gram_pos instead of gram_pos.
* gettext-tools/src/po-gram-gen.y: Access ps->gram_pos instead of gram_pos.
* gettext-tools/woe32dll/gettextsrc-exports.c (gram_pos): Remove export.

12 months agoRemove some uses of global variable gram_pos.
Bruno Haible [Thu, 1 Aug 2024 21:08:21 +0000 (23:08 +0200)] 
Remove some uses of global variable gram_pos.

* gettext-tools/src/msgfmt.c (msgfmt_comment_special): Use the file name from
the catalog reader instead of gram_pos.
* gettext-tools/src/read-desktop.c (gram_pos): Remove declaration.
(pos): New variable.
(phase2_getc, phase2_ungetc, desktop_lex, desktop_parse): Use it instead of
gram_pos.
* gettext-tools/src/read-properties.c (gram_pos): Remove declaration.
(pos): New variable.
(phase2_getc, phase2_ungetc, phase4_getuc, read_escaped_string,
properties_parse): Use it instead of gram_pos.
* gettext-tools/src/read-stringtable.c (gram_pos): Remove declaration.
(pos): New variable.
(phase3_getc, phase3_ungetc, stringtable_parse): Use it instead of gram_pos.
(read_string): Likewise. Rename a parameter.
(conv_from_ucs4): Rename a local variable.

12 months agoRefactor directive_domain and set_domain methods.
Bruno Haible [Thu, 1 Aug 2024 20:47:17 +0000 (22:47 +0200)] 
Refactor directive_domain and set_domain methods.

* gettext-tools/src/read-catalog-abstract.h
(abstract_catalog_reader_class_ty::directive_domain): Add name_pos parameter.
(catalog_reader_seen_domain): Likewise.
* gettext-tools/src/read-catalog-abstract.c (call_directive_domain,
catalog_reader_seen_domain): Likewise.
* gettext-tools/src/read-catalog.h
(default_catalog_reader_class_ty::set_domain): Add name_pos parameter.
(default_directive_domain, default_set_domain): Likewise.
* gettext-tools/src/read-catalog.c (call_set_domain, default_directive_domain):
Likewise.
(default_set_domain): Add name_pos parameter. Use it instead of the global
variable gram_pos.
* gettext-tools/src/msgfmt.c (msgfmt_set_domain): Likewise.
* gettext-tools/src/xgettext.c (exclude_directive_domain): Likewise.
* gettext-tools/src/po-gram-gen.y: Update catalog_reader_seen_domain invocation.

12 months agoRefactor read-desktop.h.
Bruno Haible [Thu, 1 Aug 2024 20:24:48 +0000 (22:24 +0200)] 
Refactor read-desktop.h.

Rename the parameter of type 'struct desktop_reader_ty *' to reader.

* gettext-tools/src/read-desktop.h (struct desktop_reader_class_ty): Change
parameter names of methods.

12 months agolibgettextpo: Remove static variables 'buf', 'bufmax'.
Bruno Haible [Thu, 1 Aug 2024 15:40:17 +0000 (17:40 +0200)] 
libgettextpo: Remove static variables 'buf', 'bufmax'.

* gettext-tools/src/po-gram.h (struct po_parser_state): Add fields buf, bufmax.
* gettext-tools/src/po-lex.c (lex_start): Initialize them.
(lex_end): Free the buf field.
(po_gram_lex): Use these fields instead of static variables.

12 months agobuild: Enable Automake's dependency tracking.
Bruno Haible [Thu, 1 Aug 2024 15:27:36 +0000 (17:27 +0200)] 
build: Enable Automake's dependency tracking.

Quite often, after changing a struct defined in a .h file, I see "make check"
fail. After "make clean; make", "make check" passes again. This wastes my time.
Unlike 20 years ago, I don't want think about which .o files I need to erase
and rebuild. Build times are now much smaller than they were 20 years ago,
especially when configuring with --disable-shared and CFLAGS="-ggdb".

* gnulib-local/modules/gettext-runtime-misc (configure.ac): Don't augment
AUTOMAKE_OPTIONS.
* gettext-runtime/Makefile.am (AUTOMAKE_OPTIONS): Remove 'no-dependencies'.
* gettext-runtime/intl/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-runtime/libasprintf/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-runtime/src/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-runtime/tests/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* libtextstyle/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* libtextstyle/lib/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-tools/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-tools/gnulib-lib/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-tools/libgettextpo/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-tools/libgrep/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-tools/src/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-tools/system-tests/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-tools/tests/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* gettext-tools/tests/gnulib-lib/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* Makefile.am (AUTOMAKE_OPTIONS): Likewise.

12 months agoRefactor read-catalog-abstract.[hc], read-catalog.[hc], part 2.
Bruno Haible [Thu, 1 Aug 2024 20:21:56 +0000 (22:21 +0200)] 
Refactor read-catalog-abstract.[hc], read-catalog.[hc], part 2.

Rename the parameter of type 'struct default_catalog_reader_ty *' to dcatr.

* gettext-tools/src/read-catalog.h (this): Remove macro.
(struct default_catalog_reader_class_ty): Change parameter names of methods.

12 months agolibgettextpo: Remove static variable pass_comments.
Bruno Haible [Mon, 29 Jul 2024 00:44:40 +0000 (02:44 +0200)] 
libgettextpo: Remove static variable pass_comments.

* gettext-tools/src/read-catalog-abstract.h (ABSTRACT_CATALOG_READER_TY): Add
pass_comments field.
* gettext-tools/src/read-catalog-abstract.c (catalog_reader_alloc): Initialize
pass_comments field.
* gettext-tools/src/read-catalog.c (default_parse_brief): Assign the
pass_comments field, instead of calling po_lex_pass_comments.
* gettext-tools/src/po-lex.h (po_lex_pass_comments): Remove declaration.
* gettext-tools/src/po-lex.c (pass_comments): Remove variable.
(po_gram_lex): Update.
(po_lex_pass_comments): Remove function.

12 months agolibgettextpo: Remove static variable pass_obsolete_entries.
Bruno Haible [Mon, 29 Jul 2024 00:11:43 +0000 (02:11 +0200)] 
libgettextpo: Remove static variable pass_obsolete_entries.

* gettext-tools/src/read-catalog-abstract.h (ABSTRACT_CATALOG_READER_TY): Add
pass_obsolete_entries field.
* gettext-tools/src/read-catalog-abstract.c (catalog_reader_alloc): Initialize
the pass_obsolete_entries field.
* gettext-tools/src/read-catalog.c (read_catalog_stream): Assign the
pass_obsolete_entries field, instead of calling po_lex_pass_obsolete_entries.
* gettext-tools/src/msgfmt.c (read_catalog_file_msgfmt): Likewise.
* gettext-tools/src/po-lex.h (pass_obsolete_entries): Remove declaration.
(po_lex_pass_obsolete_entries): Remove declaration.
* gettext-tools/src/po-lex.c (pass_obsolete_entries): Remove variable.
(po_lex_pass_obsolete_entries): Remove function.
* gettext-tools/src/po-gram-gen.y: Update.
* gettext-tools/woe32dll/gettextsrc-exports.c (pass_obsolete_entries): Remove
export.

12 months agolibgettextpo: Remove static variables po_lex_charset, po_lex_iconv, po_lex_isolate_...
Bruno Haible [Sun, 28 Jul 2024 19:32:56 +0000 (21:32 +0200)] 
libgettextpo: Remove static variables po_lex_charset, po_lex_iconv, po_lex_isolate_*, po_lex_weird_cjk.

* gettext-tools/src/read-catalog-abstract.h (ABSTRACT_CATALOG_READER_TY): Add
fields po_lex_isolate_start, po_lex_isolate_end.
* gettext-tools/src/read-catalog-abstract.c (catalog_reader_alloc): Initialize
the new abstract_catalog_reader_ty fields.
(parse_comment_filepos): Update.
* gettext-tools/src/po-gram.h: Include <iconv.h>.
(struct po_parser_state): Add fields po_lex_charset, po_lex_iconv,
po_lex_weird_cjk.
* gettext-tools/src/po-lex.h (lex_end): Add a 'struct po_parser_state *'
parameter.
(po_lex_charset_set): New declaration, moved here from po-charset.h.
* gettext-tools/src/po-lex.c: Include xmalloca.h, basename-lgpl.h, progname.h,
c-strstr.h.
(po_lex_charset_init, po_lex_charset_set, po_lex_charset_close): Moved here from
po-charset.c. Take a 'struct po_parser_state *' as argument.
(mb_width, mbfile_getc, lex_start): Update.
(lex_end): Add a 'struct po_parser_state *' parameter.
* gettext-tools/src/po-charset.h (po_lex_charset, po_lex_isolate_start,
po_lex_isolate_end, po_lex_iconv, po_lex_weird_cjk): Remove declarations.
(po_lex_charset_init, po_lex_charset_set, po_lex_charset_close): Remove
declarations.
* gettext-tools/src/po-charset.c: Don't include <stdlib.h>, xmalloca.h,
xvasprintf.h, po-xerror.h, basename-lgpl.h, progname.h, c-strstr.h.
(po_lex_charset, po_lex_isolate_start, po_lex_isolate_end, po_lex_iconv,
po_lex_weird_cjk): Remove variables.
(po_lex_charset_init, po_lex_charset_set, po_lex_charset_close): Moved to
po-lex.c.
* gettext-tools/src/po-gram-gen.y: Update.
* gettext-tools/src/read-po.c (po_parse): Update.
* gettext-tools/woe32dll/gettextsrc-exports.c (po_lex_charset,
po_lex_isolate_start, po_lex_isolate_end, po_lex_iconv, po_lex_weird_cjk):
Remove exports.

12 months agoRefactor.
Bruno Haible [Sun, 28 Jul 2024 19:44:14 +0000 (21:44 +0200)] 
Refactor.

* gettext-tools/src/its.c (struct its_rule_class_ty): Change parameter names of
methods.
(its_rule_destructor, its_translate_rule_constructor, its_translate_rule_eval,
its_localization_note_rule_constructor, its_localization_note_rule_eval,
its_element_within_text_rule_constructor, its_element_within_text_rule_eval,
its_preserve_space_rule_constructor, its_preserve_space_rule_eval,
its_extension_context_rule_constructor, its_extension_context_rule_eval,
its_extension_escape_rule_constructor, its_extension_escape_rule_eval,
its_rule_destroy): Rename parameter 'pop' to 'rule'.
(its_rule_alloc): Rename local variable 'pop' to 'rule'.

12 months agoRefactor: Rename local variables of type '*_catalog_reader_ty *'.
Bruno Haible [Sun, 28 Jul 2024 20:00:01 +0000 (22:00 +0200)] 
Refactor: Rename local variables of type '*_catalog_reader_ty *'.

* gettext-tools/src/xgettext.c (read_exclusion_file): Rename local variable
'pop' to 'catr'.
* gettext-tools/src/read-catalog.c (read_catalog_stream): Rename local variable
'pop' to 'dcatr'.

12 months agoRefactor read-catalog-special.[hc], part 2.
Bruno Haible [Sun, 28 Jul 2024 18:34:25 +0000 (20:34 +0200)] 
Refactor read-catalog-special.[hc], part 2.

* gettext-tools/src/read-catalog.c: Include read-catalog-special.h.
* gettext-tools/src/xg-message.c: Include read-catalog-special.h instead of
read-catalog-abstract.h.
* gettext-tools/src/x-ruby.c: Likewise.

12 months agoRefactor.
Bruno Haible [Sun, 28 Jul 2024 17:26:22 +0000 (19:26 +0200)] 
Refactor.

* gettext-tools/src/read-catalog-abstract.h (catalog_reader_seen_domain):
Renamed from po_callback_domain.
(catalog_reader_seen_message): Renamed from po_callback_message.
(catalog_reader_seen_comment): Renamed from po_callback_comment.
(catalog_reader_seen_comment_dot): Renamed from po_callback_comment_dot.
(catalog_reader_seen_comment_filepos): Renamed from po_callback_comment_filepos.
(catalog_reader_seen_comment_special): Renamed from po_callback_comment_special.
(catalog_reader_seen_generic_comment): Renamed from
po_callback_comment_dispatcher.
* gettext-tools/src/read-catalog-abstract.c (catalog_reader_seen_domain):
Renamed from po_callback_domain.
(catalog_reader_seen_message): Renamed from po_callback_message.
(catalog_reader_seen_comment): Renamed from po_callback_comment.
(catalog_reader_seen_comment_dot): Renamed from po_callback_comment_dot.
(catalog_reader_seen_comment_filepos): Renamed from po_callback_comment_filepos.
(catalog_reader_seen_comment_special): Renamed from po_callback_comment_special.
(parse_comment_filepos, parse_comment_solaris_filepos): Update.
(catalog_reader_seen_generic_comment): Renamed from
po_callback_comment_dispatcher. Update.
* gettext-tools/src/po-gram-gen.y: Update.
* gettext-tools/src/read-properties.c (properties_parse): Update.
* gettext-tools/src/read-stringtable.c (special_comment_finish,
comment_line_end, stringtable_parse): Update.

12 months agoRefactor.
Bruno Haible [Sun, 28 Jul 2024 17:05:05 +0000 (19:05 +0200)] 
Refactor.

* gettext-tools/src/read-catalog-abstract.c (parse_comment_filepos): Renamed
from po_parse_comment_filepos.
(parse_comment_solaris_filepos): Renamed from po_parse_comment_solaris_filepos.
(po_callback_comment_dispatcher): Update.

12 months agoRefactor.
Bruno Haible [Sun, 28 Jul 2024 15:30:53 +0000 (17:30 +0200)] 
Refactor.

* gettext-tools/src/read-catalog-special.h (parse_comment_special): Renamed from
po_parse_comment_special.
* gettext-tools/src/read-catalog-special.c (parse_comment_special): Renamed from
po_parse_comment_special.
* gettext-tools/src/read-catalog.c (default_comment_special): Update.
* gettext-tools/src/xg-message.c (remember_a_message): Update.
* gettext-tools/src/x-ruby.c (extract_ruby): Update.
* gettext-tools/src/xgettext.c (xgettext_record_flag): Update comment.

12 months agoRefactor.
Bruno Haible [Sun, 28 Jul 2024 15:02:45 +0000 (17:02 +0200)] 
Refactor.

* gettext-tools/src/read-catalog-special.h: New file, extracted from
gettext-tools/src/read-catalog-abstract.h.
* gettext-tools/src/read-catalog-special.c: New file, extracted from
gettext-tools/src/read-catalog-abstract.c.
* gettext-tools/src/read-catalog-abstract.h (po_parse_comment_special): Remove
declaration.
* gettext-tools/src/read-catalog-abstract.c: Don't include <limits.h>.
(po_parse_comment_special): Moved to read-catalog-special.c.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add read-catalog-special.h.
(libgettextsrc_la_SOURCES): Add read-catalog-special.c.
* gettext-tools/src/FILES: Update.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Add
../src/read-catalog-special.c.

12 months agolibgettextpo: Remove static variable callback_arg.
Bruno Haible [Sun, 28 Jul 2024 14:08:25 +0000 (16:08 +0200)] 
libgettextpo: Remove static variable callback_arg.

* gettext-tools/src/read-catalog-abstract.h (po_callback_domain,
po_callback_message, po_callback_comment, po_callback_comment_dot,
po_callback_comment_filepos, po_callback_comment_special,
po_callback_comment_dispatcher): Add a first parameter 'catr'.
* gettext-tools/src/read-catalog-abstract.c (callback_arg): Remove variable.
(parse_start, parse_end): Remove functions.
(catalog_reader_parse): Inline them here.
(po_callback_domain, po_callback_message, po_callback_comment,
po_callback_comment_dot, po_callback_comment_filepos,
po_callback_comment_special, po_parse_comment_filepos,
po_parse_comment_solaris_filepos, po_callback_comment_dispatcher): Add a first
parameter 'catr'.
* gettext-tools/src/po-gram.h: Include read-catalog-abstract.h.
(struct po_parser_state): Add field 'catr'.
* gettext-tools/src/read-po.c (po_parse): Initialize the 'catr' field.
* gettext-tools/src/po-gram-gen.y: Pass ps->catr to po_callback_message,
po_callback_comment_dispatcher, po_callback_domain.
* gettext-tools/src/read-properties.c (properties_parse): Pass catr to
po_callback_comment_dispatcher, po_callback_message.
* gettext-tools/src/read-stringtable.c (special_comment_finish,
comment_line_end, phase4_getc, read_string): Add a first parameter 'catr'.
(stringtable_parse): Pass catr to the functions that need it.

12 months agoRefactor.
Bruno Haible [Sun, 28 Jul 2024 12:29:22 +0000 (14:29 +0200)] 
Refactor.

Rename the parameter of type 'abstract_catalog_reader_ty *' to catr.
Rename the parameter of type 'default_catalog_reader_ty *' to dcatr.
Rename the parameter of type 'msgfmt_catalog_reader_ty *' to mcatr.

* gettext-tools/src/read-catalog-abstract.h (abstract_catalog_reader_class_ty):
Change first parameter name of all methods.
(struct catalog_input_format): Likewise.
(catalog_reader_parse, catalog_reader_free): Change first parameter name.
* gettext-tools/src/read-catalog-abstract.c (catalog_reader_alloc): Rename local
variable 'pop'.
(catalog_reader_free, call_parse_brief, call_parse_debrief,
call_directive_domain, call_directive_message, call_comment, call_comment_dot,
call_comment_filepos, call_comment_special, parse_start, parse_end,
catalog_reader_parse): Change first parameter name.
* gettext-tools/src/read-catalog.h (default_constructor, default_destructor,
default_parse_brief, default_parse_debrief, default_directive_domain,
default_directive_message, default_comment, default_comment_dot,
default_comment_filepos, default_comment_special, default_set_domain,
 default_add_message): Change first parameter name.
* gettext-tools/src/read-catalog.c (call_set_domain, call_add_message,
call_frob_new_message, default_constructor, default_destructor,
default_parse_brief, default_parse_debrief, default_copy_comment_state,
default_reset_comment_state, default_directive_domain,
default_directive_message, default_comment, default_comment_dot,
default_comment_filepos, default_comment_special, default_set_domain,
default_add_message): Change first parameter name.
* gettext-tools/src/msgfmt.c (msgfmt_constructor, msgfmt_parse_debrief,
msgfmt_set_domain, msgfmt_add_message, msgfmt_frob_new_message,
msgfmt_comment_special): Change first parameter name.
(read_catalog_file_msgfmt): Rename local variable 'pop'.
* gettext-tools/src/x-po.c (extract): Rename local variable 'pop'.
* gettext-tools/src/xgettext.c (exclude_directive_domain,
exclude_directive_message): Change first parameter name.
* gettext-tools/src/read-po.c (po_parse): Change first parameter name.
* gettext-tools/src/read-properties.c (properties_parse): Likewise.
* gettext-tools/src/read-stringtable.c (stringtable_parse): Likewise.

12 months agoRefactor.
Bruno Haible [Sun, 28 Jul 2024 11:42:43 +0000 (13:42 +0200)] 
Refactor.

* gettext-tools/src/read-catalog-abstract.h: Improve comments.
* gettext-tools/src/read-catalog-abstract.c: Likewise.
* gettext-tools/src/read-catalog.h: Likewise.
* gettext-tools/src/read-catalog.c: Likewise.

12 months agoRefactor.
Bruno Haible [Sun, 28 Jul 2024 11:24:29 +0000 (13:24 +0200)] 
Refactor.

* gettext-tools/src/read-catalog-abstract.h
(abstract_catalog_reader_class_ty::comment_filepos): Change parameter names.
(po_callback_comment_filepos): Likewise.
* gettext-tools/src/read-catalog-abstract.c (call_comment_filepos,
po_callback_comment_filepos): Likewise.
* gettext-tools/src/read-catalog.h (default_comment_filepos): Likewise.
* gettext-tools/src/read-catalog.c (default_comment_filepos): Likewise.

12 months agoRefactor.
Bruno Haible [Sun, 28 Jul 2024 07:41:17 +0000 (09:41 +0200)] 
Refactor.

* gettext-tools/src/message.h (message_comment_filepos): Change parameter names.
* gettext-tools/src/message.c (message_comment_filepos): Likewise.

12 months agopo-mode: Avoid a compiler warning in Emacs 28.
Bruno Haible [Sat, 27 Jul 2024 20:13:02 +0000 (22:13 +0200)] 
po-mode: Avoid a compiler warning in Emacs 28.

Reported by Vincent Lefèvre <vincent@vinc17.net> via Santiago Vila
at <https://lists.gnu.org/archive/html/bug-gettext/2024-06/msg00031.html>.

* gettext-tools/emacs/po-mode.el (po-mode-version-string): Bump version.
(po-mode): Use write-contents-functions instead of write-contents-hooks.

12 months agoxgettext: PO: Fix error when a --exclude-file option is present (regression 2023...
Bruno Haible [Sat, 27 Jul 2024 19:05:27 +0000 (21:05 +0200)] 
xgettext: PO: Fix error when a --exclude-file option is present (regression 2023-03-10).

Reported by Nicolas Peugnet <n.peugnet@free.fr> via Santiago Vila
at <https://lists.gnu.org/archive/html/bug-gettext/2024-07/msg00030.html>.

* gettext-tools/src/x-po.c (extract_add_message): If the message is the header
entry and is among the messages to exclude, save the header charset from it
before discarding it.
* gettext-tools/tests/xgettext-po-5: New file, based on
gettext-tools/tests/xgettext-po-3.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

12 months agoxgettext: Vala: Improve the support of the method .printf().
Bruno Haible [Sat, 27 Jul 2024 17:12:51 +0000 (19:12 +0200)] 
xgettext: Vala: Improve the support of the method .printf().

* gettext-tools/src/x-vala.c (enum token_type_ty): New enum item
token_type_compound_assign.
(phase3_get): Recognize the compound assignment operators as
token_type_compound_assign instead of token_type_assign.
(extract_balanced): Invoke new_sub_region instead of inheriting_region. Invoke
set_format_flag_on_region instead of iterating through the region. When
encountering an operator, close the inner_region and open a new inner_region.
After 'return', use the passthrough_context_list_iterator, not the
null_context_list_iterator.
* gettext-tools/tests/xgettext-vala-6: Add many more test cases.

12 months agoxgettext: Vala: Recognize the '~' operator.
Bruno Haible [Sat, 27 Jul 2024 17:00:30 +0000 (19:00 +0200)] 
xgettext: Vala: Recognize the '~' operator.

* gettext-tools/src/x-vala.c (phase3_get): Recognize '~' as operator.

12 months agoxgettext: Vala: Fix recognition of the '%' and '^' operators.
Bruno Haible [Sat, 27 Jul 2024 16:59:05 +0000 (18:59 +0200)] 
xgettext: Vala: Fix recognition of the '%' and '^' operators.

* gettext-tools/src/x-vala.c (phase3_get): Classify '%' and '^' as arithmetic
operators, not as logic operators.

12 months agoxgettext: Vala: Recognize the operators '*' and '*='.
Bruno Haible [Sat, 27 Jul 2024 16:47:22 +0000 (18:47 +0200)] 
xgettext: Vala: Recognize the operators '*' and '*='.

* gettext-tools/src/x-vala.c (phase3_get): Recognize '*' and '*='.

12 months agoxgettext: Java: Improve the support of the method .formatted().
Bruno Haible [Sat, 27 Jul 2024 14:32:16 +0000 (16:32 +0200)] 
xgettext: Java: Improve the support of the method .formatted().

* gettext-tools/src/x-java.c (enum token_type_ty): New enum items
token_type_conditional, token_type_colon, token_type_assign,
token_type_operator.
(phase5_get): Recognize all kinds of operators that may occur in expressions.
(extract_parenthesized): Invoke new_sub_region instead of inheriting_region.
Handle 'return' keyword specially. Invoke set_format_flag_on_region instead of
iterating through the region. When encountering an operator, close the
inner_region and open a new inner_region.
* gettext-tools/tests/xgettext-java-8: Add many more test cases.

12 months agoxgettext: Improve support for string formatting through methods.
Bruno Haible [Sat, 27 Jul 2024 14:25:27 +0000 (16:25 +0200)] 
xgettext: Improve support for string formatting through methods.

* gettext-tools/src/xg-arglist-context.h: Add comments.
(struct formatstring_region_ty): Add 'pass_format' field.
(struct flag_region_ty): Add subregion, nsubregions, nsubregions_max,
inherit_from_parent_region fields.
(new_sub_region): New declaration.
(set_format_flag_on_region): New declaration.
* gettext-tools/src/xg-arglist-context.c: Include xg-message.h.
(the_null_context_region): Update initializer.
(inheriting_region): Initialize the new fields.
(new_sub_region): New function.
(unref_region): Unreference also the subregions.
(set_format_flag_on_region): New function.
* gettext-tools/src/xg-message.h (set_format_flag_from_context): Fix typo in
comment.

12 months agoFix a clang warning.
Bruno Haible [Sat, 27 Jul 2024 11:38:07 +0000 (13:38 +0200)] 
Fix a clang warning.

* gettext-tools/src/write-mo.c (useful_instantiation_rules): Make static.

12 months agoUpdate README-alpha.
Bruno Haible [Sat, 27 Jul 2024 10:49:27 +0000 (12:49 +0200)] 
Update README-alpha.

* README-alpha: Don't talk about CVS any more.

12 months agoRevisit the locating-rule code.
Bruno Haible [Thu, 25 Jul 2024 11:57:56 +0000 (13:57 +0200)] 
Revisit the locating-rule code.

* gettext-tools/src/search-path.c: Reorder definitions. Add comments.
(get_search_path): Use XNMALLOC instead of XCALLOC. Verify the memory
allocation.
* gettext-tools/src/locating-rule.h: Add comments.
(locating_rule_list_locate): Add const to first argument.
* gettext-tools/src/locating-rule.c: Add comments.
(locating_rule_list_locate): Add const to first argument.
* gettext-tools/src/FILES: Update.
* gettext-tools/doc/gettext.texi (Preparing ITS Rules): Fix a typo.

12 months agobuild: Make VPATH and non-VPATH builds behave the same.
Bruno Haible [Wed, 24 Jul 2024 23:55:39 +0000 (01:55 +0200)] 
build: Make VPATH and non-VPATH builds behave the same.

* gettext-tools/src/Makefile.am (AM_CPPFLAGS): Add -I option for libgrep
directory in the build dir.

12 months agoUpdate to the newest gnulib.
Bruno Haible [Wed, 24 Jul 2024 23:52:24 +0000 (01:52 +0200)] 
Update to the newest gnulib.

12 months agoUpdate after gnulib changed.
Bruno Haible [Mon, 22 Jul 2024 12:03:25 +0000 (14:03 +0200)] 
Update after gnulib changed.

12 months agoUpdate to the newest gnulib.
Bruno Haible [Mon, 22 Jul 2024 11:45:40 +0000 (13:45 +0200)] 
Update to the newest gnulib.

12 months agobuild: Support "make dist" without prior "make".
Bruno Haible [Mon, 22 Jul 2024 11:25:14 +0000 (13:25 +0200)] 
build: Support "make dist" without prior "make".

This is required by the GNU Coding Standards
<https://www.gnu.org/prep/standards/html_node/Standard-Targets.html>.

Reported by <nroycea+gnu@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-07/msg00010.html>.

* Makefile.am (distdir1): New target.
* configure.ac: Apply FIX_MAKEFILE_DISTRIB on Makefile.
* gettext-runtime/Makefile.am (distdir1, gen-man1): New targets.
* gettext-runtime/configure.ac: Apply FIX_MAKEFILE_DISTRIB on Makefile.
* gettext-tools/Makefile.am (programs-for-distdir, distdir1, gen-man1,
distdir2): New targets.
* gettext-tools/configure.ac: Apply FIX_MAKEFILE_DISTRIB on Makefile.
* gettext-tools/src/Makefile.am (built-sources): New target.

12 months agobuild: Simplify.
Bruno Haible [Mon, 22 Jul 2024 10:43:16 +0000 (12:43 +0200)] 
build: Simplify.

* gettext-runtime/configure.ac: Remove FIX_MAKEFILE_DISTRIB invocation,
no longer needed since 2014-04-25.
* gettext-tools/configure.ac: Likewise.

12 months agodoc: Small updates.
Bruno Haible [Sun, 21 Jul 2024 16:24:48 +0000 (18:24 +0200)] 
doc: Small updates.

* DEPENDENCIES: Document --with-libncurses-prefix instead of
--with-ncurses-prefix, since that is what the option would be if
AC_LIB_LINKFLAGS_BODY([ncurses]) was actually in use.
* HACKING: Stop suggesting Java 7 implementations, since Java 7 support has
ended. Suggest to create 3 more locales, needed to avoid SKIPs of gnulib tests.

12 months agoxgettext: Fix some test failures on MSVC.
Bruno Haible [Sun, 21 Jul 2024 13:48:36 +0000 (15:48 +0200)] 
xgettext: Fix some test failures on MSVC.

* gettext-tools/src/locating-rule.c: Include <dirent.h> always.
(HAVE_DIR): Remove macro.
(locating_rule_list_add_from_directory): Don't test HAVE_DIR.
* gettext-tools/src/msginit.c: Include <dirent.h> always.
(HAVE_DIR): Remove macro.
(find_pot): Don't test HAVE_DIR.

12 months agolang-tcl: Avoid FAIL on native Windows.
Bruno Haible [Sun, 21 Jul 2024 10:53:46 +0000 (12:53 +0200)] 
lang-tcl: Avoid FAIL on native Windows.

* gettext-tools/tests/lang-tcl: Set the LANG variable as expected by tclsh.

12 months agoDeclare expected test failures on native Windows.
Bruno Haible [Fri, 19 Jul 2024 03:37:47 +0000 (05:37 +0200)] 
Declare expected test failures on native Windows.

* autogen.sh (GNULIB_MODULES_TOOLS_TESTS): Add test-xfail.
* gettext-tools/tests/Makefile.am (XFAIL_TESTS): New variable.

12 months agolang-perl-*: Avoid FAIL on NetBSD.
Bruno Haible [Fri, 19 Jul 2024 03:33:09 +0000 (05:33 +0200)] 
lang-perl-*: Avoid FAIL on NetBSD.

* gettext-tools/tests/lang-perl-1: On NetBSD, don't test the ISO-8859-1 locale.
* gettext-tools/tests/lang-perl-2: Likewise.

12 months agolang-clisp: Avoid FAIL on NetBSD.
Bruno Haible [Fri, 19 Jul 2024 03:28:23 +0000 (05:28 +0200)] 
lang-clisp: Avoid FAIL on NetBSD.

* gettext-tools/tests/lang-clisp: Unset CLISP_LANGUAGE, LANGUAGE instead of
setting them to empty.

12 months agolang-librep: Avoid FAIL on FreeBSD, NetBSD.
Bruno Haible [Fri, 19 Jul 2024 02:08:16 +0000 (04:08 +0200)] 
lang-librep: Avoid FAIL on FreeBSD, NetBSD.

* gettext-tools/tests/lang-librep: On FreeBSD and NetBSD, don't test the
ISO-8859-1 locale.

12 months agolang-guile: Avoid FAIL on Alpine Linux, macOS, NetBSD.
Bruno Haible [Fri, 19 Jul 2024 01:25:00 +0000 (03:25 +0200)] 
lang-guile: Avoid FAIL on Alpine Linux, macOS, NetBSD.

* gettext-tools/tests/lang-guile: Mark the test as skipped when it does not
produce the translations.

12 months agolang-tcl: Avoid FAIL on native Windows.
Bruno Haible [Fri, 19 Jul 2024 00:02:36 +0000 (02:02 +0200)] 
lang-tcl: Avoid FAIL on native Windows.

* gettext-tools/tests/lang-tcl: Unset LC_ALL, LC_MESSAGES, LC_CTYPE instead of
setting them to empty.

12 months agojava: Create reproducible .jar files if the 'jar' utility supports it.
Bruno Haible [Tue, 16 Jul 2024 21:59:05 +0000 (23:59 +0200)] 
java: Create reproducible .jar files if the 'jar' utility supports it.

Suggested by Bernhard M. Wiedemann <bwiedemann@suse.de> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-07/msg00020.html>.

* build-aux/jar-cf: New file.
* Makefile.am (EXTRA_DIST): Add it.
* gettext-runtime/intl-java/Makefile.am (libintl.jar): Use jar-cf.
* gettext-tools/src/Makefile.am (gettext.jar): Likewise.

12 months agoautopoint-3: Don't require GNU make.
Bruno Haible [Tue, 16 Jul 2024 19:30:07 +0000 (21:30 +0200)] 
autopoint-3: Don't require GNU make.

* gettext-tools/tests/autopoint-3: Don't invoke "$MAKE --version". Instead,
just assume that $MAKE works.

12 months agolang-pascal: Modernize.
Bruno Haible [Tue, 16 Jul 2024 13:30:20 +0000 (15:30 +0200)] 
lang-pascal: Modernize.

* gettext-tools/tests/lang-pascal: Try fpc before ppc386 and ppcx64.

12 months agolang-python-*: Avoid SKIP on macOS.
Bruno Haible [Tue, 16 Jul 2024 12:59:00 +0000 (14:59 +0200)] 
lang-python-*: Avoid SKIP on macOS.

* gettext-tools/tests/lang-python-1: Search for 'python3' and 'python'.
* gettext-tools/tests/lang-python-2: Likewise.

12 months agolang-bash: Fix handling of macOS bash.
Bruno Haible [Tue, 16 Jul 2024 12:52:29 +0000 (14:52 +0200)] 
lang-bash: Fix handling of macOS bash.

* gettext-tools/tests/lang-bash: Don't test whether bash is localized. Instead,
on macOS, test only in the UTF-8 locale.

12 months agoFind the Objective-C compiler out-of-the-box on AlmaLinux 9 systems.
Bruno Haible [Tue, 16 Jul 2024 03:24:27 +0000 (05:24 +0200)] 
Find the Objective-C compiler out-of-the-box on AlmaLinux 9 systems.

* gettext-tools/configure.ac: Invoke AC_PROG_OBJC with a customized search list.
* gettext-tools/tests/init-env.in (OBJC, OBJCFLAGS): Set to the configure-
determined values.
* gettext-tools/tests/lang-objc: Use OBJC instead of CC, and OBJCFLAGS instead
of CFLAGS.
* gettext-tools/examples/hello-objc/configure.ac: Invoke AC_PROG_OBJC with a
customized search list. Don't invoke AC_PROC_CC.

12 months agobuild: Fix "make dist" after switching to automake 1.17.
Bruno Haible [Mon, 15 Jul 2024 23:01:07 +0000 (01:01 +0200)] 
build: Fix "make dist" after switching to automake 1.17.

* m4/fixautomake.m4 (FIX_MAKEFILE_TOPDIR_DISTRIB): Also recognize the distdir
rule generated by automake 1.17.

13 months agobuild: Switch to autoconf 2.72, automake 1.17.
Bruno Haible [Fri, 12 Jul 2024 15:11:27 +0000 (17:11 +0200)] 
build: Switch to autoconf 2.72, automake 1.17.

* autogen.sh: Update comments.

13 months agomsgfmt: Revisit Tcl string handling.
Bruno Haible [Mon, 1 Jul 2024 22:27:58 +0000 (00:27 +0200)] 
msgfmt: Revisit Tcl string handling.

* gettext-tools/src/write-tcl.c (write_tcl_string): Improve comment.

13 months agomsgunfmt: Fix msgunfmt-tcl-1 failure with tcl version 9.0 beta2.
Bruno Haible [Mon, 1 Jul 2024 11:26:43 +0000 (13:26 +0200)] 
msgunfmt: Fix msgunfmt-tcl-1 failure with tcl version 9.0 beta2.

Reported by Jeffrey Cliff <jeffrey.cliff@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-07/msg00000.html>.

* gettext-tools/src/msgunfmt.tcl: Access the ::msgcat::header variable through
an absolute name syntax, not a relative name syntax.

Rationale: <https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9>
says:
  "In Tcl 8 variable names that are not absolute are resolved by looking
   first in the current namespace, and then in the global namespace.
   In Tcl 9 such variables are always interpreted as relative to the current
   namespace."

14 months agoModernize Java compiler invocations.
Bruno Haible [Mon, 10 Jun 2024 18:59:55 +0000 (20:59 +0200)] 
Modernize Java compiler invocations.

The currently used Java version in the industry is Java 8 or newer, since 2022.
See <https://en.wikipedia.org/wiki/Java_version_history>. And on macOS 11..13,
I'm seeing the "error: Source option 6 is no longer supported. Use 8 or later."

* gettext-runtime/configure.ac: Search for a Java compiler with source and
target 1.8.
* gettext-tools/configure.ac: Search for a Java compiler with source 1.8.
* gettext-tools/examples/hello-java/configure.ac: Likewise.
* gettext-tools/examples/hello-java-awt/configure.ac: Likewise.
* gettext-tools/examples/hello-java-swing/configure.ac: Likewise.

14 months agoFix undefined behaviour according to ISO C 23 § 6.5.6.(9).
Bruno Haible [Mon, 10 Jun 2024 15:39:28 +0000 (17:39 +0200)] 
Fix undefined behaviour according to ISO C 23 § 6.5.6.(9).

Found by clang's undefined-behaviour sanitizer.

* gettext-tools/src/msgl-fsearch.c (mult_index_list_accumulate): If len1 == 0,
skip two loops.

14 months agoUpdate DEPENDENCIES.
Bruno Haible [Wed, 5 Jun 2024 09:13:27 +0000 (11:13 +0200)] 
Update DEPENDENCIES.

* DEPENDENCIES: libiconv is needed again on macOS 14. Mention win-iconv as an
alternative.

15 months agoUpdate after gnulib changed.
Bruno Haible [Tue, 30 Apr 2024 13:11:42 +0000 (15:11 +0200)] 
Update after gnulib changed.

* gnulib-local/lib/exitfail.h.diff: Update.

15 months agoUpdate to the newest gnulib.
Bruno Haible [Tue, 30 Apr 2024 13:11:17 +0000 (15:11 +0200)] 
Update to the newest gnulib.

16 months agoFix -Wdiscarded-qualifiers warnings caused by a newer libxml2.
Bruno Haible [Mon, 8 Apr 2024 15:04:45 +0000 (17:04 +0200)] 
Fix -Wdiscarded-qualifiers warnings caused by a newer libxml2.

Reported by Manish Tiwari <matiwari@redhat.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-04/msg00001.html>.

* gettext-tools/src/format-kde-kuit.c (format_parse): Declare the local variable
err as 'const xmlError *'.
* gettext-tools/src/its.c (its_rule_list_add_from_file,
its_rule_list_add_from_string, its_rule_list_extract, its_merge_context_alloc):
Likewise.
* gettext-tools/src/locating-rule.c (locating_rule_match): Likewise.

16 months agoFix macro file 'serial' numbers for 'aclocal --install'.
Bruno Haible [Thu, 4 Apr 2024 14:15:29 +0000 (16:15 +0200)] 
Fix macro file 'serial' numbers for 'aclocal --install'.

* gettext-runtime/m4/gettext.m4: Make 'serial' effective.
* gettext-runtime/m4/glibc2.m4: Likewise.
* gettext-runtime/m4/nls.m4: Likewise.
* gettext-runtime/m4/po.m4: Likewise.
* gettext-runtime/m4/progtest.m4: Likewise.
* gettext-tools/m4/exported.m4: Likewise.
* gettext-tools/m4/hostname.m4: Likewise.
* gettext-tools/m4/locale-de.m4: Likewise.
* libtextstyle/gnulib-local/m4/libcroco.m4: Likewise.
* libtextstyle/gnulib-local/m4/libglib.m4: Likewise.
* libtextstyle/gnulib-local/m4/moo.m4: Likewise.
* libtextstyle/gnulib-local/m4/term-ostream.m4: Likewise.
* libtextstyle/m4/init-package-version.m4: Likewise.
* m4/fixautomake.m4: Likewise.
* m4/more-warnings.m4: Likewise.
* m4/woe32-dll.m4: Likewise.
* gnulib-local/m4/java.m4: Likewise.
* gnulib-local/m4/libxml.m4: Likewise.
* gnulib-local/m4/backupfile.m4: Likewise. Make sure to override the gnulib
version.

17 months agolocale-*.m4: Update comments.
Bruno Haible [Tue, 5 Mar 2024 11:59:07 +0000 (12:59 +0100)] 
locale-*.m4: Update comments.

* gettext-tools/m4/locale-de.m4: Update comments for Solaris 10.

17 months agobuild: Fix "make distcheck" failure.
Bruno Haible [Fri, 1 Mar 2024 23:18:31 +0000 (00:18 +0100)] 
build: Fix "make distcheck" failure.

* Makefile.am (distcheck-hook): Remove comparison with
gettext-tools/gnulib-m4/po.m4, since that file no longer exists.

17 months agolibtextstyle: Avoid crashing the terminal emulator when using ncurses.
Bruno Haible [Wed, 28 Feb 2024 22:15:35 +0000 (23:15 +0100)] 
libtextstyle: Avoid crashing the terminal emulator when using ncurses.

Reported by Adriaan de Groot <adridg@freebsd.org> in
<https://lists.gnu.org/archive/html/bug-gettext/2021-12/msg00023.html>.
Long explanation: <https://euroquis.nl/freebsd/2021/11/24/bison.html>

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (out_data_string,
out_data_string_unchecked): New functions.
(out_hyperlink_change): Don't use tputs on strings that are not escape
sequences.

17 months agobuild: Tweak ChangeLog generation.
Bruno Haible [Sat, 24 Feb 2024 11:17:01 +0000 (12:17 +0100)] 
build: Tweak ChangeLog generation.

* Makefile.am (gen-ChangeLogs): Untabify rule. Pass option '--no-cluster'.

17 months agoUpdate after gnulib changed.
Bruno Haible [Mon, 26 Feb 2024 19:32:30 +0000 (20:32 +0100)] 
Update after gnulib changed.

17 months agobuild: Improve handling of divergences between gnulib and gettext.
Bruno Haible [Mon, 26 Feb 2024 19:26:13 +0000 (20:26 +0100)] 
build: Improve handling of divergences between gnulib and gettext.

* autogen.sh: Detect divergence also of gettext.m4, nls.m4, progtest.m4.
When there is a divergence without a serial number bump, assume it's a copyright
year update and copy the file from gnulib to gettext.

17 months agoMerge from 0.22.x branch: Prepare for 0.22.5 release.
Bruno Haible [Thu, 22 Feb 2024 01:31:47 +0000 (02:31 +0100)] 
Merge from 0.22.x branch: Prepare for 0.22.5 release.

* gettext-runtime/intl/libgnuintl.in.h (LIBINTL_VERSION): Bump.
* gettext-tools/libgettextpo/gettext-po.in.h (LIBGETTEXTPO_VERSION): Bump.
* libtextstyle/version.sh: Update VERSION_NUMBER, RELEASE_DATE.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.22.5.
* gettext-tools/misc/autopoint.in: Allow version 0.22.5.

17 months agoUpdate after gnulib changed.
Bruno Haible [Thu, 22 Feb 2024 01:29:52 +0000 (02:29 +0100)] 
Update after gnulib changed.

* gettext-runtime/intl/configure.ac: Update list of symbols to rename,
from modules 'localename-unsafe', 'localename', and 'setlocale-null-unlocked'.

17 months agoUpdate to the newest gnulib.
Bruno Haible [Thu, 22 Feb 2024 01:25:46 +0000 (02:25 +0100)] 
Update to the newest gnulib.

17 months agoMerge from 0.22.x branch: Update NEWS file for release 0.22.5.
Bruno Haible [Thu, 22 Feb 2024 01:24:13 +0000 (02:24 +0100)] 
Merge from 0.22.x branch: Update NEWS file for release 0.22.5.

17 months agoRemove support for OS/2 (based on EMX directly), part 2.
Bruno Haible [Fri, 23 Feb 2024 02:08:46 +0000 (03:08 +0100)] 
Remove support for OS/2 (based on EMX directly), part 2.

* Makefile.am (EXTRA_DIST): Remove os2/*.

17 months agoRemove support for OS/2 (based on EMX directly).
Bruno Haible [Mon, 19 Feb 2024 22:25:12 +0000 (23:25 +0100)] 
Remove support for OS/2 (based on EMX directly).

Nowadays, KO Myung-Hun <komh78@gmail.com> uses an approach based on kLIBC
instead of emx+gcc. This kLIBC (https://github.com/bitwiseworks/libc) contains
iconv already.

* os2: Remove directory.

17 months agoWrite #include <error.h>, not #include "error.h".
Bruno Haible [Mon, 19 Feb 2024 22:58:27 +0000 (23:58 +0100)] 
Write #include <error.h>, not #include "error.h".

This is required by Gnulib, although <error.h> is not a POSIX or ISO C
standardized header file.

Reported by Collin Funk <collin.funk1@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-02/msg00011.html>.

* gettext-runtime/src/envsubst.c: Use #include <error.h> instead of
* gettext-runtime/src/gettext.c: Likewise.
* gettext-runtime/src/ngettext.c: Likewise.
* gettext-tools/libgettextpo/gettext-po.c: Likewise.
* gettext-tools/libgrep/m-fgrep.c: Likewise.
* gettext-tools/libgrep/m-regex.c: Likewise.
* gettext-tools/src/file-list.c: Likewise.
* gettext-tools/src/format-scheme.c: Likewise.
* gettext-tools/src/format.h: Likewise.
* gettext-tools/src/hostname.c: Likewise.
* gettext-tools/src/if-error.c: Likewise.
* gettext-tools/src/msgattrib.c: Likewise.
* gettext-tools/src/msgcat.c: Likewise.
* gettext-tools/src/msgcmp.c: Likewise.
* gettext-tools/src/msgcomm.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgexec.c: Likewise.
* gettext-tools/src/msgfilter.c: Likewise.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msggrep.c: Likewise.
* gettext-tools/src/msginit.c: Likewise.
* gettext-tools/src/msgl-cat.c: Likewise.
* gettext-tools/src/msgl-charset.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgunfmt.c: Likewise.
* gettext-tools/src/msguniq.c: Likewise.
* gettext-tools/src/po-error.c: Likewise.
* gettext-tools/src/po-gram-gen.y: Likewise.
* gettext-tools/src/po-lex.c: Likewise.
* gettext-tools/src/po-lex.h: Likewise.
* gettext-tools/src/po-xerror.c: Likewise.
* gettext-tools/src/read-catalog-abstract.c: Likewise.
* gettext-tools/src/read-csharp.c: Likewise.
* gettext-tools/src/read-desktop.c: Likewise.
* gettext-tools/src/read-java.c: Likewise.
* gettext-tools/src/read-mo.c: Likewise.
* gettext-tools/src/read-properties.c: Likewise.
* gettext-tools/src/read-resources.c: Likewise.
* gettext-tools/src/read-stringtable.c: Likewise.
* gettext-tools/src/read-tcl.c: Likewise.
* gettext-tools/src/recode-sr-latin.c: Likewise.
* gettext-tools/src/urlget.c: Likewise.
* gettext-tools/src/write-csharp.c: Likewise.
* gettext-tools/src/write-desktop.c: Likewise.
* gettext-tools/src/write-java.c: Likewise.
* gettext-tools/src/write-mo.c: Likewise.
* gettext-tools/src/write-properties.c: Likewise.
* gettext-tools/src/write-qt.c: Likewise.
* gettext-tools/src/write-resources.c: Likewise.
* gettext-tools/src/write-tcl.c: Likewise.
* gettext-tools/src/write-xml.c: Likewise.
* gettext-tools/src/x-awk.c: Likewise.
* gettext-tools/src/x-c.c: Likewise.
* gettext-tools/src/x-csharp.c: Likewise.
* gettext-tools/src/x-desktop.c: Likewise.
* gettext-tools/src/x-elisp.c: Likewise.
* gettext-tools/src/x-java.c: Likewise.
* gettext-tools/src/x-javascript.c: Likewise.
* gettext-tools/src/x-librep.c: Likewise.
* gettext-tools/src/x-lisp.c: Likewise.
* gettext-tools/src/x-lua.c: Likewise.
* gettext-tools/src/x-perl.c: Likewise.
* gettext-tools/src/x-php.c: Likewise.
* gettext-tools/src/x-python.c: Likewise.
* gettext-tools/src/x-rst.c: Likewise.
* gettext-tools/src/x-ruby.c: Likewise.
* gettext-tools/src/x-scheme.c: Likewise.
* gettext-tools/src/x-sh.c: Likewise.
* gettext-tools/src/x-smalltalk.c: Likewise.
* gettext-tools/src/x-tcl.c: Likewise.
* gettext-tools/src/x-vala.c: Likewise.
* gettext-tools/src/x-ycp.c: Likewise.
* gettext-tools/src/xg-mixed-string.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.
* gettext-tools/tests/tstgettext.c: Likewise.
* gettext-tools/tests/tstngettext.c: Likewise.
* gnulib-local/lib/closeout.c: Likewise.
* gnulib-local/lib/xerror.c: Likewise.
* libtextstyle/gnulib-local/lib/fd-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/html-styled-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/iconv-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/memory-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/term-ostream.oo.c: Likewise.
* gettext-tools/src/its.c: Likewise, and reorganize #includes.
* gettext-tools/src/locating-rule.c: Likewise.

17 months agolibtextstyle: Use #include <...> style for system headers.
Bruno Haible [Mon, 19 Feb 2024 22:08:30 +0000 (23:08 +0100)] 
libtextstyle: Use #include <...> style for system headers.

* libtextstyle/gnulib-local/lib/libcroco/cr-additional-sel.c: Use #include <...>
style for system headers.
* libtextstyle/gnulib-local/lib/libcroco/cr-input.c: Likewise.
* libtextstyle/gnulib-local/lib/libcroco/cr-num.c: Likewise.
* libtextstyle/gnulib-local/lib/libcroco/cr-parser.c: Likewise.
* libtextstyle/gnulib-local/lib/libcroco/cr-stylesheet.c: Likewise.
* libtextstyle/gnulib-local/lib/libcroco/cr-tknzr.c: Likewise.

17 months agoDon't treat Apple's new Citrus/FreeBSD-based iconv like GNU libiconv.
Bruno Haible [Wed, 14 Feb 2024 23:00:56 +0000 (00:00 +0100)] 
Don't treat Apple's new Citrus/FreeBSD-based iconv like GNU libiconv.

* libtextstyle/gnulib-local/lib/iconv-ostream.oo.c (iconv_ostream::write_mem):
Don't treat the bastard Apple iconv like GNU libiconv.
* gettext-tools/src/po-charset.c (po_lex_charset_set): Likewise.

17 months agointl: Improve support of Citrus/FreeBSD iconv.
Bruno Haible [Wed, 14 Feb 2024 22:51:28 +0000 (23:51 +0100)] 
intl: Improve support of Citrus/FreeBSD iconv.

* gettext-runtime/intl/dcigettext.c (_nl_find_msg): Use //TRANSLIT with all
iconv implementations that support it.

18 months agolibtextstyle: Add a comment regarding COLORTERM.
Bruno Haible [Mon, 29 Jan 2024 18:19:11 +0000 (19:19 +0100)] 
libtextstyle: Add a comment regarding COLORTERM.

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Add
comment.

18 months agolibtextstyle: Update a few URLs.
Bruno Haible [Mon, 29 Jan 2024 10:05:57 +0000 (11:05 +0100)] 
libtextstyle: Update a few URLs.

* libtextstyle/doc/libtextstyle.texi (Terminal emulators): Update URL. From
Simon Sobisch.
(Style rules): Update URL.
(Hyperlinks): Reference new state-of-the-art document. From Simon Sobisch.

18 months agointl: Revert "Add special hack for GCC" from 2022-06-21.
Bruno Haible [Mon, 29 Jan 2024 09:32:34 +0000 (10:32 +0100)] 
intl: Revert "Add special hack for GCC" from 2022-06-21.

The added option --enable-host-shared has the same effect as the
libtool-provided option --with-pic, and gcc's Makefile.def actually
uses --with-pic, not --enable-host-shared.

* gettext-runtime/intl/configure.ac: Don't accept option --enable-host-shared.
Don't set PICFLAG.
* gettext-runtime/intl/Makefile.am (AM_CFLAGS): Remove the PICFLAG.
* gnulib-local/modules/gettext-runtime-intl-misc (Makefile.am): Remove the
PICFLAG from AM_CFLAGS.

19 months agointl: Fix the Windows MUI code, so that it works on Windows 10.
Bruno Haible [Mon, 8 Jan 2024 05:51:40 +0000 (06:51 +0100)] 
intl: Fix the Windows MUI code, so that it works on Windows 10.

Reported by <lrn1986@gmail.com> at <https://savannah.gnu.org/bugs/?65128>.

* gettext-runtime/intl/langprefs.c (_nl_language_preferences_win32_mui): Make
GetUserPreferredUILanguages prototype with Microsoft's current documentation.
Allow the first GetUserPreferredUILanguages call to succeed.

20 months agoxgettext: Java: Flag strings on which the method 'formatted' is used as java-printf...
Bruno Haible [Tue, 5 Dec 2023 15:07:38 +0000 (16:07 +0100)] 
xgettext: Java: Flag strings on which the method 'formatted' is used as java-printf-format.

* gettext-tools/src/x-java.c (token_type_semicolon): New enum item.
(phase5_get): Recognize semicolon tokens.
(extract_parenthesized): Handle method invocation .formatted. Return when a
semicolon was seen.
* gettext-tools/tests/xgettext-java-8: New file, based on
gettext-tools/tests/xgettext-vala-6.
* gettext-tools/tests/xgettext-java-9: New file, based on
gettext-tools/tests/xgettext-vala-7.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
* NEWS: Mention the change.