1: #define FATAL 0
2: #define NFATAL 1
3: #define BLK sizeof(struct blk)
4: #define PTRSZ sizeof(int *)
5: #define HEADSZ 1024
6: #define STKSZ 100
7: #define RDSKSZ 100
8: #define TBLSZ 256
9: #define ARRAYST 0241
10: #define MAXIND 2048
11: #define NL 1
12: #define NG 2
13: #define NE 3
14: #define length(p) ((p)->wt-(p)->beg)
15: #define rewind(p) (p)->rd=(p)->beg
16: #define create(p) (p)->rd = (p)->wt = (p)->beg
17: #define fsfile(p) (p)->rd = (p)->wt
18: #define truncate(p) (p)->wt = (p)->rd
19: #define sfeof(p) (((p)->rd==(p)->wt)?1:0)
20: #define sfbeg(p) (((p)->rd==(p)->beg)?1:0)
21: #define sungetc(p,c) *(--(p)->rd)=c
22: #ifdef interdata
23: #define NEGBYTE 0200
24: #define MASK (-1 & ~0377)
25: #define sgetc(p) ( ((p)->rd==(p)->wt) ? EOF :( ((*(p)->rd & NEGBYTE) != 0) ? ( *(p)->rd++ | MASK): *(p)->rd++ ))
26: #define slookc(p) ( ((p)->rd==(p)->wt) ? EOF :( ((*(p)->rd & NEGBYTE) != 0) ? (*(p)->rd | MASK) : *(p)->rd ))
27: #define sbackc(p) ( ((p)->rd==(p)->beg) ? EOF :( ((*(--(p)->rd) & NEGBYTE) != 0) ? (*(p)->rd | MASK): *(p)->rd ))
28: #endif
29: #ifndef interdata
30: #define sgetc(p) (((p)->rd==(p)->wt)?EOF:*(p)->rd++)
31: #define slookc(p) (((p)->rd==(p)->wt)?EOF:*(p)->rd)
32: #define sbackc(p) (((p)->rd==(p)->beg)?EOF:*(--(p)->rd))
33: #endif
34: #define sputc(p,c) {if((p)->wt==(p)->last)more(p); *(p)->wt++ = c; }
35: #define salterc(p,c) {if((p)->rd==(p)->last)more(p); *(p)->rd++ = c; if((p)->rd>(p)->wt)(p)->wt=(p)->rd;}
36: #define sunputc(p) (*( (p)->rd = --(p)->wt))
37: #define zero(p) for(pp=(p)->beg;pp<(p)->last;)*pp++='\0'
38: #define OUTC(x) {printf("%c",x); if(--count == 0){printf("\\\n"); count=ll;} }
39: #define TEST2 {if((count -= 2) <=0){printf("\\\n");count=ll;}}
40: #define EMPTY if(stkerr != 0){printf("stack empty\n"); continue; }
41: #define EMPTYR(x) if(stkerr!=0){pushp(x);printf("stack empty\n");continue;}
42: #define EMPTYS if(stkerr != 0){printf("stack empty\n"); return(1);}
43: #define EMPTYSR(x) if(stkerr !=0){printf("stack empty\n");pushp(x);return(1);}
44: #define error(p) {printf(p); continue; }
45: #define errorrt(p) {printf(p); return(1); }
46: struct blk {
47: char *rd;
48: char *wt;
49: char *beg;
50: char *last;
51: };
52: struct blk *hfree;
53: struct blk *getwd();
54: struct blk *lookwd();
55: struct blk *getdec();
56: struct blk *morehd();
57:
58: struct blk *arg1, *arg2;
59: int svargc;
60: char savk;
61: char **svargv;
62: int dbg;
63: int ifile;
64: FILE *curfile;
65: struct blk *scalptr, *basptr, *tenptr, *inbas;
66: struct blk *sqtemp, *chptr, *strptr, *divxyz;
67: struct blk *stack[STKSZ];
68: struct blk **stkptr,**stkbeg;
69: struct blk **stkend;
70: int stkerr;
71: int lastchar;
72: struct blk *readstk[RDSKSZ];
73: struct blk **readptr;
74: struct blk *rem;
75: int k;
76: struct blk *irem;
77: int skd,skr;
78: struct blk *pop(),*readin(),*add0(),*mult();
79: struct blk *scalint();
80: struct blk *removc();
81: struct blk *add(),*div(),*removr();
82: struct blk *exp();
83: struct blk *sqrt();
84: struct blk *salloc(),*copy();
85: struct blk *scale();
86: int neg;
87: struct sym {
88: struct sym *next;
89: struct blk *val;
90: } symlst[TBLSZ];
91: struct sym *stable[TBLSZ];
92: struct sym *sptr,*sfree;
93: struct wblk {
94: struct blk **rdw;
95: struct blk **wtw;
96: struct blk **begw;
97: struct blk **lastw;
98: };
99: FILE *fsave;
100: long rel;
101: long nbytes;
102: long all;
103: long headmor;
104: long obase;
105: int fw,fw1,ll;
106: int (*outdit)();
107: int bigot(),hexot();
108: int logo;
109: int log10;
110: int count;
111: char *pp;
112: int (*signal())();
113: int onintr();
114: char *malloc();
115: char *nalloc();
116: char *realloc();
117: char *dummy;
Defined variables
all
defined in line
102; used 4 times
arg1
defined in line
58; used 30 times
arg2
defined in line
58; used 16 times
chptr
defined in line
66; used 4 times
dbg
defined in line
62; used 1 times
fw
defined in line
105; used 7 times
fw1
defined in line
105; used 4 times
hfree
defined in line
52; used 11 times
ifile
defined in line
63; used 1 times
inbas
defined in line
65; used 8 times
irem
defined in line
76; used 8 times
k
defined in line
75; used 14 times
ll
defined in line
105; used 8 times
logo
defined in line
108; used 2 times
neg
defined in line
86; used 9 times
pp
defined in line
111; used 3 times
rel
defined in line
100; used 3 times
rem
defined in line
74; used 22 times
- in /usr/src/cmd/dc/dc.c line
79,
87-91(3),
586,
694,
746-748(4),
786-789(2),
829-830(2),
1219,
1273,
1388-1390(4),
1508,
1537
savk
defined in line
60; used 27 times
sfree
defined in line
92; used 15 times
skd
defined in line
77; used 4 times
skr
defined in line
77; used 5 times
sptr
defined in line
92; used 31 times
stable
defined in line
91; used 11 times
stack
defined in line
67; used 9 times
stkptr
defined in line
68; used 17 times
strptr
defined in line
66; used 24 times
Defined struct's
blk
defined in line
46; used 220 times
- in line 52-58(12),
65-97(44)
- in /usr/src/cmd/dc/dc.c line
13-16(4),
523(2),
576-584(8),
698-699(4),
726-731(6),
755-760(8),
806-811(8),
931(2),
941(2),
949-951(4),
997-1003(6),
1022-1026(6),
1079(2),
1147(2),
1167-1170(4),
1246-1251(6),
1279(2),
1328-1331(4),
1347(2),
1366-1368(4),
1416-1420(6),
1464(2),
1492-1496(6),
1514-1516(4),
1523-1527(6),
1584(2),
1624-1625(4),
1635(2),
1667-1671(4),
1682-1695(10),
1712-1717(6),
1733(2),
1743(2),
1752(2),
1777(2),
1785(2),
1819(2),
1862(2),
1885(2),
1894-1896(4),
1907(2),
1917-1919(4)
sym
defined in line
87; used 12 times
wblk
defined in line
93; used 14 times
Defined macros
BLK
defined in line
3; used 1 times
EMPTY
defined in line
40; used 15 times
- in /usr/src/cmd/dc/dc.c line
55,
100,
123,
181,
208,
220,
292,
309,
320,
360,
392,
450,
487,
493,
529
FATAL
defined in line
1;
never used
HEADSZ
defined in line
5; used 4 times
MASK
defined in line
24; used 3 times
NE
defined in line
13; used 3 times
NFATAL
defined in line
2;
never used
NG
defined in line
12; used 2 times
NL
defined in line
11; used 2 times
OUTC
defined in line
38; used 9 times
PTRSZ
defined in line
4; used 13 times
RDSKSZ
defined in line
7; used 3 times
STKSZ
defined in line
6; used 2 times
TBLSZ
defined in line
8; used 4 times
TEST2
defined in line
39; used 3 times
error
defined in line
44; used 19 times
- in /usr/src/cmd/dc/dc.c line
108,
124,
132,
295,
322-331(3),
383,
402-405(2),
433,
455-462(3),
498-505(3),
535,
548
fsfile
defined in line
17; used 32 times
- in /usr/src/cmd/dc/dc.c line
183,
225,
232,
261,
310,
452,
495,
594,
601,
612,
621,
680,
686,
706-708(2),
764,
774,
794,
817,
1031,
1040,
1097,
1106,
1184,
1193,
1222,
1283,
1379,
1400,
1446,
1452,
1611
length
defined in line
14; used 56 times
- in /usr/src/cmd/dc/dc.c line
102,
131,
182,
214,
223,
231,
260,
273,
294,
303,
321,
371,
457,
477,
500,
512-516(2),
588,
596-600(2),
607(2),
763,
790,
815-816(2),
825-829(2),
836,
843,
1005,
1035,
1044-1049(3),
1191,
1215,
1254-1258(3),
1265,
1336,
1375-1378(2),
1384,
1395,
1406,
1425(4),
1590,
1631,
1637,
1644,
1723
rewind
defined in line
15; used 30 times
- in /usr/src/cmd/dc/dc.c line
137,
297,
324,
412,
440,
541,
632-633(2),
641,
668,
733,
746,
848,
1010,
1051-1055(3),
1085,
1173-1176(2),
1240,
1253,
1267,
1350,
1388,
1427-1428(2),
1498,
1632,
1842
sbackc
defined in line
32; used 50 times
- in /usr/src/cmd/dc/dc.c line
107,
127,
184-190(3),
226,
233-236(2),
262,
311,
454,
460,
497,
503,
595,
602,
613-625(6),
655-657(2),
682,
688,
710,
765-766(2),
775,
795,
820,
1034,
1043,
1098-1099(2),
1107,
1185,
1194,
1223,
1286,
1298,
1314,
1321,
1380,
1402,
1448-1454(3),
1612
sfbeg
defined in line
20; used 29 times
- in /usr/src/cmd/dc/dc.c line
127,
185-188(2),
236,
454,
460,
497,
503,
602,
615-617(2),
623-625(2),
681,
687,
710(2),
766,
795,
818,
1033,
1042,
1186,
1223,
1285,
1402,
1447-1453(3)
sfeof
defined in line
19; used 26 times
- in /usr/src/cmd/dc/dc.c line
139,
298,
413,
441,
635,
644-646(2),
670,
741,
747,
1011,
1052,
1058-1060(2),
1067,
1086,
1115,
1174-1177(2),
1241,
1351,
1389,
1431-1432(2),
1504,
1633
sgetc
defined in line
30; used 26 times
- in /usr/src/cmd/dc/dc.c line
138-140(2),
298,
325,
636,
646,
737-741(2),
747,
849,
1012,
1053,
1059,
1115,
1175-1178(2),
1241,
1260,
1268,
1356,
1389,
1431-1432(2),
1457,
1500-1504(2)
sputc
defined in line
34; used 69 times
- in /usr/src/cmd/dc/dc.c line
43,
71,
87,
95,
103,
117,
148-157(3),
163-164(2),
172-176(3),
199-203(3),
215,
258,
274,
285,
304,
314-315(2),
361,
395,
555-558(3),
610,
711,
737-741(2),
747,
779,
814,
851,
888-890(2),
897-902(3),
979,
989,
1007-1012(2),
1096,
1102,
1162,
1260,
1268-1269(2),
1335,
1352,
1362,
1389,
1398-1413(6),
1443-1445(2),
1504,
1531,
1538,
1546,
1650
sunputc
defined in line
36; used 16 times
- in /usr/src/cmd/dc/dc.c line
41,
58-62(3),
101,
124,
134,
707-709(2),
1192,
1409,
1472-1473(2),
1519,
1544,
1589
zero
defined in line
37; used 3 times
Usage of this include