gettext
e543b20c - libgettextpo: Remove static variables gram_pos_column, gram_pot_role, signal_eilseq, po_lex_obsolete, po_lex_previous, mbf.

Commit
1 year ago
libgettextpo: Remove static variables gram_pos_column, gram_pot_role, signal_eilseq, po_lex_obsolete, po_lex_previous, mbf. * gettext-tools/src/po-gram.h: Include <stdbool.h>, <stdio.h>, unistr.h. (MBCHAR_BUF_SIZE, struct mbchar, mbchar_t, NPUSHBACK, struct mbfile, mbfile_t): Moved to here, from po-lex.c. (struct po_parser_state): Add fields gram_pot_role, gram_pos_column, signal_eilseq, mbf, po_lex_obsolete, po_lex_previous. * gettext-tools/src/po-gram-gen.y: Add %lex-param declaration. (do_callback_message): Add 'struct po_parser_state *ps' parameter. Update all callers. * gettext-tools/src/po-lex.h (gram_pos_column, gram_pot_role): Remove declarations. (lex_start): Add 'struct po_parser_state *ps' parameter. Remove is_pot_role parameter. (po_gram_lex): Add 'struct po_parser_state *ps' parameter. * gettext-tools/src/po-lex.c: Don't include unistr.h. (gram_pos_column, gram_pot_role, signal_eilseq, mbf, po_lex_obsolete, po_lex_previous): Remove variables. (po_gram_error): Update. (MBCHAR_BUF_SIZE, struct mbchar, mbchar_t, NPUSHBACK, struct mbfile, mbfile_t): Remove declarations. (mb_width): Add 'struct po_parser_state *ps' parameter. (mbfile_getc): Likewise. Pass it to po_gram_error. (lex_start): Add 'struct po_parser_state *ps' parameter. Remove is_pot_role parameter. (lex_end): Remove assignments to variables. (lex_getc, lex_ungetc, keyword_p, control_sequence, po_gram_lex): Add 'struct po_parser_state *ps' parameter. * gettext-tools/src/read-po.c (po_parse): Iniitialize gram_pot_role field here. Pass 'struct po_parser_state *' to lex_start. * gettext-tools/woe32dll/gettextsrc-exports.c: Remove gram_pos_column, gram_pot_role.
Author
Parents
Loading