]> git.saurik.com Git - bison.git/commitdiff
(<<EOF>>): Don't close standard output.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 3 Jan 2005 07:52:31 +0000 (07:52 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 3 Jan 2005 07:52:31 +0000 (07:52 +0000)
Problem reported by Hans Aberg.

src/scan-skel.l

index d860c08a55313db2a1f6c576a9d853115615c390..7ac27c6ebd335fe1c0ad057b444d2ca548777826 100644 (file)
@@ -83,7 +83,14 @@ int skel_lex (void);
 \n        lineno++; ECHO;
 [^@\n]+           ECHO;
 
-<<EOF>>           free (outname); xfclose (yyout); return EOF;
+<<EOF>> {
+  if (outname)
+    {
+      free (outname);
+      xfclose (yyout);
+    }
+  return EOF;
+}
 %%
 
 /*------------------------.