]> git.ipfire.org Git - thirdparty/gettext.git/commit
libgettextpo: Remove static variables po_lex_charset, po_lex_iconv, po_lex_isolate_...
authorBruno Haible <bruno@clisp.org>
Sun, 28 Jul 2024 19:32:56 +0000 (21:32 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 28 Jul 2024 20:03:15 +0000 (22:03 +0200)
commit0713ab45b379404f04541cb9c81aceb8328fd03a
tree0ad5097a85ac07e0bf329851fece7b5857250439
parentd714ee5539a16bcb0d6c8d3276692a27005b53d3
libgettextpo: Remove static variables po_lex_charset, po_lex_iconv, po_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/po-charset.c
gettext-tools/src/po-charset.h
gettext-tools/src/po-gram-gen.y
gettext-tools/src/po-gram.h
gettext-tools/src/po-lex.c
gettext-tools/src/po-lex.h
gettext-tools/src/read-catalog-abstract.c
gettext-tools/src/read-catalog-abstract.h
gettext-tools/src/read-po.c
gettext-tools/woe32dll/gettextsrc-exports.c