1: /*	manifest.h	4.1	85/03/19	*/
   2: 
   3: #ifndef _MANIFEST_
   4: #define _MANIFEST_
   5: 
   6: #include <stdio.h>
   7: #include "pcclocal.h"
   8: #include "config.h"
   9: 
  10: #define DSIZE   (MAXOP+1)   /* DSIZE is the size of the dope array */
  11: 
  12: #define NOLAB   (-1)        /* no label with constant */
  13: 
  14: /*
  15:  * Node types
  16:  */
  17: #define LTYPE   02      /* leaf */
  18: #define UTYPE   04      /* unary */
  19: #define BITYPE  010     /* binary */
  20: 
  21: /*
  22:  * Bogus type values
  23:  */
  24: #define TNULL   PTR     /* pointer to UNDEF */
  25: #define TVOID   FTN     /* function returning UNDEF (for void) */
  26: 
  27: /*
  28:  * Type packing constants
  29:  */
  30: #define TMASK   060     /* mask for 1st component of compound type */
  31: #define TMASK1  0300        /* mask for 2nd component of compound type */
  32: #define TMASK2  0360        /* mask for 3rd component of compound type */
  33: #define BTMASK  017     /* basic type mask */
  34: #define BTSHIFT 4       /* basic type shift */
  35: #define TSHIFT  2       /* shift count to get next type component */
  36: 
  37: /*
  38:  * Type manipulation macros
  39:  */
  40: #define MODTYPE(x,y)    x = ((x)&(~BTMASK))|(y) /* set basic type of x to y */
  41: #define BTYPE(x)    ((x)&BTMASK)        /* basic type of x */
  42: #define ISUNSIGNED(x)   ((x)<=ULONG&&(x)>=UCHAR)
  43: #define UNSIGNABLE(x)   ((x)<=LONG&&(x)>=CHAR)
  44: #define ENUNSIGN(x) ((x)+(UNSIGNED-INT))
  45: #define DEUNSIGN(x) ((x)+(INT-UNSIGNED))
  46: #define ISPTR(x)    (((x)&TMASK)==PTR)
  47: #define ISFTN(x)    (((x)&TMASK)==FTN)  /* is x a function type */
  48: #define ISARY(x)    (((x)&TMASK)==ARY)  /* is x an array type */
  49: #define INCREF(x)   ((((x)&~BTMASK)<<TSHIFT)|PTR|((x)&BTMASK))
  50: #define DECREF(x)   ((((x)>>TSHIFT)&~BTMASK)|( (x)&BTMASK))
  51: /* advance x to a multiple of y */
  52: #define SETOFF(x,y) if ((x)%(y) != 0) (x) = (((x)/(y) + 1) * (y))
  53: /* can y bits be added to x without overflowing z */
  54: #define NOFIT(x,y,z)    (((x)%(z) + (y)) > (z))
  55: 
  56: /*
  57:  * Pack and unpack field descriptors (size and offset)
  58:  */
  59: #define PKFIELD(s,o)    (((o)<<6)| (s))
  60: #define UPKFSZ(v)   ((v) &077)
  61: #define UPKFOFF(v)  ((v)>>6)
  62: 
  63: /*
  64:  * Operator information
  65:  */
  66: #define TYFLG   016
  67: #define ASGFLG  01
  68: #define LOGFLG  020
  69: 
  70: #define SIMPFLG 040
  71: #define COMMFLG 0100
  72: #define DIVFLG  0200
  73: #define FLOFLG  0400
  74: #define LTYFLG  01000
  75: #define CALLFLG 02000
  76: #define MULFLG  04000
  77: #define SHFFLG  010000
  78: #define ASGOPFLG 020000
  79: 
  80: #define SPFLG   040000
  81: 
  82: #define optype(o)   (dope[o]&TYFLG)
  83: #define asgop(o)    (dope[o]&ASGFLG)
  84: #define logop(o)    (dope[o]&LOGFLG)
  85: #define callop(o)   (dope[o]&CALLFLG)
  86: 
  87: /*
  88:  * External declarations, typedefs and the like
  89:  */
  90: #ifdef FLEXNAMES
  91: char    *hash();
  92: char    *savestr();
  93: char    *tstr();
  94: extern  int tstrused;
  95: extern  char *tstrbuf[];
  96: extern  char **curtstr;
  97: #define freetstr()  curtstr = tstrbuf, tstrused = 0
  98: #endif
  99: 
 100: extern  int nerrors;        /* number of errors seen so far */
 101: extern  int dope[];     /* a vector containing operator information */
 102: extern  char *opst[];       /* a vector containing names for ops */
 103: 
 104: typedef union ndu NODE;
 105: typedef unsigned int TWORD;
 106: #define NIL (NODE *)0
 107: 
 108: #ifndef ONEPASS
 109: #ifndef EXPR
 110: #define EXPR '.'
 111: #endif
 112: #ifndef BBEG
 113: #define BBEG '['
 114: #endif
 115: #ifndef BEND
 116: #define BEND ']'
 117: #endif
 118: #else
 119: #include "onepass.h"
 120: #endif
 121: #endif

Defined typedef's

Defined macros

ASGFLG defined in line 67; used 27 times
ASGOPFLG defined in line 78; used 13 times
BBEG defined in line 113; used 1 times
BEND defined in line 116; used 1 times
BTMASK defined in line 33; used 6 times
BTSHIFT defined in line 34; used 2 times
CALLFLG defined in line 75; used 7 times
COMMFLG defined in line 71; used 12 times
DEUNSIGN defined in line 45; used 2 times
DIVFLG defined in line 72; used 8 times
DSIZE defined in line 10; used 4 times
ENUNSIGN defined in line 44; used 1 times
EXPR defined in line 110; used 1 times
FLOFLG defined in line 73; used 12 times
INCREF defined in line 49; used 6 times
ISUNSIGNED defined in line 42; used 13 times
LOGFLG defined in line 68; used 17 times
LTYFLG defined in line 74; never used
MODTYPE defined in line 40; used 1 times
MULFLG defined in line 76; used 8 times
NIL defined in line 106; used 89 times
NOFIT defined in line 54; never used
PKFIELD defined in line 59; used 1 times
SHFFLG defined in line 77; used 8 times
SIMPFLG defined in line 70; used 14 times
SPFLG defined in line 80; used 4 times
TMASK defined in line 30; used 10 times
TMASK1 defined in line 31; never used
TMASK2 defined in line 32; never used
TNULL defined in line 24; used 11 times
TSHIFT defined in line 35; used 4 times
TVOID defined in line 25; used 1 times
TYFLG defined in line 66; used 5 times
UNSIGNABLE defined in line 43; used 1 times
UPKFOFF defined in line 61; used 4 times
UPKFSZ defined in line 60; used 2 times
UTYPE defined in line 18; used 21 times
_MANIFEST_ defined in line 4; used 1 times
  • in line 3
callop defined in line 85; used 2 times
freetstr defined in line 97; used 1 times
logop defined in line 84; used 5 times

Usage of this include

Last modified: 1985-03-19
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1732
Valid CSS Valid XHTML 1.0 Strict