mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-28 21:53:03 +00:00
("@output ".*\n): Don't close standard output.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Scan Bison Skeletons. -*- C -*-
|
||||
|
||||
Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -59,9 +59,12 @@ int skel_lex (void);
|
||||
fatal ("invalid token in skeleton: %s", yytext);
|
||||
}
|
||||
|
||||
if (outname)
|
||||
{
|
||||
free (outname);
|
||||
outname = xstrdup (filename);
|
||||
xfclose (yyout);
|
||||
}
|
||||
outname = xstrdup (filename);
|
||||
yyout = xfopen (outname, "w");
|
||||
lineno = 1;
|
||||
}
|
||||
@@ -80,7 +83,7 @@ int skel_lex (void);
|
||||
\n lineno++; ECHO;
|
||||
[^@\n]+ ECHO;
|
||||
|
||||
<<EOF>> xfclose (yyout); free (outname); return EOF;
|
||||
<<EOF>> free (outname); xfclose (yyout); return EOF;
|
||||
%%
|
||||
|
||||
/*------------------------.
|
||||
|
||||
Reference in New Issue
Block a user