From 2a14b86ffe4423b85c297c8cf648e4635fa5e7ed Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 7 May 2001 13:16:33 +0000 Subject: [PATCH] Prefix most error messages with the program name. --- lib/ChangeLog | 9 +++++++++ lib/progname.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ lib/progname.h | 43 +++++++++++++++++++++++++++++++++++++++++++ src/ChangeLog | 41 +++++++++++++++++++++++++++++++++++++++++ src/msgcmp.c | 17 ++--------------- src/msgcomm.c | 16 ++-------------- src/msgfmt.c | 49 ++++++++++++++++++++++++++++--------------------- src/msgmerge.c | 20 ++------------------ src/msgunfmt.c | 17 ++--------------- src/po-lex.c | 8 ++++++++ src/po-lex.h | 9 +++++++++ src/xget-lex.c | 5 +++++ src/xgettext.c | 20 ++++++-------------- 13 files changed, 201 insertions(+), 97 deletions(-) create mode 100644 lib/progname.c create mode 100644 lib/progname.h diff --git a/lib/ChangeLog b/lib/ChangeLog index 265db3969..2a1736afe 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,12 @@ +2001-05-01 Bruno Haible + + Prefix most error messages with the program name, except those + starting with "filename:lineno:". + * progname.h: New file. + * progname.c: New file. + * Makefile.am (libnlsut_a_SOURCES): Add progname.c. + (noinst_HEADERS): Add progname.h. + 2001-05-01 Bruno Haible * vasprintf.c (int_vasprintf): Upon allocation failure, return -1, diff --git a/lib/progname.c b/lib/progname.c new file mode 100644 index 000000000..7068b395b --- /dev/null +++ b/lib/progname.c @@ -0,0 +1,44 @@ +/* Program name management. + Copyright (C) 2001 Free Software Foundation, Inc. + Written by Bruno Haible , 2001. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include "progname.h" + + +/* String containing name the program is called with. + To be initialized by main(). */ +const char *program_name; + +/* Indicates whether errors and warnings get prefixed with program_name. + Default is true. */ +int error_with_progname = 1; + +/* Print program_name prefix on stderr if and only if error_with_progname + is true. */ +void +maybe_print_progname () +{ + if (error_with_progname) + fprintf (stderr, "%s: ", program_name); +} diff --git a/lib/progname.h b/lib/progname.h new file mode 100644 index 000000000..7ddd3063b --- /dev/null +++ b/lib/progname.h @@ -0,0 +1,43 @@ +/* Program name management. + Copyright (C) 2001 Free Software Foundation, Inc. + Written by Bruno Haible , 2001. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _PROGNAME_H +#define _PROGNAME_H + +/* This file supports selectively prefixing or nor prefixing error messages + with the program name. + + Programs using this file should do the following in main(): + program_name = argv[0]; + error_print_progname = maybe_print_progname; + */ + +/* String containing name the program is called with. */ +extern const char *program_name; + +/* Indicates whether errors and warnings get prefixed with program_name. + Default is true. + A reason to omit the prefix is for better interoperability with Emacs' + compile.el. */ +extern int error_with_progname; + +/* Print program_name prefix on stderr if and only if error_with_progname + is true. */ +extern void maybe_print_progname PARAMS ((void)); + +#endif /* _PROGNAME_H */ diff --git a/src/ChangeLog b/src/ChangeLog index 44c5801f5..d84d63d09 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,44 @@ +2001-05-01 Bruno Haible + + Prefix most error messages with the program name, except those + starting with "filename:lineno:". + * po-lex.h: Include progname.h. + (po_gram_error): Set error_with_progname = 0 during error_at_line() + call. + (po_gram_error_at_line): Likewise. + * po-lex.c (po_gram_error): Likewise. + (po_gram_error_at_line): Likewise. + * msgcmp.c: Include progname.h. + (program_name): Remove variable. + (error_print): Remove function. + (main): Initialize error_print_progname with maybe_print_progname. + * msgcomm.c: Include progname.h. + (program_name): Remove variable. + (error_print): Remove function. + (main): Initialize error_print_progname with maybe_print_progname. + * msgfmt.c: Include progname.h. + (program_name): Remove variable. + (error_print): Remove function. + (main): Initialize error_print_progname with maybe_print_progname. + (format_directive_message): Set error_with_progname = 0 during + error_at_line() call. + (check_pair): Likewise. + * msgmerge.c: Include progname.h. + (program_name): Remove variable. + (error_print): Remove function. + (main): Initialize error_print_progname with maybe_print_progname. + * msgunfmt.c: Include progname.h. + (program_name): Remove variable. + (error_print): Remove function. + (main): Initialize error_print_progname with maybe_print_progname. + * xget-lex.c: Include progname.h. + (phase5_get): Set error_with_progname = 0 during error() call. + * xgettext.c: Include progname.h. + (program_name): Remove variable. + (error_print): Remove function. + (main): Initialize error_print_progname with maybe_print_progname. + (scan_c_file): Set error_with_progname = 0 during error() call. + 2001-04-30 Bruno Haible Save the messages' obsoleteness status in the 'message_ty'. diff --git a/src/msgcmp.c b/src/msgcmp.c index 816cbe1c7..e17af95ad 100644 --- a/src/msgcmp.c +++ b/src/msgcmp.c @@ -27,6 +27,7 @@ #include "dir-list.h" #include "error.h" +#include "progname.h" #include "message.h" #include #include "libgettext.h" @@ -54,9 +55,6 @@ struct compare_class_ty message_list_ty *mlp; }; -/* String containing name the program is called with. */ -const char *program_name; - /* Long options. */ static const struct option long_options[] = { @@ -69,7 +67,6 @@ static const struct option long_options[] = /* Prototypes for local functions. */ static void usage PARAMS ((int __status)); -static void error_print PARAMS ((void)); static void compare PARAMS ((char *, char *)); static message_list_ty *grammar PARAMS ((char *__filename)); static void compare_constructor PARAMS ((po_ty *__that)); @@ -96,7 +93,7 @@ main (argc, argv) /* Set program name for messages. */ program_name = argv[0]; - error_print_progname = error_print; + error_print_progname = maybe_print_progname; #ifdef HAVE_SETLOCALE /* Set locale via LC_ALL. */ @@ -216,16 +213,6 @@ Informative output:\n\ } -/* The address of this function will be assigned to the hook in the error - functions. */ -static void -error_print () -{ - /* We don't want the program name to be printed in messages. Emacs' - compile.el does not like this. */ -} - - static void compare (fn1, fn2) char *fn1; diff --git a/src/msgcomm.c b/src/msgcomm.c index 7e4917a9c..dbfcb80f8 100644 --- a/src/msgcomm.c +++ b/src/msgcomm.c @@ -39,6 +39,7 @@ #include "dir-list.h" #include "error.h" +#include "progname.h" #include "getline.h" #include "libgettext.h" #include "message.h" @@ -66,9 +67,6 @@ static char *output_dir; /* If nonzero omit header with information about this run. */ static int omit_header; -/* String containing name the program is called with. */ -const char *program_name; - /* These variables control which messages are selected. */ static int more_than = -1; static int less_than = -1; @@ -106,7 +104,6 @@ static void usage PARAMS ((int status)) __attribute__ ((noreturn)) #endif ; -static void error_print PARAMS ((void)); static string_list_ty *read_name_from_file PARAMS ((const char *__file_name)); static void extract_constructor PARAMS ((po_ty *__that)); static void extract_directive_domain PARAMS ((po_ty *__that, char *__name)); @@ -147,7 +144,7 @@ main (argc, argv) /* Set program name for messages. */ program_name = argv[0]; - error_print_progname = error_print; + error_print_progname = maybe_print_progname; #ifdef HAVE_SETLOCALE /* Set locale via LC_ALL. */ @@ -452,15 +449,6 @@ Informative output:\n\ } -/* The address of this function will be assigned to the hook in the error - functions. */ -static void -error_print () -{ - /* We don't want the program name to be printed in messages. */ -} - - /* Read list of files to process from file. */ static string_list_ty * read_name_from_file (file_name) diff --git a/src/msgfmt.c b/src/msgfmt.c index e175597d9..b75f5d282 100644 --- a/src/msgfmt.c +++ b/src/msgfmt.c @@ -32,6 +32,7 @@ #include "dir-list.h" #include "error.h" +#include "progname.h" #include "getline.h" #include "printf.h" #include @@ -101,9 +102,6 @@ static int no_hash_table; /* Specifies name of the output file. */ static const char *output_file_name; -/* String containing name the program is called with. */ -const char *program_name; - /* We may have more than one input file. Domains with same names in different files have to merged. So we need a list of tables for each output file. */ @@ -167,7 +165,6 @@ static void usage PARAMS ((int status)) __attribute__ ((noreturn)) #endif ; -static void error_print PARAMS ((void)); static void grammar PARAMS ((char *__filename)); static void format_constructor PARAMS ((po_ty *__that)); static void format_directive_domain PARAMS ((po_ty *__pop, char *__name)); @@ -205,7 +202,7 @@ main (argc, argv) /* Set program name for messages. */ program_name = argv[0]; - error_print_progname = error_print; + error_print_progname = maybe_print_progname; error_one_per_line = 1; exit_status = EXIT_SUCCESS; @@ -465,16 +462,6 @@ new_domain (name) } -/* The address of this function will be assigned to the hook in the error - functions. */ -static void -error_print () -{ - /* We don't want the program name to be printed in messages. Emacs' - compile.el does not like this. */ -} - - /* Prepare for first message. */ static void format_constructor (that) @@ -572,12 +559,16 @@ format_directive_message (that, msgid_string, msgid_pos, msgid_plural, || (!include_all && this->is_fuzzy && msgid_string[0] != '\0')) { if (verbose_level > 1) - /* We don't change the exit status here because this is really - only an information. */ - error_at_line (0, 0, msgstr_pos->file_name, msgstr_pos->line_number, - (msgstr_string[0] == '\0' - ? _("empty `msgstr' entry ignored") - : _("fuzzy `msgstr' entry ignored"))); + { + /* We don't change the exit status here because this is really + only an information. */ + error_with_progname = 0; + error_at_line (0, 0, msgstr_pos->file_name, msgstr_pos->line_number, + (msgstr_string[0] == '\0' + ? _("empty `msgstr' entry ignored") + : _("fuzzy `msgstr' entry ignored"))); + error_with_progname = 1; + } /* Increment counter for fuzzy/untranslated messages. */ if (msgstr_string[0] == '\0') @@ -954,17 +945,21 @@ check_pair (msgid, msgid_pos, msgid_plural, msgstr, msgstr_len, msgstr_pos, { if (TEST_NEWLINE(msgid_plural) != has_newline) { + error_with_progname = 0; error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\ `msgid' and `msgid_plural' entries do not both begin with '\\n'")); + error_with_progname = 1; exit_status = EXIT_FAILURE; } for (p = msgstr, i = 0; p < msgstr + msgstr_len; p += strlen (p) + 1, i++) if (TEST_NEWLINE(p) != has_newline) { + error_with_progname = 0; error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\ `msgid' and `msgstr[%u]' entries do not both begin with '\\n'"), i); + error_with_progname = 1; exit_status = EXIT_FAILURE; } } @@ -972,9 +967,11 @@ check_pair (msgid, msgid_pos, msgid_plural, msgstr, msgstr_len, msgstr_pos, { if (TEST_NEWLINE(msgstr) != has_newline) { + error_with_progname = 0; error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\ `msgid' and `msgstr' entries do not both begin with '\\n'")); + error_with_progname = 1; exit_status = EXIT_FAILURE; } } @@ -987,17 +984,21 @@ check_pair (msgid, msgid_pos, msgid_plural, msgstr, msgstr_len, msgstr_pos, { if (TEST_NEWLINE(msgid_plural) != has_newline) { + error_with_progname = 0; error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\ `msgid' and `msgid_plural' entries do not both end with '\\n'")); + error_with_progname = 1; exit_status = EXIT_FAILURE; } for (p = msgstr, i = 0; p < msgstr + msgstr_len; p += strlen (p) + 1, i++) if (TEST_NEWLINE(p) != has_newline) { + error_with_progname = 0; error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\ `msgid' and `msgstr[%u]' entries do not both end with '\\n'"), i); + error_with_progname = 1; exit_status = EXIT_FAILURE; } } @@ -1005,9 +1006,11 @@ check_pair (msgid, msgid_pos, msgid_plural, msgstr, msgstr_len, msgstr_pos, { if (TEST_NEWLINE(msgstr) != has_newline) { + error_with_progname = 0; error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\ `msgid' and `msgstr' entries do not both end with '\\n'")); + error_with_progname = 1; exit_status = EXIT_FAILURE; } } @@ -1021,9 +1024,11 @@ check_pair (msgid, msgid_pos, msgid_plural, msgstr, msgstr_len, msgstr_pos, nstrfmts = parse_printf_format (msgstr, 0, NULL); if (nidfmts != nstrfmts) { + error_with_progname = 0; error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\ number of format specifications in `msgid' and `msgstr' does not match")); + error_with_progname = 1; exit_status = EXIT_FAILURE; } else @@ -1038,10 +1043,12 @@ number of format specifications in `msgid' and `msgstr' does not match")); for (cnt = 0; cnt < nidfmts; ++cnt) if (id_args[cnt] != str_args[cnt]) { + error_with_progname = 0; error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number, _("\ format specifications for argument %lu are not the same"), (unsigned long) (cnt + 1)); + error_with_progname = 1; exit_status = EXIT_FAILURE; } } diff --git a/src/msgmerge.c b/src/msgmerge.c index a98d4d6f5..c8e5145a1 100644 --- a/src/msgmerge.c +++ b/src/msgmerge.c @@ -28,6 +28,7 @@ #include "dir-list.h" #include "error.h" +#include "progname.h" #include "message.h" #include "read-po.h" #include "write-po.h" @@ -38,9 +39,6 @@ #define _(str) gettext (str) -/* String containing name the program is called with. */ -const char *program_name; - /* If non-zero do not print unneeded messages. */ static int quiet; @@ -80,7 +78,6 @@ static const struct option long_options[] = /* Prototypes for local functions. */ static void usage PARAMS ((int __status)); -static void error_print PARAMS ((void)); static message_list_ty *merge PARAMS ((const char *__fn1, const char *__fn2)); static void compendium PARAMS ((const char *__filename)); @@ -100,9 +97,9 @@ main (argc, argv) /* Set program name for messages. */ program_name = argv[0]; + error_print_progname = maybe_print_progname; verbosity_level = 0; quiet = 0; - error_print_progname = error_print; gram_max_allowed_errors = UINT_MAX; #ifdef HAVE_SETLOCALE @@ -333,19 +330,6 @@ Informative output:\n\ } -/* The address of this function will be assigned to the hook in the - error functions. */ -static void -error_print () -{ - /* We don't want the program name to be printed in messages. Emacs' - compile.el does not like this. */ - - /* FIXME Why must this program toady to Emacs? Why can't compile.el - be enhanced to cope with a leading program name? --PMiller */ -} - - #define DOT_FREQUENCE 10 static message_list_ty * diff --git a/src/msgunfmt.c b/src/msgunfmt.c index fbb581733..2b613447c 100644 --- a/src/msgunfmt.c +++ b/src/msgunfmt.c @@ -31,6 +31,7 @@ #include "hash.h" #include "error.h" +#include "progname.h" #include "getline.h" #include "printf.h" #include @@ -48,9 +49,6 @@ extern int errno; #endif -/* String containing name the program is called with. */ -const char *program_name; - /* Force output of PO file even if empty. */ static int force_po; @@ -78,7 +76,6 @@ static enum { MO_LITTLE_ENDIAN, MO_BIG_ENDIAN } endian; /* Prototypes for local functions. */ static void usage PARAMS ((int __status)); -static void error_print PARAMS ((void)); static nls_uint32 read32 PARAMS ((FILE *__fp, const char *__fn)); static void seek32 PARAMS ((FILE *__fp, const char *__fn, long __offset)); static char *string32 PARAMS ((FILE *__fp, const char *__fn, long __offset, @@ -101,7 +98,7 @@ main (argc, argv) /* Set program name for messages. */ program_name = argv[0]; - error_print_progname = error_print; + error_print_progname = maybe_print_progname; #ifdef HAVE_SETLOCALE /* Set locale via LC_ALL. */ @@ -265,16 +262,6 @@ Informative output:\n\ } -/* The address of this function will be assigned to the hook in the error - functions. */ -static void -error_print () -{ - /* We don't want the program name to be printed in messages. Emacs' - compile.el does not like this. */ -} - - /* This function reads a 32-bit number from the file, and assembles it according to the current ``endian'' setting. */ static nls_uint32 diff --git a/src/po-lex.c b/src/po-lex.c index d46c66619..0ad49d8c6 100644 --- a/src/po-lex.c +++ b/src/po-lex.c @@ -132,10 +132,14 @@ po_gram_error (fmt, va_alist) vasprintf (&buffer, fmt, ap); va_end (ap); + error_with_progname = 0; error_at_line (0, 0, gram_pos.file_name, gram_pos.line_number, "%s", buffer); + error_with_progname = 1; # else + error_with_progname = 0; error_at_line (0, 0, gram_pos.file_name, gram_pos.line_number, fmt, a1, a2, a3, a4, a5, a6, a7, a8); + error_with_progname = 1; # endif /* Some messages need more than one line. Continuation lines are @@ -170,10 +174,14 @@ po_gram_error_at_line (pp, fmt, va_alist) vasprintf (&buffer, fmt, ap); va_end (ap); + error_with_progname = 0; error_at_line (0, 0, pp->file_name, pp->line_number, "%s", buffer); + error_with_progname = 1; # else + error_with_progname = 0; error_at_line (0, 0, pp->file_name, pp->line_number, fmt, a1, a2, a3, a4, a5, a6, a7, a8); + error_with_progname = 1; # endif /* Some messages need more than one line, or more than one location. diff --git a/src/po-lex.h b/src/po-lex.h index 11a1b1c09..0ade9e408 100644 --- a/src/po-lex.h +++ b/src/po-lex.h @@ -22,6 +22,7 @@ #include #include "error.h" +#include "progname.h" #include "pos.h" /* Lexical analyzer for reading PO files. */ @@ -66,8 +67,10 @@ extern void po_lex_pass_obsolete_entries PARAMS ((int __flag)); # define po_gram_error(fmt, ...) \ do { \ + error_with_progname = 0; \ error_at_line (0, 0, gram_pos.file_name, gram_pos.line_number, \ fmt, __VA_ARGS__); \ + error_with_progname = 1; \ if (*fmt == '.') \ --error_message_count; \ else if (error_message_count >= gram_max_allowed_errors) \ @@ -80,8 +83,10 @@ extern void po_lex_pass_obsolete_entries PARAMS ((int __flag)); # define po_gram_error_at_line(pos, fmt, ...) \ do { \ + error_with_progname = 0; \ error_at_line (0, 0, (pos)->file_name, (pos)->line_number, \ fmt, __VA_ARGS__); \ + error_with_progname = 1; \ if (*fmt == '.') \ --error_message_count; \ else if (error_message_count >= gram_max_allowed_errors) \ @@ -96,8 +101,10 @@ extern void po_lex_pass_obsolete_entries PARAMS ((int __flag)); # define po_gram_error(fmt, args...) \ do { \ + error_with_progname = 0; \ error_at_line (0, 0, gram_pos.file_name, gram_pos.line_number, \ fmt, ## args); \ + error_with_progname = 1; \ if (*fmt == '.') \ --error_message_count; \ else if (error_message_count >= gram_max_allowed_errors) \ @@ -110,8 +117,10 @@ extern void po_lex_pass_obsolete_entries PARAMS ((int __flag)); # define po_gram_error_at_line(pos, fmt, args...) \ do { \ + error_with_progname = 0; \ error_at_line (0, 0, (pos)->file_name, (pos)->line_number, \ fmt, ## args); \ + error_with_progname = 1; \ if (*fmt == '.') \ --error_message_count; \ else if (error_message_count >= gram_max_allowed_errors) \ diff --git a/src/xget-lex.c b/src/xget-lex.c index 84b111a0f..08b315818 100644 --- a/src/xget-lex.c +++ b/src/xget-lex.c @@ -28,6 +28,7 @@ #include "dir-list.h" #include "error.h" +#include "progname.h" #include "system.h" #include "libgettext.h" #include "hash.h" @@ -873,8 +874,10 @@ phase5_get (tp) c = phase7_getc (); if (c == P7_NEWLINE) { + error_with_progname = 0; error (0, 0, _("%s:%d: warning: unterminated character constant"), logical_file_name, line_number - 1); + error_with_progname = 1; phase7_ungetc ('\n'); break; } @@ -895,8 +898,10 @@ phase5_get (tp) c = phase7_getc (); if (c == P7_NEWLINE) { + error_with_progname = 0; error (0, 0, _("%s:%d: warning: unterminated string literal"), logical_file_name, line_number - 1); + error_with_progname = 1; phase7_ungetc ('\n'); break; } diff --git a/src/xgettext.c b/src/xgettext.c index abfba6184..ce1e716d7 100644 --- a/src/xgettext.c +++ b/src/xgettext.c @@ -41,6 +41,7 @@ extern int errno; #include "dir-list.h" #include "error.h" +#include "progname.h" #include "hash.h" #include "getline.h" #include "system.h" @@ -102,9 +103,6 @@ static char *output_dir; /* If nonzero omit header with information about this run. */ static int omit_header; -/* String containing name the program is called with. */ -const char *program_name; - /* Long options. */ static const struct option long_options[] = { @@ -149,7 +147,6 @@ static void usage PARAMS ((int status)) __attribute__ ((noreturn)) #endif ; -static void error_print PARAMS ((void)); static string_list_ty *read_name_from_file PARAMS ((const char *__file_name)); static void exclude_directive_domain PARAMS ((po_ty *__pop, char *__name)); static void exclude_directive_message PARAMS ((po_ty *__pop, char *__msgid, @@ -217,7 +214,7 @@ main (argc, argv) /* Set program name for messages. */ program_name = argv[0]; - error_print_progname = error_print; + error_print_progname = maybe_print_progname; #ifdef HAVE_SETLOCALE /* Set locale via LC_ALL. */ @@ -603,15 +600,6 @@ Informative output:\n\ } -/* The address of this function will be assigned to the hook in the error - functions. */ -static void -error_print () -{ - /* We don't want the program name to be printed in messages. */ -} - - /* Read list of files to process from file. */ static string_list_ty * read_name_from_file (file_name) @@ -944,9 +932,11 @@ scan_c_file (filename, mlp) { if (commas_to_skip == 0) { + error_with_progname = 0; error (0, 0, _("%s:%d: warning: keyword nested in keyword arg"), token.file_name, token.line_number); + error_with_progname = 1; continue; } @@ -954,9 +944,11 @@ scan_c_file (filename, mlp) potentially unbounded stack. We haven't run across an example that needs this functionality yet. For now, we punt and forget the outer keyword. */ + error_with_progname = 0; error (0, 0, _("%s:%d: warning: keyword between outer keyword and its arg"), token.file_name, token.line_number); + error_with_progname = 1; } commas_to_skip = token.argnum1 - 1; plural_commas = (token.argnum2 > token.argnum1 -- 2.47.3