to escape special characters when outputting filenames.
(ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
(output_headers): Don't depend on them, Use ACTSTR.
+2000-12-12 Akim Demaille <akim@epita.fr>
+
+ * src/output.c (output_headers, output_program, output): Be sure
+ to escape special characters when outputting filenames.
+ (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
+ (output_headers): Don't depend on them, Use ACTSTR.
+
2000-11-17 Akim Demaille <akim@epita.fr>
* lib/obstack.h: Formatting changes.
2000-11-17 Akim Demaille <akim@epita.fr>
* lib/obstack.h: Formatting changes.
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2000-11-07 17:07+0100\n"
+"POT-Creation-Date: 2000-11-17 16:54+0100\n"
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
"Language-Team: German <de@li.org>\n"
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
"Language-Team: German <de@li.org>\n"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.25\n"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.25\n"
-"POT-Creation-Date: 2000-11-07 17:07+0100\n"
+"POT-Creation-Date: 2000-11-17 16:54+0100\n"
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
"Last-Translator: Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>\n"
"Language-Team: Spanish <es@li.org>\n"
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
"Last-Translator: Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>\n"
"Language-Team: Spanish <es@li.org>\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2000-11-07 17:07+0100\n"
+"POT-Creation-Date: 2000-11-17 16:54+0100\n"
"PO-Revision-Date: 2000-04-11 22:19+02:00\n"
"Last-Translator: Toomas Soome <tsoome@ut.ee>\n"
"Language-Team: Estonian <et@li.org>\n"
"PO-Revision-Date: 2000-04-11 22:19+02:00\n"
"Last-Translator: Toomas Soome <tsoome@ut.ee>\n"
"Language-Team: Estonian <et@li.org>\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2000-11-07 17:07+0100\n"
+"POT-Creation-Date: 2000-11-17 16:54+0100\n"
"PO-Revision-Date: 1996-03-19 20:05 EST\n"
"Last-Translator: Dominique Boucher <boucherd@IRO.UMontreal.CA>\n"
"Language-Team: French <fr@li.org>\n"
"PO-Revision-Date: 1996-03-19 20:05 EST\n"
"Last-Translator: Dominique Boucher <boucherd@IRO.UMontreal.CA>\n"
"Language-Team: French <fr@li.org>\n"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.28\n"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.28\n"
-"POT-Creation-Date: 2000-11-07 17:07+0100\n"
+"POT-Creation-Date: 2000-11-17 16:54+0100\n"
"PO-Revision-Date: 1999-09-28 21:10+0900\n"
"Last-Translator: Daisuke Yamashita <yamad@mb.infoweb.ne.jp>\n"
"Language-Team: Japanese <ja@li.org>\n"
"PO-Revision-Date: 1999-09-28 21:10+0900\n"
"Last-Translator: Daisuke Yamashita <yamad@mb.infoweb.ne.jp>\n"
"Language-Team: Japanese <ja@li.org>\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2000-11-07 17:07+0100\n"
+"POT-Creation-Date: 2000-11-17 16:54+0100\n"
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
"Last-Translator: Erick Branderhorst <branderh@debian.org>\n"
"Language-Team: Dutch <nl@li.org>\n"
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
"Last-Translator: Erick Branderhorst <branderh@debian.org>\n"
"Language-Team: Dutch <nl@li.org>\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.28a\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.28a\n"
-"POT-Creation-Date: 2000-11-07 17:07+0100\n"
+"POT-Creation-Date: 2000-11-17 16:54+0100\n"
"PO-Revision-Date: 2000-04-12 13:16+04:00\n"
"Last-Translator: Dmitry S. Sivachenko <dima@Chg.RU>\n"
"Language-Team: Russian <ru@li.org>\n"
"PO-Revision-Date: 2000-04-12 13:16+04:00\n"
"Last-Translator: Dmitry S. Sivachenko <dima@Chg.RU>\n"
"Language-Team: Russian <ru@li.org>\n"
#include "system.h"
#include "obstack.h"
#include "system.h"
#include "obstack.h"
#include "getargs.h"
#include "xalloc.h"
#include "files.h"
#include "getargs.h"
#include "xalloc.h"
#include "files.h"
| certain files. |
`--------------------------------------------------------------*/
| certain files. |
`--------------------------------------------------------------*/
+/* Don't put the `%s' insides quotes, since it quotearg puts them. */
+
extern int yyerror;\n\
extern int yycost;\n\
extern char * yymsg;\n\
extern int yyerror;\n\
extern int yycost;\n\
extern char * yymsg;\n\
-#include \"%s\"\n\
-extern YYSTYPE yyval;\n\
-extern int yychar;\n\
-\n\
-yyaction(n, yyvsp, yylsp)\n\
-register int n;\n\
-register YYSTYPE *yyvsp;\n\
-register YYLTYPE *yylsp;\n\
-{\n\
- switch (n)\n\
- {"
-
-#define ACTSTR_PROLOGUE \
-"\n\
-#include \""
-
-#define ACTSTR_EPILOGUE \
-"\"\n\
extern YYSTYPE yyval;\n\
extern int yychar;\n\
\n\
extern YYSTYPE yyval;\n\
extern int yychar;\n\
\n\
void
output_headers (void)
{
void
output_headers (void)
{
+ char *attrsfile_quoted = quotearg_style (c_quoting_style, attrsfile);
+
- fprintf (fguard, GUARDSTR, attrsfile);
+ fprintf (fguard, GUARDSTR, attrsfile_quoted);
if (no_parser_flag)
return;
if (semantic_parser)
if (no_parser_flag)
return;
if (semantic_parser)
- {
- obstack_grow_literal_string (&action_obstack,
- ACTSTR_PROLOGUE);
- obstack_grow (&action_obstack,
- attrsfile, strlen (attrsfile));
- obstack_grow_literal_string (&action_obstack,
- ACTSTR_EPILOGUE);
- }
+ obstack_fgrow1 (&action_obstack, ACTSTR, attrsfile_quoted);
- {
- obstack_grow_literal_string (&action_obstack, ACTSTR_SIMPLE);
- }
+ obstack_grow_literal_string (&action_obstack, ACTSTR_SIMPLE);
/* if (semantic_parser) JF moved this below
fprintf(ftable, "#include \"%s\"\n", attrsfile);
/* if (semantic_parser) JF moved this below
fprintf(ftable, "#include \"%s\"\n", attrsfile);
if (spec_name_prefix)
{
obstack_fgrow1 (&table_obstack,
if (spec_name_prefix)
{
obstack_fgrow1 (&table_obstack,
- "#define yyparse %sparse\n", spec_name_prefix);
+ "#define yyparse %sparse\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
obstack_fgrow1 (&table_obstack,
- "#define yylex %slex\n", spec_name_prefix);
+ "#define yylex %slex\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
obstack_fgrow1 (&table_obstack,
- "#define yyerror %serror\n", spec_name_prefix);
+ "#define yyerror %serror\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
obstack_fgrow1 (&table_obstack,
- "#define yylval %slval\n", spec_name_prefix);
+ "#define yylval %slval\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
obstack_fgrow1 (&table_obstack,
- "#define yychar %schar\n", spec_name_prefix);
+ "#define yychar %schar\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
obstack_fgrow1 (&table_obstack,
- "#define yydebug %sdebug\n", spec_name_prefix);
+ "#define yydebug %sdebug\n", spec_name_prefix);
obstack_fgrow1 (&table_obstack,
obstack_fgrow1 (&table_obstack,
- "#define yynerrs %snerrs\n", spec_name_prefix);
+ "#define yynerrs %snerrs\n", spec_name_prefix);
return;
if (semantic_parser)
return;
if (semantic_parser)
- {
- obstack_grow_literal_string (&action_obstack,
- " }\n");
- }
- obstack_grow_literal_string (&action_obstack,
- "}\n");
+ obstack_grow_literal_string (&action_obstack, " }\n");
+
+ obstack_grow_literal_string (&action_obstack, "}\n");
int c;
if (!no_lines_flag)
int c;
if (!no_lines_flag)
- obstack_fgrow2 (&table_obstack, "#line %d \"%s\"\n", lineno, infile);
+ obstack_fgrow2 (&table_obstack, "#line %d %s\n",
+ lineno, quotearg_style (c_quoting_style, infile));
- c = getc (finput);
- while (c != EOF)
- {
- obstack_1grow (&table_obstack, c);
- c = getc (finput);
- }
+ while ((c = getc (finput)) != EOF)
+ obstack_1grow (&table_obstack, c);
\n");
if (semantic_parser)
\n");
if (semantic_parser)
- obstack_fgrow1 (&table_obstack, "#include \"%s\"\n", attrsfile);
+ obstack_fgrow1 (&table_obstack, "#include %s\n",
+ quotearg_style (c_quoting_style, attrsfile));
if (!no_parser_flag)
obstack_grow_literal_string (&table_obstack, "#include <stdio.h>\n\n");
if (!no_parser_flag)
obstack_grow_literal_string (&table_obstack, "#include <stdio.h>\n\n");