1: /*	dc.h	1.3	86/04/26	*/
   2: 
   3: #define FATAL 0
   4: #define NFATAL 1
   5: #define BLK sizeof(struct blk)
   6: #define PTRSZ sizeof(int *)
   7: #define HEADSZ 1024
   8: #define STKSZ 100
   9: #define RDSKSZ 100
  10: #define TBLSZ 256
  11: #define ARRAYST 0241
  12: #define MAXIND 2048
  13: #define NL 1
  14: #define NG 2
  15: #define NE 3
  16: #define length(p) ((p)->wt-(p)->beg)
  17: #define rewind(p) (p)->rd=(p)->beg
  18: #define create(p)   (p)->rd = (p)->wt = (p)->beg
  19: #define fsfile(p)   (p)->rd = (p)->wt
  20: #define truncate(p) (p)->wt = (p)->rd
  21: #define sfeof(p)    (((p)->rd==(p)->wt)?1:0)
  22: #define sfbeg(p)    (((p)->rd==(p)->beg)?1:0)
  23: #define sungetc(p,c)    *(--(p)->rd)=c
  24: #ifdef interdata
  25: #define NEGBYTE 0200
  26: #define MASK (-1 & ~0377)
  27: #define sgetc(p)    ( ((p)->rd==(p)->wt) ? EOF :( ((*(p)->rd & NEGBYTE) != 0) ? ( *(p)->rd++ | MASK): *(p)->rd++ ))
  28: #define slookc(p)   ( ((p)->rd==(p)->wt) ? EOF :( ((*(p)->rd & NEGBYTE) != 0) ? (*(p)->rd | MASK) : *(p)->rd ))
  29: #define sbackc(p)   ( ((p)->rd==(p)->beg) ? EOF :( ((*(--(p)->rd) & NEGBYTE) != 0) ? (*(p)->rd | MASK): *(p)->rd ))
  30: #endif
  31: #ifndef interdata
  32: #define sgetc(p)    (((p)->rd==(p)->wt)?EOF:*(p)->rd++)
  33: #define slookc(p)   (((p)->rd==(p)->wt)?EOF:*(p)->rd)
  34: #define sbackc(p)   (((p)->rd==(p)->beg)?EOF:*(--(p)->rd))
  35: #endif
  36: #define sputc(p,c)  {if((p)->wt==(p)->last)more(p); *(p)->wt++ = c; }
  37: #define salterc(p,c)    {if((p)->rd==(p)->last)more(p); *(p)->rd++ = c; if((p)->rd>(p)->wt)(p)->wt=(p)->rd;}
  38: #define sunputc(p)  (*( (p)->rd = --(p)->wt))
  39: #define zero(p) for(pp=(p)->beg;pp<(p)->last;)*pp++='\0'
  40: #define OUTC(x) {printf("%c",x); if(--count == 0){printf("\\\n"); count=ll;} }
  41: #define TEST2   {if((count -= 2) <=0){printf("\\\n");count=ll;}}
  42: #define EMPTY if(stkerr != 0){printf("stack empty\n"); continue; }
  43: #define EMPTYR(x) if(stkerr!=0){pushp(x);printf("stack empty\n");continue;}
  44: #define EMPTYS if(stkerr != 0){printf("stack empty\n"); return(1);}
  45: #define EMPTYSR(x) if(stkerr !=0){printf("stack empty\n");pushp(x);return(1);}
  46: #define error(p)    {printf(p); continue; }
  47: #define errorrt(p)  {printf(p); return(1); }
  48: struct blk {
  49:     char    *rd;
  50:     char    *wt;
  51:     char    *beg;
  52:     char    *last;
  53: };
  54: struct  blk *hfree;
  55: struct  blk *getwd();
  56: struct  blk *lookwd();
  57: struct  blk *getdec();
  58: struct  blk *morehd();
  59: 
  60: struct  blk *arg1, *arg2;
  61: int svargc;
  62: char    savk;
  63: char    **svargv;
  64: int dbg;
  65: int ifile;
  66: FILE    *curfile;
  67: struct  blk *scalptr, *basptr, *tenptr, *inbas;
  68: struct  blk *sqtemp, *chptr, *strptr, *divxyz;
  69: struct  blk *stack[STKSZ];
  70: struct  blk **stkptr,**stkbeg;
  71: struct  blk **stkend;
  72: int stkerr;
  73: int lastchar;
  74: struct  blk *readstk[RDSKSZ];
  75: struct  blk **readptr;
  76: struct  blk *rem;
  77: int k;
  78: struct  blk *irem;
  79: int skd,skr;
  80: struct  blk *pop(),*readin(),*add0(),*mult();
  81: struct  blk *scalint();
  82: struct  blk *removc();
  83: struct  blk *add(),*div(),*removr();
  84: struct  blk *exp();
  85: struct  blk *sqrt();
  86: struct  blk *salloc(),*copy();
  87: struct  blk *scale();
  88: int neg;
  89: struct  sym {
  90:     struct  sym *next;
  91:     struct  blk *val;
  92: } symlst[TBLSZ];
  93: struct  sym *stable[TBLSZ];
  94: struct  sym *sptr,*sfree;
  95: struct  wblk {
  96:     struct blk **rdw;
  97:     struct blk **wtw;
  98:     struct blk **begw;
  99:     struct blk **lastw;
 100: };
 101: FILE    *fsave;
 102: long    rel;
 103: long    nbytes;
 104: long    all;
 105: long    headmor;
 106: long    obase;
 107: int fw,fw1,ll;
 108: int (*outdit)();
 109: int bigot(),hexot();
 110: int ;
 111: int log10;
 112: int count;
 113: char    *pp;
 114: int (*signal())();
 115: int onintr();
 116: char    *malloc();
 117: char    *nalloc();
 118: char    *realloc();

Defined variables

all defined in line 104; used 4 times
arg1 defined in line 60; used 30 times
arg2 defined in line 60; used 16 times
basptr defined in line 67; used 8 times
chptr defined in line 68; used 4 times
count defined in line 112; used 5 times
dbg defined in line 64; used 1 times
divxyz defined in line 68; used 7 times
fw defined in line 107; used 7 times
fw1 defined in line 107; used 4 times
headmor defined in line 105; used 3 times
hfree defined in line 54; used 11 times
ifile defined in line 65; used 1 times
inbas defined in line 67; used 8 times
irem defined in line 78; used 8 times
k defined in line 77; used 14 times
lastchar defined in line 73; used 4 times
ll defined in line 107; used 8 times
log10 defined in line 111; used 2 times
defined in line 110; used 2 times
nbytes defined in line 103; used 12 times
neg defined in line 88; used 9 times
obase defined in line 106; used 8 times
pp defined in line 113; used 3 times
  • in line 39(3)
readptr defined in line 75; used 40 times
readstk defined in line 74; used 9 times
rel defined in line 102; used 3 times
rem defined in line 76; used 22 times
savk defined in line 62; used 27 times
scalptr defined in line 67; used 6 times
sfree defined in line 94; used 15 times
skd defined in line 79; used 4 times
skr defined in line 79; used 5 times
sptr defined in line 94; used 31 times
sqtemp defined in line 68; used 4 times
stable defined in line 93; used 11 times
stack defined in line 69; used 9 times
stkbeg defined in line 70; used 2 times
stkend defined in line 71; used 2 times
stkerr defined in line 72; used 9 times
stkptr defined in line 70; used 17 times
strptr defined in line 68; used 24 times
svargc defined in line 61; used 4 times
svargv defined in line 63; used 6 times
symlst defined in line 92; used 3 times
tenptr defined in line 67; used 8 times

Defined struct's

blk defined in line 48; used 220 times
sym defined in line 89; used 12 times
wblk defined in line 95; used 14 times

Defined macros

ARRAYST defined in line 11; used 6 times
BLK defined in line 5; used 1 times
EMPTY defined in line 42; used 15 times
EMPTYR defined in line 43; used 2 times
EMPTYS defined in line 44; used 3 times
EMPTYSR defined in line 45; used 2 times
FATAL defined in line 3; never used
HEADSZ defined in line 7; used 4 times
MASK defined in line 26; used 3 times
MAXIND defined in line 12; used 2 times
NE defined in line 15; used 3 times
NEGBYTE defined in line 25; used 3 times
NFATAL defined in line 4; never used
NG defined in line 14; used 2 times
NL defined in line 13; used 2 times
OUTC defined in line 40; used 9 times
PTRSZ defined in line 6; used 13 times
RDSKSZ defined in line 9; used 3 times
STKSZ defined in line 8; used 2 times
TBLSZ defined in line 10; used 4 times
TEST2 defined in line 41; used 3 times
create defined in line 18; used 7 times
error defined in line 46; used 19 times
errorrt defined in line 47; used 2 times
fsfile defined in line 19; used 32 times
length defined in line 16; used 56 times
rewind defined in line 17; used 30 times
salterc defined in line 37; used 15 times
sbackc defined in line 34; used 50 times
sfbeg defined in line 22; used 29 times
sfeof defined in line 21; used 26 times
sgetc defined in line 32; used 26 times
slookc defined in line 33; used 5 times
sputc defined in line 36; used 69 times
sungetc defined in line 23; used 1 times
sunputc defined in line 38; used 16 times
truncate defined in line 20; used 6 times
zero defined in line 39; used 3 times

Usage of this include

dc.h used 1 times
Last modified: 1986-04-26
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1896
Valid CSS Valid XHTML 1.0 Strict