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

Defined functions

scnames defined in line 98; used 5 times

Defined variables

argoff defined in line 36; used 2 times
asavbc defined in line 71; used 4 times
autooff defined in line 35; used 2 times
blevel defined in line 28; used 19 times
brkflag defined in line 41; never used
brklab defined in line 63; used 1 times
ccnames defined in line 76; used 1 times
cflag defined in line 59; used 1 times
contlab defined in line 64; used 1 times
curclass defined in line 25; used 9 times
curdim defined in line 29; used 7 times
curftn defined in line 22; used 5 times
dcon defined in line 15; never used
dimtab defined in line 31; used 58 times
fcon defined in line 14; never used
flostat defined in line 65; used 1 times
ftitle defined in line 9; used 3 times
ftnno defined in line 23; never used
hflag defined in line 60; used 6 times
idname defined in line 54; used 5 times
instruct defined in line 26; used 22 times
ititle defined in line 10; used 5 times
lineno defined in line 11; never used
minrvar defined in line 39; used 3 times
node defined in line 57; never used
paramno defined in line 34; used 14 times
paramstk defined in line 33; used 10 times
pflag defined in line 61; used 1 times
psavbc defined in line 72; used 2 times
reached defined in line 52; used 5 times
regvar defined in line 38; used 5 times
retlab defined in line 66; used 2 times
retstat defined in line 67; used 1 times
sccsid defined in line 2; never used
stab defined in line 20; used 74 times
strflg defined in line 50; used 4 times
strucoff defined in line 37; used 24 times
stwart defined in line 27; used 15 times
swp defined in line 44; used 1 times
swtab defined in line 43; used 1 times
swx defined in line 45; used 2 times
xdebug defined in line 48; never used
Last modified: 1985-03-19
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1007
Valid CSS Valid XHTML 1.0 Strict