gettext
e1140f0c - xgettext: Simplify code that emits diagnostics.

Commit
1 year ago
xgettext: Simplify code that emits diagnostics. Also, for Perl input, clarify some diagnostics as errors vs. warnings. * gettext-tools/src/if-error.h: New file. * gettext-tools/src/if-error.c: New file. * gettext-tools/src/xg-mixed-string.c: Include if-error.h instead of error-progname.h. (mixed_string_buffer_append_lone_surrogate): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-awk.c: Include if-error.h instead of error-progname.h. (phase7_getc, x_awk_lex, extract_parenthesized): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-c.c: Include if-error.h instead of error-progname.h. (phase7_getc, phase5_get, extract_parenthesized): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-csharp.c: Include if-error.h instead of error-progname.h. (do_getc_unicode_escaped, accumulate_escaped, extract_parenthesized): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-elisp.c: Include if-error.h instead of error-progname.h. (do_getc_escaped, read_object): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-java.c: Include if-error.h instead of error-progname.h. (accumulate_escaped, phase5_get, extract_parenthesized): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-javascript.c: Include if-error.h instead of error-progname.h. (phase7_getuc, phase5_scan_regexp, phase5_scan_xml_markup, phase5_get, extract_balanced): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-librep.c: Include if-error.h instead of error-progname.h. (read_object): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-lisp.c: Include if-error.h instead of error-progname.h. (read_object): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-lua.c: Include if-error.h instead of error-progname.h. (extract_balanced): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-perl.c: Include if-error.h instead of error-progname.h. (get_here_document, extract_quotelike_pass3, interpolate_keywords, x_perl_lex, extract_balanced): Invoke 'if_error' instead of 'error'. (interpolate_keywords): Update extract_quotelike_pass3 invocations. (extract_balanced): Update collect_message invocations. Call fflush before abort (needed for MSVC). * gettext-tools/src/x-php.c: Include if-error.h instead of error-progname.h. (extract_balanced): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-python.c: Include if-error.h instead of error-progname.h. (phase7_getuc, extract_balanced): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-rst.c: Include if-error.h instead of error-progname.h. (extract_rst, extract_rsj): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-scheme.c: Include if-error.h instead of error-progname.h. (read_object): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-sh.c: Include if-error.h instead of error-progname.h. (read_word, read_command_list): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-tcl.c: Include if-error.h instead of error-progname.h. (accumulate_word, read_word): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-vala.c: Include if-error.h instead of error-progname.h. (phase7_getc, phase3_scan_regex, phase3_get, extract_balanced): Invoke 'if_error' instead of 'error'. * gettext-tools/src/x-ycp.c: Include if-error.h instead of error-progname.h. (extract_parenthesized): Invoke 'if_error' instead of 'error'. * gettext-tools/src/xg-arglist-parser.c: Include if-error.h instead of error.h, error-progname.h. (arglist_parser_done): Invoke 'if_error' instead of 'error_at_line'. * gettext-tools/src/xg-message.c: Include if-error.h instead of error-progname.h. (set_format_flags_from_context, warn_format_string, remember_a_message): Invoke 'if_error' instead of 'multiline_warning'. * gettext-tools/src/Makefile.am (noinst_HEADERS): Add if-error.h. (xgettext_SOURCES): Add if-error.c. * gettext-tools/src/FILES: Mention if-error.h, if-error.c. * gettext-tools/po/Makevars (XGETTEXT_OPTIONS): Add option regarding the 'if_error' function. * gettext-tools/po/POTFILES.in: Add src/if-error.c.
Author
Committer
Parents
Loading