|
|
1.1 ! root 1: static char *sccsid ="%W% (Berkeley) %G%"; ! 2: # include "mfile1" ! 3: ! 4: /* communication between lexical routines */ ! 5: ! 6: char ftitle[100] = ""; /* title of the file */ ! 7: char ititle[100] = ""; /* title of initial file */ ! 8: int lineno; /* line number of the input file */ ! 9: ! 10: CONSZ lastcon; /* the last constant read by the lexical analyzer */ ! 11: double dcon; /* the last double read by the lexical analyzer */ ! 12: ! 13: ! 14: /* symbol table maintainence */ ! 15: ! 16: struct symtab stab[SYMTSZ+1]; /* one extra slot for scratch */ ! 17: ! 18: int curftn; /* "current" function */ ! 19: int ftnno; /* "current" function number */ ! 20: ! 21: int curclass, /* current storage class */ ! 22: instruct, /* "in structure" flag */ ! 23: stwart, /* for accessing names which are structure members or names */ ! 24: blevel, /* block level: 0 for extern, 1 for ftn args, >=2 inside function */ ! 25: curdim; /* current offset into the dimension table */ ! 26: ! 27: int dimtab[ DIMTABSZ ]; ! 28: ! 29: int paramstk[ PARAMSZ ]; /* used in the definition of function parameters */ ! 30: int paramno; /* the number of parameters */ ! 31: int autooff, /* the next unused automatic offset */ ! 32: argoff, /* the next unused argument offset */ ! 33: strucoff; /* the next structure offset position */ ! 34: int regvar; /* the next free register for register variables */ ! 35: int minrvar; /* the smallest that regvar gets witing a function */ ! 36: OFFSZ inoff; /* offset of external element being initialized */ ! 37: int brkflag = 0; /* complain about break statements not reached */ ! 38: ! 39: struct sw swtab[SWITSZ]; /* table for cases within a switch */ ! 40: struct sw *swp; /* pointer to next free entry in swtab */ ! 41: int swx; /* index of beginning of cases for current switch */ ! 42: ! 43: /* debugging flag */ ! 44: int xdebug = 0; ! 45: ! 46: int strflg; /* if on, strings are to be treated as lists */ ! 47: ! 48: int reached; /* true if statement can be reached... */ ! 49: ! 50: int idname; /* tunnel to buildtree for name id's */ ! 51: ! 52: ! 53: NODE node[TREESZ]; ! 54: ! 55: int cflag = 0; /* do we check for funny casts */ ! 56: int hflag = 0; /* do we check for various heuristics which may indicate errors */ ! 57: int pflag = 0; /* do we check for portable constructions */ ! 58: ! 59: int brklab; ! 60: int contlab; ! 61: int flostat; ! 62: int retlab = NOLAB; ! 63: int retstat; ! 64: ! 65: /* save array for break, continue labels, and flostat */ ! 66: ! 67: int asavbc[BCSZ]; ! 68: int *psavbc = asavbc ; ! 69: ! 70: # ifndef BUG1 ! 71: static char * ! 72: ccnames[] = { /* names of storage classes */ ! 73: "SNULL", ! 74: "AUTO", ! 75: "EXTERN", ! 76: "STATIC", ! 77: "REGISTER", ! 78: "EXTDEF", ! 79: "LABEL", ! 80: "ULABEL", ! 81: "MOS", ! 82: "PARAM", ! 83: "STNAME", ! 84: "MOU", ! 85: "UNAME", ! 86: "TYPEDEF", ! 87: "FORTRAN", ! 88: "ENAME", ! 89: "MOE", ! 90: "UFORTRAN", ! 91: "USTATIC", ! 92: }; ! 93: ! 94: char * scnames( c ) register c; { ! 95: /* return the name for storage class c */ ! 96: static char buf[12]; ! 97: if( c&FIELD ){ ! 98: sprintf( buf, "FIELD[%d]", c&FLDSIZ ); ! 99: return( buf ); ! 100: } ! 101: return( ccnames[c] ); ! 102: } ! 103: # endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.