Skip to content

[pull] master from sailfishos-mirror:master#23

Merged
pull[bot] merged 26 commits intosysfce2:masterfrom
sailfishos-mirror:master
Jul 29, 2024
Merged

[pull] master from sailfishos-mirror:master#23
pull[bot] merged 26 commits intosysfce2:masterfrom
sailfishos-mirror:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Jul 28, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

bhaible added 26 commits July 25, 2024 14:01
* 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.
* README-alpha: Don't talk about CVS any more.
* gettext-tools/src/write-mo.c (useful_instantiation_rules): Make static.
* 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.
* 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.
* gettext-tools/src/x-vala.c (phase3_get): Recognize '*' and '*='.
* gettext-tools/src/x-vala.c (phase3_get): Classify '%' and '^' as arithmetic
operators, not as logic operators.
* gettext-tools/src/x-vala.c (phase3_get): Recognize '~' as operator.
* 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.
…ession 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.
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.
* gettext-tools/src/message.h (message_comment_filepos): Change parameter names.
* gettext-tools/src/message.c (message_comment_filepos): Likewise.
* 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.
* 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.
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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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'.
* 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'.
…o_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.
* 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.
* 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.
@pull pull bot merged commit 2d45a28 into sysfce2:master Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant