]> git.ipfire.org Git - thirdparty/gettext.git/commit
Add an xerror_handler parameter to read_catalog_stream.
authorBruno Haible <bruno@clisp.org>
Sat, 3 Aug 2024 01:11:18 +0000 (03:11 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 4 Aug 2024 23:03:25 +0000 (01:03 +0200)
commit497b5fc0536ea53dd054b864cf2726dcac71e66b
treec97aa660e276ef023f8e5d832c36323053897cc8
parent579e12bff569924ed69e8758880e720199e652ea
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.
18 files changed:
gettext-tools/libgettextpo/gettext-po.c
gettext-tools/src/msgfmt.c
gettext-tools/src/read-catalog-abstract.c
gettext-tools/src/read-catalog-abstract.h
gettext-tools/src/read-catalog-file.c
gettext-tools/src/read-catalog.c
gettext-tools/src/read-catalog.h
gettext-tools/src/read-csharp.c
gettext-tools/src/read-java.c
gettext-tools/src/read-po-gram.y
gettext-tools/src/read-po-lex.c
gettext-tools/src/read-po-lex.h
gettext-tools/src/read-properties.c
gettext-tools/src/read-resources.c
gettext-tools/src/read-stringtable.c
gettext-tools/src/read-tcl.c
gettext-tools/src/x-po.c
gettext-tools/src/xgettext.c