BSD 4 release
[unix-history] / usr / src / cmd / pi / yyerror.c
index 38678dc..e8fe41a 100644 (file)
@@ -1,19 +1,8 @@
 /* Copyright (c) 1979 Regents of the University of California */
 /* Copyright (c) 1979 Regents of the University of California */
-#
-/*
- * pi - Pascal interpreter code translator
- *
- * Charles Haley, Bill Joy UCB
- * Version 1.1 February 1978
- *
- *
- * pxp - Pascal execution profiler
- *
- * Bill Joy UCB
- * Version 1.1 February 1978
- */
 
 
-#include "whoami"
+static char sccsid[] = "@(#)yyerror.c 1.1 8/27/80";
+
+#include "whoami.h"
 #include "0.h"
 #include "yy.h"
 
 #include "0.h"
 #include "yy.h"
 
@@ -43,8 +32,10 @@ yerror(s, a1, a2, a3, a4, a5)
        int ofout;
 #endif
 
        int ofout;
 #endif
 
-       if (errpfx == 'w' && opt('w') != 0)
+       if (errpfx == 'w' && opt('w') != 0) {
+               errpfx = 'E';
                return;
                return;
+       }
 #ifdef PXP
        flush();
        ofout = fout[0];
 #ifdef PXP
        flush();
        ofout = fout[0];
@@ -69,7 +60,7 @@ yerror(s, a1, a2, a3, a4, a5)
        pchr('\n');
        if (errpfx == 'E')
 #ifdef PI
        pchr('\n');
        if (errpfx == 'E')
 #ifdef PI
-               eflg++, cgenflg++;
+               eflg++, codeoff();
 #endif
 #ifdef PXP
                eflg++;
 #endif
 #ifdef PXP
                eflg++;