# 2.11BSD#431 - /usr/src/usr.bin/dc/dc.h

##### Variables

    all               X
    arg1              X
    arg2              X
    basptr            X
    chptr             X
    count             X
    dbg               X
    divxyz            X
    fw                X
    fw1               X
    headmor           X
    hfree             X
    ifile             X
    inbas             X
    irem              X
    k                 X
    lastchar          X
    ll                X
    log10             X
    logo              X
    nbytes            X
    neg               X
    obase             X
    pp                X
    readptr           X
    readstk           X
    rel               X
    rem               X
    savk              X
    scalptr           X
    sfree             X
    skd               X
    skr               X
    sptr              X
    sqtemp            X
    stable            X
    stack             X
    stkbeg            X
    stkend            X
    stkerr            X
    stkptr            X
    strptr            X
    svargc            X
    svargv            X
    symlst            X
    tenptr            X

##### Macros

    ARRAYST           X
    BLK               X
    EMPTY             X
    EMPTYR            X
    EMPTYS            X
    EMPTYSR           X
    FATAL             X
    HEADSZ            X
    MASK              X
    MAXIND            X
    NE                X
    NEGBYTE           X
    NFATAL            X
    NG                X
    NL                X
    OUTC              X
    PTRSZ             X
    RDSKSZ            X
    STKSZ             X
    TBLSZ             X
    TEST2             X
    create            X
    error             X
    errorrt           X
    fsfile            X
    length            X
    rewind            X
    salterc           X
    sbackc            X
    sfbeg             X
    sfeof             X
    sgetc             X
    slookc            X
    sputc             X
    sungetc           X
    sunputc           X
    truncate          X
    zero              X

##### struct's

    blk               X
    sym               X
    wblk              X

       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 logo;
     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

- in /usr/src/usr.bin/dc/dc.c line 41, 1680, 1728, 1815

arg1 defined in line 60; used 30 times

- in /usr/src/usr.bin/dc/dc.c line 59-63(3), 120-121(2), 127-147(13), 726, 1155-1164(4), 1479, 1492, 1546-1551(5)

arg2 defined in line 60; used 16 times

- in /usr/src/usr.bin/dc/dc.c line 61-64(2), 121-123(3), 130, 139-141(3), 727, 1155-1165(4), 1480, 1493

basptr defined in line 67; used 8 times

- in /usr/src/usr.bin/dc/dc.c line 246-248(2), 278(2), 893-894(2), 1220, 1237

chptr defined in line 68; used 4 times

- in /usr/src/usr.bin/dc/dc.c line 907, 982-986(3)

count defined in line 112; used 5 times

- in line 40-41(4)
- in /usr/src/usr.bin/dc/dc.c line 1194

dbg defined in line 64; used 1 times

- in /usr/src/usr.bin/dc/dc.c line 880

divxyz defined in line 68; used 7 times

- in /usr/src/usr.bin/dc/dc.c line 638-651(6), 909

fw defined in line 107; used 7 times

- in /usr/src/usr.bin/dc/dc.c line 253, 271-275(4), 898, 1379

fw1 defined in line 107; used 4 times

- in /usr/src/usr.bin/dc/dc.c line 254, 272, 899, 1399

headmor defined in line 105; used 3 times

- in /usr/src/usr.bin/dc/dc.c line 41, 1697, 1815

hfree defined in line 54; used 11 times

- in /usr/src/usr.bin/dc/dc.c line 1688-1689(2), 1699-1708(5), 1739-1740(2), 1890-1891(2)

ifile defined in line 65; used 1 times

- in /usr/src/usr.bin/dc/dc.c line 885

inbas defined in line 67; used 8 times

- in /usr/src/usr.bin/dc/dc.c line 215-219(4), 903-904(2), 984, 1536

irem defined in line 78; used 8 times

- in /usr/src/usr.bin/dc/dc.c line 83(2), 91, 97-99(2), 724, 754-757(2)

k defined in line 77; used 14 times

- in /usr/src/usr.bin/dc/dc.c line 69-72(3), 92-96(2), 115-118(3), 149(2), 303, 720, 728, 914

lastchar defined in line 73; used 4 times

- in /usr/src/usr.bin/dc/dc.c line 1119-1125(4)

ll defined in line 107; used 8 times

- in line 40-41(2)
- in /usr/src/usr.bin/dc/dc.c line 255, 273-275(3), 897, 1194

log10 defined in line 111; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 896, 1215

logo defined in line 110; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 244, 1216

nbytes defined in line 103; used 12 times

- in /usr/src/usr.bin/dc/dc.c line 42, 1681, 1698, 1729, 1765, 1797, 1816, 1889, 1930-1939(4)

neg defined in line 88; used 9 times

- in /usr/src/usr.bin/dc/dc.c line 126, 133, 148, 165, 1374, 1381-1385(2), 1400, 1412

obase defined in line 106; used 8 times

- in /usr/src/usr.bin/dc/dc.c line 245-247(2), 895, 902, 1202-1210(4)

pp defined in line 113; used 3 times

- in line 39(3)

readptr defined in line 75; used 40 times

- in /usr/src/usr.bin/dc/dc.c line 335-347(11), 535-545(8), 552-555(2), 566, 913, 927-929(4), 1118-1128(10), 1142-1143(3)

readstk defined in line 74; used 9 times

- in /usr/src/usr.bin/dc/dc.c line 335, 343, 535-539(2), 552, 913, 927, 1118, 1142

rel defined in line 102; used 3 times

- in /usr/src/usr.bin/dc/dc.c line 41, 1815, 1888

rem defined in line 76; used 22 times

- in /usr/src/usr.bin/dc/dc.c line 84, 92-96(3), 591, 699, 751-753(4), 791-794(2), 834-835(2), 1223, 1277, 1392-1394(4), 1512, 1541

savk defined in line 62; used 27 times

- in /usr/src/usr.bin/dc/dc.c line 46-48(2), 68-76(7), 106-108(2), 115-122(5), 139, 146-150(3), 728, 1166, 1481-1489(3), 1548-1550(2)

scalptr defined in line 67; used 6 times

- in /usr/src/usr.bin/dc/dc.c line 304-308(4), 891-892(2)

sfree defined in line 94; used 15 times

- in /usr/src/usr.bin/dc/dc.c line 392-394(4), 423-425(4), 441-442(2), 473-475(4), 921

skd defined in line 79; used 4 times

- in /usr/src/usr.bin/dc/dc.c line 96-100(2), 712, 720

skr defined in line 79; used 5 times

- in /usr/src/usr.bin/dc/dc.c line 92-96(2), 714-720(3)

sptr defined in line 94; used 31 times

- in /usr/src/usr.bin/dc/dc.c line 391-395(2), 413-415(3), 423-429(3), 436-443(6), 471-481(5), 494, 514-516(3), 915-920(5), 1631-1633(3)

sqtemp defined in line 68; used 4 times

- in /usr/src/usr.bin/dc/dc.c line 792, 831, 905-906(2)

stable defined in line 93; used 11 times

- in /usr/src/usr.bin/dc/dc.c line 391-392(2), 413, 423, 436-440(2), 471-473(2), 514, 1631, 1830

stack defined in line 69; used 9 times

- in /usr/src/usr.bin/dc/dc.c line 350-352(2), 358, 371, 387, 409, 910-911(2), 947

stkbeg defined in line 70; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 175, 910

stkend defined in line 71; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 911, 937

stkerr defined in line 72; used 9 times

- in line 42-45(4)
- in /usr/src/usr.bin/dc/dc.c line 381-383(2), 912, 941, 948

stkptr defined in line 70; used 17 times

- in /usr/src/usr.bin/dc/dc.c line 40, 175, 350-352(2), 358-360(2), 371-377(3), 387, 409, 910, 937-951(4), 1817

strptr defined in line 68; used 24 times

- in /usr/src/usr.bin/dc/dc.c line 908, 1214, 1226-1227(3), 1233, 1244-1245(3), 1338-1341(3), 1356, 1366, 1378-1379(2), 1402-1417(8)

svargc defined in line 61; used 4 times

- in /usr/src/usr.bin/dc/dc.c line 875-886(4)

svargv defined in line 63; used 6 times

- in /usr/src/usr.bin/dc/dc.c line 876-888(6)

symlst defined in line 92; used 3 times

- in /usr/src/usr.bin/dc/dc.c line 915-921(3)

tenptr defined in line 67; used 8 times

- in /usr/src/usr.bin/dc/dc.c line 749, 900-901(2), 1020, 1268, 1275, 1389, 1510

#### Defined struct's

blk defined in line 48; used 220 times

- in line 54-60(12), 67-99(44)
- in /usr/src/usr.bin/dc/dc.c line 18-21(4), 528(2), 581-589(8), 703-704(4), 731-736(6), 760-765(8), 811-816(8), 935(2), 945(2), 953-955(4), 1001-1007(6), 1026-1030(6), 1083(2), 1151(2), 1171-1174(4), 1250-1255(6), 1283(2), 1332-1335(4), 1351(2), 1370-1372(4), 1420-1424(6), 1468(2), 1496-1500(6), 1518-1520(4), 1527-1531(6), 1588(2), 1628-1629(4), 1639(2), 1671-1675(4), 1689-1702(10), 1719-1724(6), 1740(2), 1750(2), 1759(2), 1783(2), 1791(2), 1824(2), 1867(2), 1886(2), 1895-1897(4), 1908(2), 1918-1920(4)

sym defined in line 89; used 12 times

- in line 90-94(6)
- in /usr/src/usr.bin/dc/dc.c line 22(2), 870(2), 1825(2)

wblk defined in line 95; used 14 times

- in /usr/src/usr.bin/dc/dc.c line 1782(2), 1899-1901(4), 1910-1912(4), 1922-1924(4)

#### Defined macros

ARRAYST defined in line 11; used 6 times

- in /usr/src/usr.bin/dc/dc.c line 398, 416, 444, 1634, 1832, 1853

BLK defined in line 5; used 1 times

- in /usr/src/usr.bin/dc/dc.c line 1706

EMPTY defined in line 42; used 15 times

- in /usr/src/usr.bin/dc/dc.c line 60, 105, 128, 186, 213, 225, 297, 314, 325, 365, 397, 455, 492, 498, 534

EMPTYR defined in line 43; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 62, 131

EMPTYS defined in line 44; used 3 times

- in /usr/src/usr.bin/dc/dc.c line 708, 1473, 1547

EMPTYSR defined in line 45; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 710, 1475

FATAL defined in line 3; never used
HEADSZ defined in line 7; used 4 times

- in /usr/src/usr.bin/dc/dc.c line 1698-1706(4)

MASK defined in line 26; used 3 times

- in line 27-29(3)

MAXIND defined in line 12; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 466, 509

NE defined in line 15; used 3 times

- in /usr/src/usr.bin/dc/dc.c line 1568, 1596, 1610

NEGBYTE defined in line 25; used 3 times

- in line 27-29(3)

NFATAL defined in line 4; never used
NG defined in line 14; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 1566, 1618

NL defined in line 13; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 1564, 1619

OUTC defined in line 40; used 9 times

- in /usr/src/usr.bin/dc/dc.c line 1200, 1227, 1234, 1245, 1305-1313(3), 1325, 1344

PTRSZ defined in line 6; used 13 times

- in /usr/src/usr.bin/dc/dc.c line 399-400(2), 477-488(7), 517-518(3), 527

RDSKSZ defined in line 9; used 3 times

- in line 74
- in /usr/src/usr.bin/dc/dc.c line 539, 552

STKSZ defined in line 8; used 2 times

- in line 69
- in /usr/src/usr.bin/dc/dc.c line 911

TBLSZ defined in line 10; used 4 times

- in line 92-93(2)
- in /usr/src/usr.bin/dc/dc.c line 916, 1829

TEST2 defined in line 41; used 3 times

- in /usr/src/usr.bin/dc/dc.c line 1294, 1304, 1322

create defined in line 18; used 7 times

- in /usr/src/usr.bin/dc/dc.c line 851-858(3), 982, 1214, 1233, 1338

error defined in line 46; used 19 times

- in /usr/src/usr.bin/dc/dc.c line 113, 129, 137, 300, 327-336(3), 388, 407-410(2), 438, 460-467(3), 503-510(3), 540, 553

errorrt defined in line 47; used 2 times

- in /usr/src/usr.bin/dc/dc.c line 595, 718

fsfile defined in line 19; used 32 times

- in /usr/src/usr.bin/dc/dc.c line 188, 230, 237, 266, 315, 457, 500, 599, 606, 617, 626, 685, 691, 711-713(2), 769, 779, 799, 822, 1035, 1044, 1101, 1110, 1188, 1197, 1226, 1287, 1383, 1404, 1450, 1456, 1615

length defined in line 16; used 56 times

- in /usr/src/usr.bin/dc/dc.c line 107, 136, 187, 219, 228, 236, 265, 278, 299, 308, 326, 376, 462, 482, 505, 517-521(2), 593, 601-605(2), 612(2), 768, 795, 820-821(2), 830-834(2), 841, 848, 1009, 1039, 1048-1053(3), 1195, 1219, 1258-1262(3), 1269, 1340, 1379-1382(2), 1388, 1399, 1410, 1429(4), 1594, 1635, 1641, 1648, 1730

rewind defined in line 17; used 30 times

- in /usr/src/usr.bin/dc/dc.c line 142, 302, 329, 417, 445, 546, 637-638(2), 646, 673, 738, 751, 853, 1014, 1055-1059(3), 1089, 1177-1180(2), 1244, 1257, 1271, 1354, 1392, 1431-1432(2), 1502, 1636, 1847

salterc defined in line 37; used 15 times

- in /usr/src/usr.bin/dc/dc.c line 643-645(2), 657-667(4), 682-684(2), 783-786(2), 1067-1072(2), 1097, 1453, 1462

sbackc defined in line 34; used 50 times

- in /usr/src/usr.bin/dc/dc.c line 112, 132, 189-195(3), 231, 238-241(2), 267, 316, 459, 465, 502, 508, 600, 607, 618-630(6), 660-662(2), 687, 693, 715, 770-771(2), 780, 800, 825, 1038, 1047, 1102-1103(2), 1111, 1189, 1198, 1227, 1290, 1302, 1318, 1325, 1384, 1406, 1452-1458(3), 1616

sfbeg defined in line 22; used 29 times

- in /usr/src/usr.bin/dc/dc.c line 132, 190-193(2), 241, 459, 465, 502, 508, 607, 620-622(2), 628-630(2), 686, 692, 715(2), 771, 800, 823, 1037, 1046, 1190, 1227, 1289, 1406, 1451-1457(3)

sfeof defined in line 21; used 26 times

- in /usr/src/usr.bin/dc/dc.c line 144, 303, 418, 446, 640, 649-651(2), 675, 746, 752, 1015, 1056, 1062-1064(2), 1071, 1090, 1119, 1178-1181(2), 1245, 1355, 1393, 1435-1436(2), 1508, 1637

sgetc defined in line 32; used 26 times

- in /usr/src/usr.bin/dc/dc.c line 143-145(2), 303, 330, 641, 651, 742-746(2), 752, 854, 1016, 1057, 1063, 1119, 1179-1182(2), 1245, 1264, 1272, 1360, 1393, 1435-1436(2), 1461, 1504-1508(2)

slookc defined in line 33; used 5 times

- in /usr/src/usr.bin/dc/dc.c line 650, 676, 1064, 1071, 1091

sputc defined in line 36; used 69 times

- in /usr/src/usr.bin/dc/dc.c line 48, 76, 92, 100, 108, 122, 153-162(3), 168-169(2), 177-181(3), 204-208(3), 220, 263, 279, 290, 309, 319-320(2), 366, 400, 560-563(3), 615, 716, 742-746(2), 752, 784, 819, 856, 892-894(2), 901-906(3), 983, 993, 1011-1016(2), 1100, 1106, 1166, 1264, 1272-1273(2), 1339, 1356, 1366, 1393, 1402-1417(6), 1447-1449(2), 1508, 1535, 1542, 1550, 1654

sungetc defined in line 23; used 1 times

- in /usr/src/usr.bin/dc/dc.c line 1143

sunputc defined in line 38; used 16 times

- in /usr/src/usr.bin/dc/dc.c line 46, 63-67(3), 106, 129, 139, 712-714(2), 1196, 1413, 1476-1477(2), 1523, 1548, 1593

truncate defined in line 20; used 6 times

- in /usr/src/usr.bin/dc/dc.c line 687, 693, 1105, 1112, 1454, 1463

zero defined in line 39; used 3 times

- in /usr/src/usr.bin/dc/dc.c line 478, 774, 1054

#### Usage of this include

dc.h used 1 times

- in /usr/src/usr.bin/dc/dc.c line 7

Last modified: 1987-02-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1621 |