Annotation of 42BSD/ucb/pascal/pdx/machine/printerror.c, revision 1.1

1.1     ! root        1: /* Copyright (c) 1982 Regents of the University of California */
        !             2: 
        !             3: static char sccsid[] = "@(#)printerror.c 1.3 2/11/82";
        !             4: 
        !             5: /*
        !             6:  * Print out an execution time error.
        !             7:  */
        !             8: 
        !             9: #include "defs.h"
        !            10: #include <signal.h>
        !            11: #include "machine.h"
        !            12: #include "sym.h"
        !            13: #include "process.h"
        !            14: #include "source.h"
        !            15: #include "object.h"
        !            16: #include "mappings.h"
        !            17: #include "pxerrors.h"
        !            18: #include "process/process.rep"
        !            19: 
        !            20: printerror()
        !            21: {
        !            22:     register PROCESS *p;
        !            23:     char *filename;
        !            24:     int c;
        !            25: 
        !            26:     p = process;
        !            27:     if (p->signo != ESIGNAL && p->signo != SIGINT) {
        !            28:        error("signal %d at px pc %d, lc %d", p->signo, p->pc, pc);
        !            29:     }
        !            30:     curline = srcline(pc);
        !            31:     curfunc = whatblock(pc);
        !            32:     skimsource(srcfilename(pc));
        !            33:     if (p->signo == ESIGNAL) {
        !            34:        printf("\nerror at ");
        !            35:        printwhere(curline, cursource);
        !            36:        if (errnum != 0) {
        !            37:            printf(":  %s", pxerrmsg[errnum]);
        !            38:        }
        !            39:     } else {
        !            40:        printf("\n\ninterrupt at ");
        !            41:        printwhere(curline, cursource);
        !            42:     }
        !            43:     putchar('\n');
        !            44:     printlines(curline, curline);
        !            45:     erecover();
        !            46: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.