Annotation of 42BSD/ucb/pascal/pxp/var.c, revision 1.1.1.1

1.1       root        1: static char *sccsid = "@(#)var.c       1.2 (Berkeley) 3/7/81";
                      2: /* Copyright (c) 1979 Regents of the University of California */
                      3: #
                      4: /*
                      5:  * pxp - Pascal execution profiler
                      6:  *
                      7:  * Bill Joy UCB
                      8:  * Version 1.2 January 1979
                      9:  */
                     10: 
                     11: #include "0.h"
                     12: #include "tree.h"
                     13: 
                     14: STATIC int varcnt = -1;
                     15: /*
                     16:  * Var declaration part
                     17:  */
                     18: varbeg(l, vline)
                     19:        int l, vline;
                     20: {
                     21: 
                     22:        line = l;
                     23:        if (nodecl)
                     24:                printoff();
                     25:        puthedr();
                     26:        putcm();
                     27:        ppnl();
                     28:        indent();
                     29:        ppkw("var");
                     30:        ppgoin(DECL);
                     31:        varcnt = 0;
                     32:        setline(vline);
                     33: }
                     34: 
                     35: var(vline, vidl, vtype)
                     36:        int vline;
                     37:        register int *vidl;
                     38:        int *vtype;
                     39: {
                     40: 
                     41:        if (varcnt)
                     42:                putcm();
                     43:        setline(vline);
                     44:        ppitem();
                     45:        if (vidl != NIL)
                     46:                for (;;) {
                     47:                        ppid(vidl[1]);
                     48:                        vidl = vidl[2];
                     49:                        if (vidl == NIL)
                     50:                                break;
                     51:                        ppsep(", ");
                     52:                }
                     53:        else
                     54:                ppid("{identifier list}");
                     55:        ppsep(":");
                     56:        gtype(vtype);
                     57:        ppsep(";");
                     58:        setinfo(vline);
                     59:        putcml();
                     60:        varcnt++;
                     61: }
                     62: 
                     63: varend()
                     64: {
                     65: 
                     66:        if (varcnt == -1)
                     67:                return;
                     68:        if (varcnt == 0)
                     69:                ppid("{variable decls}");
                     70:        ppgoout(DECL);
                     71:        varcnt = -1;
                     72: }

unix.superglobalmegacorp.com

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