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