|
|
1.1 ! root 1: #ifndef lint ! 2: static char sccsid[] = "@(#)ni.c 4.4 6/2/90"; ! 3: #endif lint ! 4: ! 5: #include "tdef.h" ! 6: #include "pathnames.h" ! 7: char obuf[OBUFSZ]; ! 8: char *obufp = obuf; ! 9: int r[NN] = { ! 10: PAIR('%',0), ! 11: PAIR('n','l'), ! 12: PAIR('y','r'), ! 13: PAIR('h','p'), ! 14: PAIR('c','t'), ! 15: PAIR('d','n'), ! 16: PAIR('m','o'), ! 17: PAIR('d','y'), ! 18: PAIR('d','w'), ! 19: PAIR('l','n'), ! 20: PAIR('d','l'), ! 21: PAIR('s','t'), ! 22: PAIR('s','b'), ! 23: PAIR('c','.')}; ! 24: int pto = 10000; ! 25: int pfrom = 1; ! 26: int print = 1; ! 27: char nextf[NS] = _PATH_TMAC; ! 28: int nfi = sizeof(_PATH_TMAC) - 1; ! 29: #ifdef NROFF ! 30: char termtab[NS] = _PATH_TERM; ! 31: int tti = sizeof(_PATH_TERM) - 1; ! 32: #endif ! 33: #ifndef NROFF ! 34: int oldbits = -1; ! 35: #endif ! 36: int init = 1; ! 37: int fc = IMP; ! 38: int eschar = '\\'; ! 39: int pl = 11*INCH; ! 40: int po = PO; ! 41: int dfact = 1; ! 42: int dfactd = 1; ! 43: int res = 1; ! 44: int smnt = 4; ! 45: int ascii = ASCII; ! 46: int ptid = PTID; ! 47: char ptname[] = "/dev/cat"; ! 48: int lg = LG; ! 49: int pnlist[NPN] = {-1}; ! 50: int *pnp = pnlist; ! 51: int npn = 1; ! 52: int npnflg = 1; ! 53: int xflg = 1; ! 54: int dpn = -1; ! 55: int totout = 1; ! 56: int ulfont = 1; ! 57: int ulbit = 1<<9; ! 58: int tabch = TAB; ! 59: int ldrch = LEADER; ! 60: int xxx; ! 61: extern caseds(), caseas(), casesp(), caseft(), caseps(), casevs(), ! 62: casenr(), caseif(), casepo(), casetl(), casetm(), casebp(), casech(), ! 63: casepn(), tbreak(), caseti(), casene(), casenf(), casece(), casefi(), ! 64: casein(), caseli(), casell(), casens(), casemk(), casert(), caseam(), ! 65: casede(), casedi(), caseda(), casewh(), casedt(), caseit(), caserm(), ! 66: casern(), casead(), casers(), casena(), casepl(), caseta(), casetr(), ! 67: caseul(), caselt(), casenx(), caseso(), caseig(), casetc(), casefc(), ! 68: caseec(), caseeo(), caselc(), caseev(), caserd(), caseab(), casefl(), ! 69: done(), casess(), casefp(), casecs(), casebd(), caselg(), casehc(), ! 70: casehy(), casenh(), casenm(), casenn(), casesv(), caseos(), casels(), ! 71: casecc(), casec2(), caseem(), caseaf(), casehw(), casemc(), casepm(), ! 72: casecu(), casepi(), caserr(), caseuf(), caseie(), caseel(), casepc(), ! 73: caseht(); ! 74: #ifndef NROFF ! 75: extern casefz(); ! 76: #endif ! 77: extern casecf(); ! 78: struct contab { ! 79: int rq; ! 80: /* ! 81: union { ! 82: */ ! 83: int (*f)(); ! 84: /* ! 85: unsigned mx; ! 86: }x; ! 87: */ ! 88: }contab[NM]= { ! 89: PAIR('d','s'),caseds, ! 90: PAIR('a','s'),caseas, ! 91: PAIR('s','p'),casesp, ! 92: PAIR('f','t'),caseft, ! 93: PAIR('p','s'),caseps, ! 94: PAIR('v','s'),casevs, ! 95: PAIR('n','r'),casenr, ! 96: PAIR('i','f'),caseif, ! 97: PAIR('i','e'),caseie, ! 98: PAIR('e','l'),caseel, ! 99: PAIR('p','o'),casepo, ! 100: PAIR('t','l'),casetl, ! 101: PAIR('t','m'),casetm, ! 102: PAIR('b','p'),casebp, ! 103: PAIR('c','h'),casech, ! 104: PAIR('p','n'),casepn, ! 105: PAIR('b','r'),tbreak, ! 106: PAIR('t','i'),caseti, ! 107: PAIR('n','e'),casene, ! 108: PAIR('n','f'),casenf, ! 109: PAIR('c','e'),casece, ! 110: PAIR('f','i'),casefi, ! 111: PAIR('i','n'),casein, ! 112: PAIR('l','i'),caseli, ! 113: PAIR('l','l'),casell, ! 114: PAIR('n','s'),casens, ! 115: PAIR('m','k'),casemk, ! 116: PAIR('r','t'),casert, ! 117: PAIR('a','m'),caseam, ! 118: PAIR('d','e'),casede, ! 119: PAIR('d','i'),casedi, ! 120: PAIR('d','a'),caseda, ! 121: PAIR('w','h'),casewh, ! 122: PAIR('d','t'),casedt, ! 123: PAIR('i','t'),caseit, ! 124: PAIR('r','m'),caserm, ! 125: PAIR('r','r'),caserr, ! 126: PAIR('r','n'),casern, ! 127: PAIR('a','d'),casead, ! 128: PAIR('r','s'),casers, ! 129: PAIR('n','a'),casena, ! 130: PAIR('p','l'),casepl, ! 131: PAIR('t','a'),caseta, ! 132: PAIR('t','r'),casetr, ! 133: PAIR('u','l'),caseul, ! 134: PAIR('c','u'),casecu, ! 135: PAIR('l','t'),caselt, ! 136: PAIR('n','x'),casenx, ! 137: PAIR('s','o'),caseso, ! 138: PAIR('i','g'),caseig, ! 139: PAIR('t','c'),casetc, ! 140: PAIR('f','c'),casefc, ! 141: PAIR('e','c'),caseec, ! 142: PAIR('e','o'),caseeo, ! 143: PAIR('l','c'),caselc, ! 144: PAIR('e','v'),caseev, ! 145: PAIR('r','d'),caserd, ! 146: PAIR('a','b'),caseab, ! 147: PAIR('f','l'),casefl, ! 148: PAIR('e','x'),done, ! 149: PAIR('s','s'),casess, ! 150: PAIR('f','p'),casefp, ! 151: PAIR('c','s'),casecs, ! 152: PAIR('b','d'),casebd, ! 153: PAIR('l','g'),caselg, ! 154: PAIR('h','c'),casehc, ! 155: PAIR('h','y'),casehy, ! 156: PAIR('n','h'),casenh, ! 157: PAIR('n','m'),casenm, ! 158: PAIR('n','n'),casenn, ! 159: PAIR('s','v'),casesv, ! 160: PAIR('o','s'),caseos, ! 161: PAIR('l','s'),casels, ! 162: PAIR('c','c'),casecc, ! 163: PAIR('c','2'),casec2, ! 164: PAIR('e','m'),caseem, ! 165: PAIR('a','f'),caseaf, ! 166: PAIR('h','w'),casehw, ! 167: PAIR('m','c'),casemc, ! 168: PAIR('p','m'),casepm, ! 169: #ifdef NROFF ! 170: PAIR('p','i'),casepi, ! 171: #endif ! 172: PAIR('u','f'),caseuf, ! 173: PAIR('p','c'),casepc, ! 174: PAIR('h','t'),caseht, ! 175: #ifndef NROFF ! 176: PAIR('f','z'),casefz, ! 177: #endif ! 178: PAIR('c', 'f'),casecf, ! 179: }; ! 180: ! 181: /* ! 182: troff environment block ! 183: */ ! 184: ! 185: int block = 0; ! 186: int ics = ICS; ! 187: int ic = 0; ! 188: int icf = 0; ! 189: int chbits = 0; ! 190: int spbits = 0; ! 191: int nmbits = 0; ! 192: int apts = PS; ! 193: int apts1 = PS; ! 194: int pts = PS; ! 195: int pts1 = PS; ! 196: int font = FT; ! 197: int font1 = FT; ! 198: int sps = SPS; ! 199: int spacesz = SS; ! 200: int lss = VS; ! 201: int lss1 = VS; ! 202: int ls = 1; ! 203: int ls1 = 1; ! 204: int ll = LL; ! 205: int ll1 = LL; ! 206: int lt = LL; ! 207: int lt1 = LL; ! 208: int ad = 1; ! 209: int nms = 1; ! 210: int ndf = 1; ! 211: int fi = 1; ! 212: int cc = '.'; ! 213: int c2 = '\''; ! 214: int ohc = OHC; ! 215: int tdelim = IMP; ! 216: int hyf = 1; ! 217: int hyoff = 0; ! 218: int un1 = -1; ! 219: int tabc = 0; ! 220: int dotc = '.'; ! 221: int adsp = 0; ! 222: int adrem = 0; ! 223: int lastl = 0; ! 224: int nel = 0; ! 225: int admod = 0; ! 226: int *wordp = 0; ! 227: int spflg = 0; ! 228: int *linep = 0; ! 229: int *wdend = 0; ! 230: int *wdstart = 0; ! 231: int wne = 0; ! 232: int ne = 0; ! 233: int nc = 0; ! 234: int nb = 0; ! 235: int lnmod = 0; ! 236: int nwd = 0; ! 237: int nn = 0; ! 238: int ni = 0; ! 239: int ul = 0; ! 240: int cu = 0; ! 241: int ce = 0; ! 242: int in = 0; ! 243: int in1 = 0; ! 244: int un = 0; ! 245: int wch = 0; ! 246: int pendt = 0; ! 247: int *pendw = 0; ! 248: int pendnf = 0; ! 249: int spread = 0; ! 250: int it = 0; ! 251: int itmac = 0; ! 252: int lnsize = LNSIZE; ! 253: int *hyptr[NHYP] = {0}; ! 254: int tabtab[NTAB] = {DTAB,DTAB*2,DTAB*3,DTAB*4,DTAB*5,DTAB*6,DTAB*7,DTAB*8, ! 255: DTAB*9,DTAB*10,DTAB*11,DTAB*12,DTAB*13,DTAB*14,DTAB*15,0}; ! 256: int line[LNSIZE] = {0}; ! 257: int word[WDSIZE] = {0}; ! 258: int blockxxx[EVS-68-NHYP-NTAB-WDSIZE-LNSIZE] = {0}; ! 259: /*spare 5 words*/ ! 260: int oline[LNSIZE+1];
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.