1: /*	def.h	4.2	83/08/11	*/
   2: 
   3: #define ASSERT(P,R) {if (!(P)) {fprintf(stderr,"failed assertion in routine R: P\n"); abort();}}
   4: 
   5: extern int routnum, routerr;
   6: extern long rtnbeg;     /* number of chars up to beginnine of curernt routing */
   7: extern int **graph, nodenum;
   8: extern int stopflg;     /* turns off generation of stop statements */
   9: 
  10: #define TRUE 1
  11: #define FALSE 0
  12: #define LOGICAL int
  13: #define VERT int
  14: #define DEFINED(v)  (v >= 0)
  15: #define UNDEFINED   -1
  16: 
  17: /* node types */
  18: #define STLNVX      0
  19: #define IFVX        1
  20: #define DOVX        2
  21: #define IOVX        3
  22: #define FMTVX       4
  23: #define COMPVX      5
  24: #define ASVX        6
  25: #define ASGOVX      7
  26: #define LOOPVX      8
  27: #define WHIVX       9
  28: #define UNTVX       10
  29: #define ITERVX      11
  30: #define THENVX      12
  31: #define STOPVX      13
  32: #define RETVX       14
  33: #define DUMVX       15
  34: #define GOVX        16
  35: #define BRKVX       17
  36: #define NXTVX       18
  37: #define SWCHVX      19
  38: #define ACASVX      20
  39: #define ICASVX      21
  40: 
  41: #define TYPENUM 22
  42: 
  43: 
  44: extern int hascom[TYPENUM];     /* FALSE for types with no comments, 2 otherwise */
  45: extern int nonarcs[TYPENUM];        /* number of wds per node other than arcs */
  46: extern VERT *arc(), *lchild();
  47: extern int *vxpart(), *negpart(), *predic(), *expres(), *level(), *stlfmt();
  48: /* node parts */
  49: #define FIXED 4     /* number of wds needed in every node */
  50: #define NTYPE(v)    graph[v][0]
  51: #define BEGCOM(v)   graph[v][1]
  52: #define RSIB(v) graph[v][2]
  53: #define REACH(v)    graph[v][3]
  54: #define LCHILD(v,i) *lchild(v,i)
  55: #define CHILDNUM(v) childper[NTYPE(v)]
  56: #define ARC(v,i)    *arc(v,i)
  57: #define ARCNUM(v)   *((arcsper[NTYPE(v)] >= 0) ? &arcsper[NTYPE(v)]: &graph[v][-arcsper[NTYPE(v)]])
  58: 
  59: /* STLNVX, FMTVX parts */
  60: #define BEGCODE(v)  *stlfmt(v,0)        /* 1st char of line on disk or address of string */
  61: #define ONDISK(v)   *stlfmt(v,1)        /* FALSE if in core,# of lines on disk otherwise */
  62: #define CODELINES(v)        *vxpart(v,STLNVX,2)     /* # of statements stored in node */
  63: 
  64: /* IOVX parts */
  65: #define FMTREF(v)   *vxpart(v,IOVX,0)   /* FMTVX associated with i/o statememt */
  66: #define PRERW(v)    *vxpart(v,IOVX,1)   /* string occurring in i/o statement before parts with labels */
  67: #define POSTRW(v)   *vxpart(v,IOVX,2)   /* string occurring in i/o statement after parts wih labels */
  68: #define ENDEQ   1       /* arc number associated with endeq */
  69: #define ERREQ   2       /* arc number associated wth erreq */
  70: 
  71: /* ITERVX parts */
  72: #define NXT(v)  *vxpart(v,ITERVX,0)     /* THENVX containing condition for iteration for WHILE or UNTIL */
  73: #define FATH(v) *vxpart(v,ITERVX,1)     /* father of v */
  74: #define LPRED(v) *vxpart(v,ITERVX,2)        /* loop predicate for WHILE, UNTIL */
  75: 
  76: /*DOVX parts */
  77: #define INC(v)  *vxpart(v,DOVX,0)       /* string for iteration condition of DO */
  78: 
  79: /* IFVX,THENVX parts */
  80: #define PRED(v)     *predic(v)  /* string containing predicate */
  81: #define NEG(v)          *negpart(v)     /* TRUE if predicate negated */
  82: #define THEN    0       /* arc number of true branch */
  83: #define ELSE 1      /* arc number of false branch */
  84: 
  85: /* miscellaneous parts */
  86: #define EXP(v)  *expres(v)      /* expression - ASVX, COMPVX, ASGOVX, SWCHVX, ICASVX */
  87: #define LABREF(v)   *vxpart(v,ASVX,1)       /* node referred to by label in ASSIGN statement */
  88: 
  89: 
  90: /* BRKVX, NXTVX parts */
  91: #define LEVEL(v)    *level(v)
  92: 
  93: /* also COMPVX, ASGOVX, SWCHVX, and DUMVX contain wd for number of arcs */
  94: /* location of this wd specified by negative entry in arcsper */
  95: extern int arcsper[TYPENUM];
  96: 
  97: /* also nodes contain wds for children as specified by childper */
  98: extern childper[TYPENUM];
  99: 
 100: 
 101: /* switches */
 102: extern int intcase, arbcase, whiloop, invelse, exitsize, maxnode,
 103:     maxhash, progress, labinit, labinc, inputform, debug,levbrk,levnxt,mkunt;
 104: 
 105: /* arrays */
 106: extern int *after;
 107: extern char *typename[];
 108: 
 109: struct list {
 110:     VERT elt;
 111:     struct list *nxtlist;
 112:     };
 113: struct list *append(), *consl();
 114: extern VERT retvert, stopvert;  /* specifies unique return and stop vertices */
 115: extern VERT START;
 116: extern int progtype;        /* type of program - main or sub or blockdata */
 117: #define sub 1
 118: #define blockdata   2
 119: 
 120: extern FILE *infd, *debfd, *outfd;

Defined struct's

Defined macros

BEGCODE defined in line 60; used 6 times
ENDEQ defined in line 68; used 4 times
ERREQ defined in line 69; used 4 times
FIXED defined in line 49; used 33 times
INC defined in line 77; used 2 times
IOVX defined in line 21; used 5 times
LABREF defined in line 87; used 2 times
LEVEL defined in line 91; used 6 times
LPRED defined in line 74; used 5 times
ONDISK defined in line 61; used 7 times
POSTRW defined in line 67; used 2 times
PRED defined in line 80; used 3 times
PRERW defined in line 66; used 2 times
THENVX defined in line 30; never used
TYPENUM defined in line 41; used 9 times
UNTVX defined in line 28; used 2 times
WHIVX defined in line 27; used 1 times
sub defined in line 117; used 3 times

Usage of this include

Last modified: 1987-02-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3192
Valid CSS Valid XHTML 1.0 Strict