1: #include "defs"
   2: 
   3: 
   4: FILEP infile    = { stdin };
   5: FILEP diagfile  = { stderr };
   6: 
   7: FILEP textfile;
   8: FILEP asmfile;
   9: FILEP initfile;
  10: long int headoffset;
  11: 
  12: char token[200];
  13: int toklen;
  14: int lineno;
  15: char *infname;
  16: int needkwd;
  17: struct labelblock *thislabel    = NULL;
  18: flag nowarnflag = NO;
  19: flag ftn66flag  = NO;
  20: flag profileflag    = NO;
  21: flag optimflag  = NO;
  22: flag shiftcase  = YES;
  23: flag undeftype  = NO;
  24: flag shortsubs  = YES;
  25: flag onetripflag    = NO;
  26: flag checksubs  = NO;
  27: flag debugflag  = NO;
  28: int nerr;
  29: int nwarn;
  30: int ndata;
  31: 
  32: flag saveall;
  33: flag substars;
  34: int parstate    = OUTSIDE;
  35: flag headerdone = NO;
  36: int blklevel;
  37: int impltype[26];
  38: int implleng[26];
  39: int implstg[26];
  40: 
  41: int tyint   = TYLONG ;
  42: int tylogical   = TYLONG;
  43: ftnint typesize[NTYPES]
  44:     = { 1, SZADDR, SZSHORT, SZLONG, SZLONG, 2*SZLONG,
  45:         2*SZLONG, 4*SZLONG, SZLONG, 1, 1, 1};
  46: int typealign[NTYPES]
  47:     = { 1, ALIADDR, ALISHORT, ALILONG, ALILONG, ALIDOUBLE,
  48:         ALILONG, ALIDOUBLE, ALILONG, 1, 1, 1};
  49: int procno;
  50: int proctype    = TYUNKNOWN;
  51: char *procname;
  52: int rtvlabel[NTYPES];
  53: int fudgelabel;
  54: struct addrblock *typeaddr;
  55: struct addrblock *retslot;
  56: int cxslot  = -1;
  57: int chslot  = -1;
  58: int chlgslot    = -1;
  59: int procclass   = CLUNKNOWN;
  60: int nentry;
  61: flag multitype;
  62: ftnint procleng;
  63: int lastlabno   = 10;
  64: int lastvarno;
  65: int lastargslot;
  66: int argloc;
  67: ftnint autoleng;
  68: ftnint bssleng  = 0;
  69: int retlabel;
  70: int ret0label;
  71: struct ctlframe ctls[MAXCTL];
  72: struct ctlframe *ctlstack   = ctls-1;
  73: struct ctlframe *lastctl    = ctls+MAXCTL ;
  74: 
  75: struct nameblock *regnamep[MAXREGVAR];
  76: int highregvar;
  77: int nregvar;
  78: 
  79: struct extsym extsymtab[MAXEXT];
  80: struct extsym *nextext  = extsymtab;
  81: struct extsym *lastext  = extsymtab+MAXEXT;
  82: 
  83: struct equivblock eqvclass[MAXEQUIV];
  84: struct hashentry hashtab[MAXHASH];
  85: struct hashentry *lasthash  = hashtab+MAXHASH;
  86: 
  87: struct labelblock labeltab[MAXSTNO];
  88: struct labelblock *labtabend    = labeltab+MAXSTNO;
  89: struct labelblock *highlabtab = labeltab;
  90: struct rplblock *rpllist    = NULL;
  91: chainp curdtp   = NULL;
  92: flag toomanyinit;
  93: ftnint curdtelt;
  94: chainp templist = NULL;
  95: chainp holdtemps    = NULL;
  96: int dorange = 0;
  97: struct entrypoint *entries  = NULL;
  98: 
  99: chainp chains   = NULL;
 100: 
 101: flag inioctl;
 102: struct addrblock *ioblkp;
 103: int iostmt;
 104: int nioctl;
 105: int nequiv  = 0;
 106: int nintnames   = 0;
 107: int nextnames   = 0;
 108: 
 109: struct literal litpool[MAXLITERALS];
 110: int nliterals;
 111: 
 112: 
 113: 
 114: fileinit()
 115: {
 116: procno = 0;
 117: lastlabno = 10;
 118: lastvarno = 0;
 119: nextext = extsymtab;
 120: nliterals = 0;
 121: nerr = 0;
 122: ndata = 0;
 123: }
 124: 
 125: 
 126: 
 127: 
 128: 
 129: procinit()
 130: {
 131: register struct nameblock *p;
 132: register struct dimblock *q;
 133: register struct hashentry *hp;
 134: register struct labelblock *lp;
 135: chainp cp;
 136: int i;
 137: 
 138: pruse(asmfile, USECONST);
 139: #if FAMILY == SCJ
 140:     p2pass(USETEXT);
 141: #endif
 142: parstate = OUTSIDE;
 143: headerdone = NO;
 144: blklevel = 1;
 145: saveall = NO;
 146: substars = NO;
 147: nwarn = 0;
 148: thislabel = NULL;
 149: needkwd = 0;
 150: 
 151: ++procno;
 152: proctype = TYUNKNOWN;
 153: procname = "MAIN_    ";
 154: procclass = CLUNKNOWN;
 155: nentry = 0;
 156: multitype = NO;
 157: typeaddr = NULL;
 158: retslot = NULL;
 159: cxslot = -1;
 160: chslot = -1;
 161: chlgslot = -1;
 162: procleng = 0;
 163: blklevel = 1;
 164: lastargslot = 0;
 165: #if TARGET==PDP11
 166:     autoleng = 6;
 167: #else
 168:     autoleng = 0;
 169: #endif
 170: 
 171: for(lp = labeltab ; lp < labtabend ; ++lp)
 172:     lp->stateno = 0;
 173: 
 174: for(hp = hashtab ; hp < lasthash ; ++hp)
 175:     if(p = hp->varp)
 176:         {
 177:         frexpr(p->vleng);
 178:         if(q = p->vdim)
 179:             {
 180:             for(i = 0 ; i < q->ndim ; ++i)
 181:                 {
 182:                 frexpr(q->dims[i].dimsize);
 183:                 frexpr(q->dims[i].dimexpr);
 184:                 }
 185:             frexpr(q->nelt);
 186:             frexpr(q->baseoffset);
 187:             frexpr(q->basexpr);
 188:             free(q);
 189:             }
 190:         free(p);
 191:         hp->varp = NULL;
 192:         }
 193: nintnames = 0;
 194: highlabtab = labeltab;
 195: 
 196: ctlstack = ctls - 1;
 197: for(cp = templist ; cp ; cp = cp->nextp)
 198:     free(cp->datap);
 199: frchain(&templist);
 200: holdtemps = NULL;
 201: dorange = 0;
 202: nregvar = 0;
 203: highregvar = 0;
 204: entries = NULL;
 205: rpllist = NULL;
 206: inioctl = NO;
 207: ioblkp = NULL;
 208: nequiv = 0;
 209: 
 210: for(i = 0 ; i<NTYPES ; ++i)
 211:     rtvlabel[i] = 0;
 212: fudgelabel = 0;
 213: 
 214: if(undeftype)
 215:     setimpl(TYUNKNOWN, (ftnint) 0, 'a', 'z');
 216: else
 217:     {
 218:     setimpl(TYREAL, (ftnint) 0, 'a', 'z');
 219:     setimpl(tyint,  (ftnint) 0, 'i', 'n');
 220:     }
 221: setimpl(-STGBSS, (ftnint) 0, 'a', 'z'); /* set class */
 222: setlog();
 223: }
 224: 
 225: 
 226: 
 227: 
 228: setimpl(type, length, c1, c2)
 229: int type;
 230: ftnint length;
 231: int c1, c2;
 232: {
 233: int i;
 234: char buff[100];
 235: 
 236: if(c1==0 || c2==0)
 237:     return;
 238: 
 239: if(c1 > c2)
 240:     err( sprintf(buff, "characters out of order in implicit:%c-%c", c1, c2) );
 241: else
 242:     if(type < 0)
 243:         for(i = c1 ; i<=c2 ; ++i)
 244:             implstg[i-'a'] = - type;
 245:     else
 246:         {
 247:         type = lengtype(type, (int) length);
 248:         if(type != TYCHAR)
 249:             length = 0;
 250:         for(i = c1 ; i<=c2 ; ++i)
 251:             {
 252:             impltype[i-'a'] = type;
 253:             implleng[i-'a'] = length;
 254:             }
 255:         }
 256: }

Defined functions

fileinit defined in line 114; used 1 times
procinit defined in line 129; used 2 times
setimpl defined in line 228; used 4 times

Defined variables

argloc defined in line 66; used 3 times
autoleng defined in line 67; used 13 times
blklevel defined in line 36; used 13 times
bssleng defined in line 68; used 7 times
chains defined in line 99; used 6 times
checksubs defined in line 26; used 4 times
chlgslot defined in line 58; used 5 times
chslot defined in line 57; used 6 times
ctls defined in line 71; used 9 times
ctlstack defined in line 72; used 85 times
curdtelt defined in line 93; never used
curdtp defined in line 91; never used
cxslot defined in line 56; used 6 times
debugflag defined in line 27; used 2 times
dorange defined in line 96; used 6 times
entries defined in line 97; used 9 times
eqvclass defined in line 83; used 8 times
ftn66flag defined in line 19; used 3 times
fudgelabel defined in line 53; used 5 times
hashtab defined in line 84; used 8 times
headerdone defined in line 35; used 6 times
headoffset defined in line 10; used 2 times
highlabtab defined in line 89; used 5 times
highregvar defined in line 76; used 6 times
holdtemps defined in line 95; used 6 times
implleng defined in line 38; used 3 times
implstg defined in line 39; used 3 times
impltype defined in line 37; used 3 times
infname defined in line 15; used 8 times
inioctl defined in line 101; used 5 times
ioblkp defined in line 102; used 10 times
iostmt defined in line 103; used 13 times
labeltab defined in line 87; used 11 times
labtabend defined in line 88; used 4 times
lastargslot defined in line 65; used 7 times
lastctl defined in line 73; used 1 times
lastext defined in line 81; used 1 times
lasthash defined in line 85; used 5 times
lastlabno defined in line 63; used 3 times
lastvarno defined in line 64; used 3 times
litpool defined in line 109; used 2 times
multitype defined in line 61; used 3 times
ndata defined in line 30; used 2 times
needkwd defined in line 16; used 4 times
nentry defined in line 60; used 7 times
nequiv defined in line 105; used 5 times
nerr defined in line 28; used 4 times
nextext defined in line 80; used 15 times
nextnames defined in line 107; never used
nintnames defined in line 106; used 3 times
nioctl defined in line 104; used 4 times
nliterals defined in line 110; used 5 times
nowarnflag defined in line 18; used 2 times
nregvar defined in line 77; used 11 times
nwarn defined in line 29; used 3 times
onetripflag defined in line 25; used 6 times
optimflag defined in line 21; used 1 times
parstate defined in line 34; used 10 times
procclass defined in line 59; used 15 times
procleng defined in line 62; used 6 times
procname defined in line 51; used 5 times
procno defined in line 49; used 8 times
proctype defined in line 50; used 14 times
profileflag defined in line 20; used 4 times
regnamep defined in line 75; used 3 times
ret0label defined in line 70; used 3 times
retlabel defined in line 69; used 7 times
retslot defined in line 55; used 6 times
rpllist defined in line 90; used 15 times
rtvlabel defined in line 52; used 7 times
saveall defined in line 32; used 2 times
shiftcase defined in line 22; used 2 times
shortsubs defined in line 24; used 4 times
substars defined in line 33; used 3 times
templist defined in line 94; used 7 times
thislabel defined in line 17; used 2 times
token defined in line 12; used 14 times
toklen defined in line 13; used 13 times
toomanyinit defined in line 92; never used
typeaddr defined in line 54; used 6 times
typealign defined in line 46; used 6 times
typesize defined in line 43; used 12 times
undeftype defined in line 23; used 3 times
Last modified: 1979-01-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1315
Valid CSS Valid XHTML 1.0 Strict