]> git.ipfire.org Git - thirdparty/gettext.git/commit
libgettextpo: Remove static variable 'plural_counter'.
authorBruno Haible <bruno@clisp.org>
Sat, 11 Nov 2023 15:48:27 +0000 (16:48 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 11 Nov 2023 15:48:27 +0000 (16:48 +0100)
commit6179430a9db06535ff961675892f331a2b61878e
tree58ce89496abef090d37da7d25b7ed1fcce7a6610
parentacd05bcdcd01ea3f6ad9d9508bfb9da7843b4101
libgettextpo: Remove static variable 'plural_counter'.

* gettext-tools/src/po-gram.h (struct po_parser_state): New type.
(po_gram_parse): Add 'struct po_parser_state *ps' parameter.
* gettext-tools/src/po-gram-gen.y: Add %parse-param declaration.
Access ps->plural_counter instead of plural_counter.
(plural_counter): Remove variable.
* gettext-tools/src/po-lex.h (po_gram_error): Add 'struct po_parser_state *ps'
parameter.
* gettext-tools/src/po-lex.c: Include po-gram.h.
(po_gram_error): Add 'struct po_parser_state *ps' parameter.
(mbfile_getc, control_sequence): Update po_gram_error calls.
* gettext-tools/src/read-po.c (po_parse): Pass a 'struct po_parser_state *' to
po_gram_parse.
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-po.c