gettext
b49d82c6 - xgettext: In language Perl, avoid a crash when NUL is used as delimiter.

Commit
1 year ago
xgettext: In language Perl, avoid a crash when NUL is used as delimiter. * gettext-tools/src/str-desc.h: New file. * gettext-tools/src/str-desc.c: New file. * gettext-tools/src/FILES: Describe them. * gettext-tools/src/Makefile.am (noinst_HEADERS): Add str-desc.h. (libgettextsrc_la_SOURCES): Add str-desc.c. * gettext-tools/src/msgl-ascii.h: Include str-desc.h. (is_ascii_string_desc): New declaration. * gettext-tools/src/msgl-ascii.c (is_ascii_string_desc): New function. * gettext-tools/src/msgl-iconv.h: Include str-desc.h. (convert_string_desc_directly): New declaration. * gettext-tools/src/msgl-iconv.c: Include str-desc.h. (convert_string_desc_directly): New function. * gettext-tools/src/xg-encoding.h: Include str-desc.h. (string_desc_from_current_source_encoding): New declaration. * gettext-tools/src/xg-encoding.c (string_desc_from_current_source_encoding): New function. * gettext-tools/src/x-perl.c: Include str-desc.h, c-ctype.h. (extract_quotelike_pass1): Return a string_desc_ty instead of a 'char *'. (extract_quotelike_pass1_utf8): Likewise. (extract_quotelike, extract_triple_quotelike): Update. (interpolate_keywords): Take a string_desc_ty instead of a 'const char *' as argument. (x_perl_prelex): Update. * gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Add str-desc.c. * gettext-tools/tests/xgettext-perl-9: New file. * gettext-tools/tests/Makefile.am (TESTS): Add it.
Author
Committer
Parents
Loading