* gettext-tools/src/read-po.h (gram_max_allowed_errors): New declaration.
* gettext-tools/src/read-po-lex.h (gram_max_allowed_errors): Remove declaration.
* gettext-tools/src/read-po.c: Include <limits.h>.
(gram_max_allowed_errors): Moved to here. Change initial value to UINT_MAX.
* gettext-tools/src/read-po-lex.c: Include read-po.h.
(gram_max_allowed_errors): Remove variable.
* gettext-tools/libgettextpo/gettext-po.c: Don't include read-po-lex.h.
(po_file_read): Don't assign gram_max_allowed_errors.
* gettext-tools/src/msgattrib.c (main): Initialize gram_max_allowed_errors.
* gettext-tools/src/msgcat.c (main): Likewise.
* gettext-tools/src/msgcomm.c (main): Likewise.
* gettext-tools/src/msgconv.c (main): Likewise.
* gettext-tools/src/msgen.c (main): Likewise.
* gettext-tools/src/msgexec.c (main): Likewise.
* gettext-tools/src/msgfilter.c (main): Likewise.
* gettext-tools/src/msggrep.c (main): Likewise.
* gettext-tools/src/msginit.c (main): Likewise.
* gettext-tools/src/msguniq.c (main): Likewise.
* gettext-tools/src/xgettext.c (main): Likewise.
* gettext-tools/src/msgcmp.c: Don't include read-po-lex.h.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgfmt.c: Don't include read-po-lex.h.
(main): Initialize gram_max_allowed_errors.
#include "xalloc.h"
#include "read-catalog.h"
#include "read-po.h"
-#include "read-po-lex.h"
#include "write-catalog.h"
#include "write-po.h"
#include "xvasprintf.h"
handler->xerror2,
&error_count
};
- gram_max_allowed_errors = UINT_MAX;
file = XMALLOC (struct po_file);
file->real_filename = filename;
&local_xerror_handler);
file->domains = NULL;
- /* Restore. */
- gram_max_allowed_errors = 20;
-
if (fp != stdin)
fclose (fp);
return file;
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
#include "message.h"
#include "read-catalog-file.h"
#include "read-po.h"
-#include "read-po-lex.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "xmalloca.h"
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
#include "open-catalog.h"
#include "read-catalog-file.h"
#include "read-po.h"
-#include "read-po-lex.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "read-desktop.h"
error_print_progname = maybe_print_progname;
error_one_per_line = 1;
exit_status = EXIT_SUCCESS;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
#include "message.h"
#include "read-catalog-file.h"
#include "read-po.h"
-#include "read-po-lex.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "write-catalog.h"
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
#include "pos.h"
#include "message.h"
#include "str-list.h"
+#include "read-po.h"
#include "read-po-internal.h"
#include "read-po-gram.h"
}
-/* Lexer variables. */
-
-unsigned int gram_max_allowed_errors = 20;
-
-
/* Prepare lexical analysis. */
void
lex_start (struct po_parser_state *ps,
struct po_parser_state;
-/* Global variables from read-po-lex.c. */
-
-/* Number of parse errors within a PO file that cause the program to
- terminate. Cf. error_message_count, declared in <error.h>. */
-extern DLL_VARIABLE unsigned int gram_max_allowed_errors;
-
/* Prepare lexical analysis. */
extern void lex_start (struct po_parser_state *ps,
/* Specification. */
#include "read-po.h"
+#include <limits.h>
+
#include "read-po-lex.h"
#include "read-po-internal.h"
po_parse, /* parse */
false /* produces_utf8 */
};
+
+
+/* Lexer variables. */
+
+unsigned int gram_max_allowed_errors = UINT_MAX;
/* Reading PO files.
- Copyright (C) 2006, 2019 Free Software Foundation, Inc.
+ Copyright (C) 2006-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
extern DLL_VARIABLE const struct catalog_input_format input_format_po;
+/* Global variables. */
+
+/* Number of parse errors within a PO file that cause the program to
+ terminate. Cf. error_message_count, declared in <error.h>. */
+extern DLL_VARIABLE unsigned int gram_max_allowed_errors;
+
+
#ifdef __cplusplus
}
#endif
/* Set program name for messages. */
set_program_name (argv[0]);
error_print_progname = maybe_print_progname;
+ gram_max_allowed_errors = 20;
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");