From: Bruno Haible Date: Sun, 28 Jul 2024 15:30:53 +0000 (+0200) Subject: Refactor. X-Git-Tag: v0.23~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69a509724d179d6f36291271a6cb6c6f07072e7b;p=thirdparty%2Fgettext.git 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. --- diff --git a/gettext-tools/src/read-catalog-special.c b/gettext-tools/src/read-catalog-special.c index 2b049747e..dc61b0a3f 100644 --- a/gettext-tools/src/read-catalog-special.c +++ b/gettext-tools/src/read-catalog-special.c @@ -31,10 +31,10 @@ /* Parse a special comment and put the result in *fuzzyp, formatp, *rangep, *wrapp, scp. */ void -po_parse_comment_special (const char *s, - bool *fuzzyp, enum is_format formatp[NFORMATS], - struct argument_range *rangep, enum is_wrap *wrapp, - enum is_syntax_check scp[NSYNTAXCHECKS]) +parse_comment_special (const char *s, + bool *fuzzyp, enum is_format formatp[NFORMATS], + struct argument_range *rangep, enum is_wrap *wrapp, + enum is_syntax_check scp[NSYNTAXCHECKS]) { size_t i; diff --git a/gettext-tools/src/read-catalog-special.h b/gettext-tools/src/read-catalog-special.h index b0f0f4ef7..37778a597 100644 --- a/gettext-tools/src/read-catalog-special.h +++ b/gettext-tools/src/read-catalog-special.h @@ -31,11 +31,11 @@ extern "C" { /* Parse a special comment and put the result in *fuzzyp, formatp, *rangep, *wrapp, scp. */ -extern void po_parse_comment_special (const char *s, bool *fuzzyp, - enum is_format formatp[NFORMATS], - struct argument_range *rangep, - enum is_wrap *wrapp, - enum is_syntax_check scp[NSYNTAXCHECKS]); +extern void parse_comment_special (const char *s, bool *fuzzyp, + enum is_format formatp[NFORMATS], + struct argument_range *rangep, + enum is_wrap *wrapp, + enum is_syntax_check scp[NSYNTAXCHECKS]); #ifdef __cplusplus diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c index 4f291606b..d9db2d847 100644 --- a/gettext-tools/src/read-catalog.c +++ b/gettext-tools/src/read-catalog.c @@ -303,8 +303,8 @@ default_comment_special (abstract_catalog_reader_ty *catr, const char *s) { default_catalog_reader_ty *dcatr = (default_catalog_reader_ty *) catr; - po_parse_comment_special (s, &dcatr->is_fuzzy, dcatr->is_format, &dcatr->range, - &dcatr->do_wrap, dcatr->do_syntax_check); + parse_comment_special (s, &dcatr->is_fuzzy, dcatr->is_format, &dcatr->range, + &dcatr->do_wrap, dcatr->do_syntax_check); } diff --git a/gettext-tools/src/x-ruby.c b/gettext-tools/src/x-ruby.c index a8fc857a4..5f69a2e43 100644 --- a/gettext-tools/src/x-ruby.c +++ b/gettext-tools/src/x-ruby.c @@ -191,9 +191,9 @@ extract_ruby (const char *found_in_dir, const char *real_filename, t += strlen ("xgettext:"); - po_parse_comment_special (t, &tmp_fuzzy, tmp_format, - &tmp_range, &tmp_wrap, - tmp_syntax_check); + parse_comment_special (t, &tmp_fuzzy, tmp_format, + &tmp_range, &tmp_wrap, + tmp_syntax_check); interesting = false; for (i = 0; i < NFORMATS; i++) diff --git a/gettext-tools/src/xg-message.c b/gettext-tools/src/xg-message.c index b6c1ca6b4..53a92b00d 100644 --- a/gettext-tools/src/xg-message.c +++ b/gettext-tools/src/xg-message.c @@ -429,8 +429,8 @@ meta information, not the empty string.\n")); t += strlen ("xgettext:"); - po_parse_comment_special (t, &tmp_fuzzy, tmp_format, &tmp_range, - &tmp_wrap, tmp_syntax_check); + parse_comment_special (t, &tmp_fuzzy, tmp_format, &tmp_range, + &tmp_wrap, tmp_syntax_check); interesting = false; for (i = 0; i < NFORMATS; i++) diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index a8109ba0f..6208e3278 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -1452,7 +1452,7 @@ xgettext_record_flag (const char *optionstring) flag_start += 5; } - /* Unlike po_parse_comment_special(), we don't accept "fuzzy", + /* Unlike parse_comment_special(), we don't accept "fuzzy", "wrap", or "check" here - it has no sense. */ if (flag_end - flag_start >= 7 && memcmp (flag_end - 7, "-format", 7) == 0)