BSD 4 release
[unix-history] / usr / src / cmd / pi / error.c
index 477bc97..256ed2b 100644 (file)
@@ -1,13 +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.2 November 1978
- */
 
 
-#include "whoami"
+static char sccsid[] = "@(#)error.c 1.1 8/27/80";
+
+#include "whoami.h"
 #include "0.h"
 #ifndef PI1
 #include "yy.h"
 #include "0.h"
 #ifndef PI1
 #include "yy.h"
@@ -60,8 +55,10 @@ error(a1, a2, a3, a4)
        char errbuf[256];               /* was extern. why? ...pbk */
        register int i;
 
        char errbuf[256];               /* was extern. why? ...pbk */
        register int i;
 
-       if (errpfx == 'w' && opt('w') != 0)
+       if (errpfx == 'w' && opt('w') != 0) {
+               errpfx = 'E';
                return;
                return;
+       }
        Enocascade = 0;
        geterr(a1, errbuf);
        a1 = errbuf;
        Enocascade = 0;
        geterr(a1, errbuf);
        a1 = errbuf;
@@ -84,7 +81,7 @@ error(a1, a2, a3, a4)
        printf(a1, a2, a3, a4);
        if (errpfx == 'E')
 #ifndef PI0
        printf(a1, a2, a3, a4);
        if (errpfx == 'E')
 #ifndef PI0
-               eflg++, cgenflg++;
+               eflg++, codeoff();
 #else
                eflg++;
 #endif
 #else
                eflg++;
 #endif
@@ -120,6 +117,10 @@ derror(a1, a2, a3, a4)
 
 char   *lastname, printed, hadsome;
 
 
 char   *lastname, printed, hadsome;
 
+    /*
+     * this yysetfile for PI1 only.
+     * the real yysetfile is in yyput.c
+     */
 yysetfile(name)
        char *name;
 {
 yysetfile(name)
        char *name;
 {