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

Defined functions

scnames defined in line 106; used 5 times

Defined variables

asavbc defined in line 79; used 4 times
blevel defined in line 30; used 19 times
brkflag defined in line 49; never used
brklab defined in line 71; used 1 times
ccnames defined in line 84; used 1 times
cflag defined in line 67; used 1 times
contlab defined in line 72; used 1 times
curclass defined in line 27; used 9 times
curdim defined in line 31; used 7 times
curftn defined in line 24; used 5 times
dcon defined in line 17; never used
fcon defined in line 16; never used
flostat defined in line 73; used 1 times
ftitle defined in line 9; used 3 times
ftnno defined in line 25; never used
hflag defined in line 68; used 6 times
idname defined in line 62; used 5 times
instruct defined in line 28; used 22 times
ititle defined in line 11; used 5 times
lineno defined in line 13; never used
minrvar defined in line 47; used 3 times
node defined in line 65; never used
paramno defined in line 42; used 14 times
pflag defined in line 69; used 1 times
psavbc defined in line 80; used 2 times
reached defined in line 60; used 5 times
regvar defined in line 46; used 5 times
retlab defined in line 74; used 2 times
retstat defined in line 75; used 1 times
sccsid defined in line 2; never used
stab defined in line 22; used 74 times
strflg defined in line 58; used 4 times
stwart defined in line 29; used 15 times
swp defined in line 52; used 1 times
swtab defined in line 51; used 1 times
swx defined in line 53; used 2 times
xdebug defined in line 56; never used
Last modified: 1991-08-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3129
Valid CSS Valid XHTML 1.0 Strict