change over to new error message format
authorKirk McKusick <mckusic@ucbvax.Berkeley.EDU>
Wed, 10 Jun 1981 16:45:13 +0000 (08:45 -0800)
committerKirk McKusick <mckusic@ucbvax.Berkeley.EDU>
Wed, 10 Jun 1981 16:45:13 +0000 (08:45 -0800)
SCCS-vsn: usr.bin/pascal/px/interp.c 1.14
SCCS-vsn: usr.bin/pascal/px/Makefile 1.9

usr/src/usr.bin/pascal/px/Makefile
usr/src/usr.bin/pascal/px/interp.c

index ae7af46..085b2e3 100644 (file)
@@ -1,4 +1,4 @@
-SCCSID = "@(#)Makefile 1.8 %G%"
+SCCSID = "@(#)Makefile 1.9 %G%"
 
 CFLAGS = -O
 DESTDIR =
 
 CFLAGS = -O
 DESTDIR =
@@ -12,7 +12,7 @@ AS = as
 RM = rm -f
 
 PSHDR =        OPnames.h whoami.h objfmt.h opc.c pic.c
 RM = rm -f
 
 PSHDR =        OPnames.h whoami.h objfmt.h opc.c pic.c
-PCHDR =        libpc.h h01errs.h
+PCHDR =        libpc.h
 
 PXHDR =        vars.h machdep.h
 
 
 PXHDR =        vars.h machdep.h
 
@@ -56,7 +56,7 @@ install: px
 
 clean:
        ${RM}  *.o *.s px version opc* pic* OPnames.h objfmt.h libpc.h\
 
 clean:
        ${RM}  *.o *.s px version opc* pic* OPnames.h objfmt.h libpc.h\
-               panics.h h01errs.h h02opcs.h errs lpr core tmp
+               panics.h h02opcs.h errs lpr core tmp
 
 prt: interp.s
        sed -f clean.sed <interp.s
 
 prt: interp.s
        sed -f clean.sed <interp.s
@@ -102,7 +102,6 @@ interp.o: vars.h
 interp.o: panics.h
 interp.o: h02opcs.h
 interp.o: machdep.h
 interp.o: panics.h
 interp.o: h02opcs.h
 interp.o: machdep.h
-interp.o: h01errs.h
 interp.o: libpc.h
 opc.o: OPnames.h
 pic.o: OPnames.h
 interp.o: libpc.h
 opc.o: OPnames.h
 pic.o: OPnames.h
index b12ff75..35476ea 100644 (file)
@@ -1,6 +1,6 @@
 /* Copyright (c) 1979 Regents of the University of California */
 
 /* Copyright (c) 1979 Regents of the University of California */
 
-static char sccsid[] = "@(#)interp.c 1.13 %G%";
+static char sccsid[] = "@(#)interp.c 1.14 %G%";
 
 #include <math.h>
 #include "whoami.h"
 
 #include <math.h>
 #include "whoami.h"
@@ -9,7 +9,6 @@ static char sccsid[] = "@(#)interp.c 1.13 %G%";
 #include "panics.h"
 #include "h02opcs.h"
 #include "machdep.h"
 #include "panics.h"
 #include "h02opcs.h"
 #include "machdep.h"
-#include "h01errs.h"
 #include "libpc.h"
 
 /*
 #include "libpc.h"
 
 /*
@@ -282,7 +281,7 @@ interpreter(base)
                        stp = _dp->stp;
                        while (tstp != stp) {
                                if (_dp == &_display.frame[1])
                        stp = _dp->stp;
                        while (tstp != stp) {
                                if (_dp == &_display.frame[1])
-                                       ERROR(EGOTO); /* exiting prog ??? */
+                                       ERROR("Active frame not found in non-local goto\n", 0); /* exiting prog ??? */
                                PCLOSE(_dp->locvars); /* close local files */
                                curfile = stp->file;  /* restore active file */
                                *_dp = stp->odisp;    /* old display entry */
                                PCLOSE(_dp->locvars); /* close local files */
                                curfile = stp->file;  /* restore active file */
                                *_dp = stp->odisp;    /* old display entry */
@@ -1066,7 +1065,7 @@ interpreter(base)
                                if (tl1 == *tcp++)
                                        break;
                        if (tl == 0)            /* default case => error */
                                if (tl1 == *tcp++)
                                        break;
                        if (tl == 0)            /* default case => error */
-                               ERROR(ECASE, tl1);
+                               ERROR("Label of %D not found in case\n", tl1);
                        pc.cp += *(tsp - tl);
                        continue;
                case O_CASE2OP:
                        pc.cp += *(tsp - tl);
                        continue;
                case O_CASE2OP:
@@ -1080,7 +1079,7 @@ interpreter(base)
                                if (tl1 == *tsp1++)
                                        break;
                        if (tl == 0)            /* default case => error */
                                if (tl1 == *tsp1++)
                                        break;
                        if (tl == 0)            /* default case => error */
-                               ERROR(ECASE, tl1);
+                               ERROR("Label of %D not found in case\n", tl1);
                        pc.cp += *(tsp - tl);
                        continue;
                case O_CASE4OP:
                        pc.cp += *(tsp - tl);
                        continue;
                case O_CASE4OP:
@@ -1094,7 +1093,7 @@ interpreter(base)
                                if (tl1 == *tlp++)
                                        break;
                        if (tl == 0)            /* default case => error */
                                if (tl1 == *tlp++)
                                        break;
                        if (tl == 0)            /* default case => error */
-                               ERROR(ECASE, tl1);
+                               ERROR("Label of %D not found in case\n", tl1);
                        pc.cp += *(tsp - tl);
                        continue;
                case O_ADDT:
                        pc.cp += *(tsp - tl);
                        continue;
                case O_ADDT: