1*51166Scael /* 2*51166Scael * @(#)tdef.h 2.4 (Berkeley) 11/3/90 3*51166Scael */ 4*51166Scael 5*51166Scael /* starting values for typesetting parameters: */ 6*51166Scael 7*51166Scael #define PS 10 /* default point size */ 8*51166Scael #define FT 1 /* default font position */ 9*51166Scael #define ULFONT 2 /* default underline font */ 10*51166Scael #define BDFONT 3 /* default emboldening font */ 11*51166Scael #define BIFONT 4 /* default bold italic font */ 12*51166Scael #define LL (unsigned) 65*INCH/10 /* line length; 39picas=6.5in */ 13*51166Scael #define VS ((12*INCH)/72) /* initial vert space */ 14*51166Scael 15*51166Scael #ifdef NROFF 16*51166Scael # define EM t.Em 17*51166Scael # define HOR t.Adj 18*51166Scael # define VERT t.Vert 19*51166Scael # define INCH 240 /* increments per inch */ 20*51166Scael # define SPS INCH/10 /* space size */ 21*51166Scael # define SS INCH/10 /* " */ 22*51166Scael # define TRAILER 0 23*51166Scael # define PO 0 /* page offset */ 24*51166Scael # define ASCII 1 25*51166Scael # define LG 0 26*51166Scael # define DTAB 0 /* set at 8 Ems at init time */ 27*51166Scael # define ICS 2*SPS 28*51166Scael #endif 29*51166Scael #ifndef NROFF /* TROFF */ 30*51166Scael /* Inch is set by ptinit() when troff started. 31*51166Scael /* all derived values set then too 32*51166Scael */ 33*51166Scael # define INCH Inch /* troff resolution -- number of goobies/inch */ 34*51166Scael # define POINT (INCH/72) /* goobies per point (1/72 inch) */ 35*51166Scael # define HOR Hor /* horizontal resolution in goobies */ 36*51166Scael # define VERT Vert /* vertical resolution in goobies */ 37*51166Scael # define SPS (EM/3) /* space size */ 38*51166Scael # define SS 12 /* space size in 36ths of an em */ 39*51166Scael # define PO (INCH) /* page offset 1 inch */ 40*51166Scael /* # define EM (POINT * pts) */ 41*51166Scael #define EM (((long) INCH * pts + 36) / 72) /* don't lose significance */ 42*51166Scael #define EMPTS(pts) (((long) INCH * (pts) + 36) / 72) 43*51166Scael # define ASCII 0 44*51166Scael # define LG 1 45*51166Scael # define DTAB (INCH/2) 46*51166Scael # define ICS 3*SPS 47*51166Scael #endif 48*51166Scael 49*51166Scael /* These "characters" are used to encode various internal functions 50*51166Scael /* Some make use of the fact that most ascii characters between 51*51166Scael /* 0 and 040 don't have any graphic or other function. 52*51166Scael /* The few that do have a purpose (e.g., \n, \b, \t, ... 53*51166Scael /* are avoided by the ad hoc choices here. 54*51166Scael /* See ifilt[] in n1.c for others -- 1, 2, 3, 5, 6, 7, 010, 011, 012 55*51166Scael */ 56*51166Scael 57*51166Scael #define LEADER 001 58*51166Scael #define IMP 004 /* impossible char; glues things together */ 59*51166Scael #define TAB 011 60*51166Scael #define RPT 014 /* next character is to be repeated many times */ 61*51166Scael #define CHARHT 015 /* size field sets character height */ 62*51166Scael #define SLANT 016 /* size field sets amount of slant */ 63*51166Scael #define DRAWFCN 017 /* next several chars describe arb drawing fcn */ 64*51166Scael /* line: 'l' dx dy char */ 65*51166Scael /* circle: 'c' r */ 66*51166Scael /* ellipse: 'e' rx ry */ 67*51166Scael /* arc: 'a' dx dy r */ 68*51166Scael /* wiggly line '~' x y x y ... */ 69*51166Scael #define DRAWLINE 'l' 70*51166Scael #define DRAWCIRCLE 'c' /* circle */ 71*51166Scael #define DRAWELLIPSE 'e' 72*51166Scael #define DRAWARC 'a' /* arbitrary arc */ 73*51166Scael #define DRAWSPLINE '~' /* quadratic B spline */ 74*51166Scael 75*51166Scael #define LEFT 020 /* \{ */ 76*51166Scael #define RIGHT 021 /* \} */ 77*51166Scael #define FILLER 022 /* \& and similar purposes */ 78*51166Scael #define XON 023 /* \X'...' starts here */ 79*51166Scael #define OHC 024 /* optional hyphenation character \% */ 80*51166Scael #define CONT 025 /* \c character */ 81*51166Scael #define PRESC 026 /* printable escape */ 82*51166Scael #define UNPAD 027 /* unpaddable blank */ 83*51166Scael #define XPAR 030 /* transparent mode indicator */ 84*51166Scael #define FLSS 031 85*51166Scael #define WORDSP 032 /* paddable word space */ 86*51166Scael #define ESC 033 87*51166Scael #define XOFF 034 /* \X'...' ends here */ 88*51166Scael 89*51166Scael #define iscontrol(n) (n==035 || n==036) /* used to test the next two */ 90*51166Scael #define HX 035 /* next character is value of \x'...' */ 91*51166Scael #define MAXFONTS 99 /* Max number of mounted fonts (in fontab) */ 92*51166Scael 93*51166Scael #define HYPHEN c_hyphen 94*51166Scael #define EMDASH c_emdash /* \(em */ 95*51166Scael #define RULE c_rule /* \(ru */ 96*51166Scael #define MINUS c_minus /* minus sign on current font */ 97*51166Scael #define LIG_FI c_fi /* \(ff */ 98*51166Scael #define LIG_FL c_fl /* \(fl */ 99*51166Scael #define LIG_FF c_ff /* \(ff */ 100*51166Scael #define LIG_FFI c_ffi /* \(Fi */ 101*51166Scael #define LIG_FFL c_ffl /* \(Fl */ 102*51166Scael #define ACUTE c_acute /* acute accent \(aa */ 103*51166Scael #define GRAVE c_grave /* grave accent \(ga */ 104*51166Scael #define UNDERLINE c_under /* \(ul */ 105*51166Scael #define ROOTEN c_rooten /* root en \(rn */ 106*51166Scael #define BOXRULE c_boxrule /* box rule \(br */ 107*51166Scael #define LEFTHAND c_lefthand /* left hand for word overflow */ 108*51166Scael #define DAGGER c_dagger /* dagger for footnotes */ 109*51166Scael 110*51166Scael /* array sizes, and similar limits: */ 111*51166Scael 112*51166Scael #define NFONT 128 /* maximum number of fonts (including specials) */ 113*51166Scael #define NN 400 /* number registers */ 114*51166Scael #define NNAMES 15 /* predefined reg names */ 115*51166Scael #define NIF 15 /* if-else nesting */ 116*51166Scael #define NS 128 /* name buffer */ 117*51166Scael #define NTM 256 /* tm buffer */ 118*51166Scael #define NEV 3 /* environments */ 119*51166Scael #define EVLSZ 10 /* size of ev stack */ 120*51166Scael #define DSIZE 2048 /* disk sector size in chars */ 121*51166Scael 122*51166Scael #define NM 500 /* requests + macros */ 123*51166Scael #define DELTA 8192 /* delta core bytes */ 124*51166Scael #define NHYP 10 /* max hyphens per word */ 125*51166Scael #define NHEX 128 /* byte size of exception word list */ 126*51166Scael #define NTAB 40 /* tab stops */ 127*51166Scael #define NSO 5 /* "so" depth */ 128*51166Scael #define WDSIZE 270 /* word buffer size */ 129*51166Scael #define LNSIZE 1024 /* line buffer size */ 130*51166Scael #define NDI 5 /* number of diversions */ 131*51166Scael #define NTRTAB 512 /* number of items in trtab[] */ 132*51166Scael #define NWIDCACHE 512 /* number of items in widcache[] */ 133*51166Scael #define NTRAP 20 /* number of traps */ 134*51166Scael #define NPN 20 /* numbers in "-o" */ 135*51166Scael #define FBUFSZ 256 /* field buf size words */ 136*51166Scael #define IBUFSZ 8192 /* bytes */ 137*51166Scael #define NC 1024 /* cbuf size words */ 138*51166Scael #define NOV 10 /* number of overstrike chars */ 139*51166Scael #define NPP 10 /* pads per field */ 140*51166Scael 141*51166Scael /* 142*51166Scael Internal character representation: 143*51166Scael Internally, every character is carried around as 144*51166Scael a 32 bit cookie, called a "tchar" (typedef long). 145*51166Scael Bits are numbered 31..0 from left to right. 146*51166Scael If bit 15 is 1, the character is motion, with 147*51166Scael if bit 16 it's vertical motion 148*51166Scael if bit 17 it's negative motion 149*51166Scael If bit 15 is 0, the character is a real character. 150*51166Scael if bit 31 zero motion 151*51166Scael bits 30..24 size 152*51166Scael bits 23..16 font 153*51166Scael bit 8 absolute char number in 7..0 154*51166Scael This implies at most 256-32 characters in a single font, 155*51166Scael which is going to be a problem somewhere 156*51166Scael */ 157*51166Scael 158*51166Scael /* in the following, "L" should really be a tchar, but ... */ 159*51166Scael 160*51166Scael #define MOT (01L<<15) /* motion character indicator */ 161*51166Scael #define MOTV (07L<<15) /* clear for motion part */ 162*51166Scael #define VMOT (01L<<16) /* vert motion bit */ 163*51166Scael #define NMOT (01L<<17) /* negative motion indicator*/ 164*51166Scael #define MAXMOT 32767 /* bad way to write this!!! */ 165*51166Scael #define ismot(n) ((n) & MOT) 166*51166Scael #define isvmot(n) ((n) & VMOT) /* must have tested MOT previously */ 167*51166Scael #define isnmot(n) ((n) & NMOT) /* ditto */ 168*51166Scael #define absmot(n) (unsigned)(0177777 & (n) & ~MOT) /* (short) is cheap mask */ 169*51166Scael 170*51166Scael #define ZBIT (01L << 31) /* zero width char */ 171*51166Scael #define iszbit(n) ((n) & ZBIT) 172*51166Scael #define ABSCHAR 0400 /* absolute char number in this font */ 173*51166Scael 174*51166Scael #define SMASK (0177L << 24) 175*51166Scael #define FMASK (0377L << 16) 176*51166Scael #define SFMASK (SMASK|FMASK) /* size and font in a tchar */ 177*51166Scael #define sbits(n) (((n) >> 24) & 0177) 178*51166Scael #define fbits(n) (((n) >> 16) & 0377) 179*51166Scael #define sfbits(n) (unsigned)(0177777 & (((n) & SFMASK) >> 16)) 180*51166Scael #define cbits(n) (unsigned)(0177777 & (n)) /* isolate bottom 16 bits */ 181*51166Scael #define absbits(n) (cbits(n) & ~ABSCHAR) 182*51166Scael 183*51166Scael #define setsbits(n,s) n = (n & ~SMASK) | (tchar)(s) << 24 184*51166Scael #define setfbits(n,f) n = (n & ~FMASK) | (tchar)(f) << 16 185*51166Scael #define setsfbits(n,sf) n = (n & ~SFMASK) | (tchar)(sf) << 16 186*51166Scael #define setcbits(n,c) n = (n & ~077777L | (c)) /* set character bits */ 187*51166Scael 188*51166Scael #define BYTEMASK 0377 189*51166Scael #define BYTE 8 190*51166Scael 191*51166Scael #define ZONE 5 /* 5 hrs for EST */ 192*51166Scael #define TABMASK 037777 193*51166Scael #define RTAB (unsigned) 0100000 194*51166Scael #define CTAB 040000 195*51166Scael 196*51166Scael #define TABBIT 02 /* bits in gchtab */ 197*51166Scael #define LDRBIT 04 198*51166Scael #define FCBIT 010 199*51166Scael 200*51166Scael #define PAIR(A,B) (A|(B<<BYTE)) 201*51166Scael 202*51166Scael #define oput(c) putc(c, ptid) 203*51166Scael 204*51166Scael /* 205*51166Scael * "temp file" parameters. macros and strings 206*51166Scael * are stored in an array of linked blocks, 207*51166Scael * which may be in memory if INCORE is set during 208*51166Scael * compilation, or otherwise in a file. 209*51166Scael * The numerology is delicate if filep is 16 bits: 210*51166Scael #define BLK 128 211*51166Scael #define NBLIST 512 212*51166Scael * i.e., the product is 16 bits long. 213*51166Scael 214*51166Scael * If filep is an unsigned long (and if your 215*51166Scael * compiler will let you say that) then NBLIST 216*51166Scael * can be a lot bigger. Of course that makes 217*51166Scael * the file or core image a lot bigger too, 218*51166Scael * and means you don't detect missing diversion 219*51166Scael * terminations as quickly... . 220*51166Scael * It also means that you may have trouble running 221*51166Scael * on non-swapping systems, since the core image 222*51166Scael * will be over 1Mb. 223*51166Scael 224*51166Scael * In any case, both must be powers of 2. 225*51166Scael */ 226*51166Scael 227*51166Scael typedef unsigned int filep; /* this is good for 32 bit machines */ 228*51166Scael 229*51166Scael #define BLK 128 /* alloc block in tchars */ 230*51166Scael #ifdef SMALLER 231*51166Scael 232*51166Scael #define NBLIST 1024 233*51166Scael 234*51166Scael #else 235*51166Scael 236*51166Scael #define NBLIST 2048 /* allocation list. smallish machines use 1024, bigger use 2048 */ 237*51166Scael 238*51166Scael #endif 239*51166Scael 240*51166Scael typedef long tchar; /* as an experiment */ 241*51166Scael 242*51166Scael extern tchar getch(), getch0(); 243*51166Scael extern tchar rbf(), rbf0(); 244*51166Scael extern tchar mot(), hmot(), vmot(); 245*51166Scael extern tchar makem(), sethl(); 246*51166Scael extern tchar popi(); 247*51166Scael extern tchar getlg(); 248*51166Scael extern tchar xlss(); 249*51166Scael extern tchar setfield(); 250*51166Scael extern tchar setz(); 251*51166Scael extern tchar setch(); 252*51166Scael extern tchar setht(), setslant(); 253*51166Scael 254*51166Scael extern long atoi0(); 255*51166Scael 256*51166Scael extern int Inch, Hor, Vert, Unitwidth; 257*51166Scael 258*51166Scael /* these characters are used as various signals or values 259*51166Scael /* in miscellaneous places. 260*51166Scael /* values are set in specnames in t10.c 261*51166Scael */ 262*51166Scael 263*51166Scael extern int c_hyphen; 264*51166Scael extern int c_emdash; 265*51166Scael extern int c_rule; 266*51166Scael extern int c_minus; 267*51166Scael extern int c_fi; 268*51166Scael extern int c_fl; 269*51166Scael extern int c_ff; 270*51166Scael extern int c_ffi; 271*51166Scael extern int c_ffl; 272*51166Scael extern int c_acute; 273*51166Scael extern int c_grave; 274*51166Scael extern int c_under; 275*51166Scael extern int c_rooten; 276*51166Scael extern int c_boxrule; 277*51166Scael extern int c_lefthand; 278*51166Scael extern int c_dagger; 279*51166Scael 280*51166Scael struct d { /* diversion */ 281*51166Scael filep op; 282*51166Scael int dnl; 283*51166Scael int dimac; 284*51166Scael int ditrap; 285*51166Scael int ditf; 286*51166Scael int alss; 287*51166Scael int blss; 288*51166Scael int nls; 289*51166Scael int mkline; 290*51166Scael int maxl; 291*51166Scael int hnl; 292*51166Scael int curd; 293*51166Scael }; 294*51166Scael 295*51166Scael struct s { /* stack frame */ 296*51166Scael int nargs; 297*51166Scael struct s *pframe; 298*51166Scael filep pip; 299*51166Scael int pnchar; 300*51166Scael tchar prchar; 301*51166Scael int ppendt; 302*51166Scael tchar pch; 303*51166Scael tchar *lastpbp; 304*51166Scael int mname; 305*51166Scael }; 306*51166Scael 307*51166Scael extern struct contab { 308*51166Scael unsigned short rq; 309*51166Scael struct contab *link; 310*51166Scael int (*f)(); 311*51166Scael unsigned mx; 312*51166Scael } contab[NM]; 313*51166Scael 314*51166Scael extern struct numtab { 315*51166Scael short r; /* name */ 316*51166Scael short fmt; 317*51166Scael short inc; 318*51166Scael int val; 319*51166Scael struct numtab *link; 320*51166Scael } numtab[NN]; 321*51166Scael 322*51166Scael #define PN 0 323*51166Scael #define NL 1 324*51166Scael #define YR 2 325*51166Scael #define HP 3 326*51166Scael #define CT 4 327*51166Scael #define DN 5 328*51166Scael #define MO 6 329*51166Scael #define DY 7 330*51166Scael #define DW 8 331*51166Scael #define LN 9 332*51166Scael #define DL 10 333*51166Scael #define ST 11 334*51166Scael #define SB 12 335*51166Scael #define CD 13 336*51166Scael #define PID 14 337*51166Scael 338*51166Scael /* the infamous environment block */ 339*51166Scael 340*51166Scael #define ics (env->_ics) 341*51166Scael #define sps (env->_sps) 342*51166Scael #define spacesz (env->_spacesz) 343*51166Scael #define lss (env->_lss) 344*51166Scael #define lss1 (env->_lss1) 345*51166Scael #define ll (env->_ll) 346*51166Scael #define ll1 (env->_ll1) 347*51166Scael #define lt (env->_lt) 348*51166Scael #define lt1 (env->_lt1) 349*51166Scael #define ic (env->_ic) 350*51166Scael #define icf (env->_icf) 351*51166Scael #define chbits (env->_chbits) 352*51166Scael #define spbits (env->_spbits) 353*51166Scael #define nmbits (env->_nmbits) 354*51166Scael #define apts (env->_apts) 355*51166Scael #define apts1 (env->_apts1) 356*51166Scael #define pts (env->_pts) 357*51166Scael #define pts1 (env->_pts1) 358*51166Scael #define font (env->_font) 359*51166Scael #define font1 (env->_font1) 360*51166Scael #define ls (env->_ls) 361*51166Scael #define ls1 (env->_ls1) 362*51166Scael #define ad (env->_ad) 363*51166Scael #define nms (env->_nms) 364*51166Scael #define ndf (env->_ndf) 365*51166Scael #define fi (env->_fi) 366*51166Scael #define cc (env->_cc) 367*51166Scael #define c2 (env->_c2) 368*51166Scael #define ohc (env->_ohc) 369*51166Scael #define tdelim (env->_tdelim) 370*51166Scael #define hyf (env->_hyf) 371*51166Scael #define hyoff (env->_hyoff) 372*51166Scael #define hyalg (env->_hyalg) 373*51166Scael #define hyalg1 (env->_hyalg1) 374*51166Scael #define thresh (env->_thresh) 375*51166Scael #define un1 (env->_un1) 376*51166Scael #define tabc (env->_tabc) 377*51166Scael #define dotc (env->_dotc) 378*51166Scael #define adsp (env->_adsp) 379*51166Scael #define adrem (env->_adrem) 380*51166Scael #define lastl (env->_lastl) 381*51166Scael #define nel (env->_nel) 382*51166Scael #define admod (env->_admod) 383*51166Scael #define wordp (env->_wordp) 384*51166Scael #define spflg (env->_spflg) 385*51166Scael #define linep (env->_linep) 386*51166Scael #define wdend (env->_wdend) 387*51166Scael #define wdstart (env->_wdstart) 388*51166Scael #define wne (env->_wne) 389*51166Scael #define ne (env->_ne) 390*51166Scael #define nc (env->_nc) 391*51166Scael #define nb (env->_nb) 392*51166Scael #define lnmod (env->_lnmod) 393*51166Scael #define nwd (env->_nwd) 394*51166Scael #define nn (env->_nn) 395*51166Scael #define ni (env->_ni) 396*51166Scael #define ul (env->_ul) 397*51166Scael #define cu (env->_cu) 398*51166Scael #define ce (env->_ce) 399*51166Scael #define in (env->_in) 400*51166Scael #define in1 (env->_in1) 401*51166Scael #define un (env->_un) 402*51166Scael #define wch (env->_wch) 403*51166Scael #define pendt (env->_pendt) 404*51166Scael #define pendw (env->_pendw) 405*51166Scael #define pendnf (env->_pendnf) 406*51166Scael #define spread (env->_spread) 407*51166Scael #define it (env->_it) 408*51166Scael #define itmac (env->_itmac) 409*51166Scael #define lnsize (env->_lnsize) 410*51166Scael #define hyptr (env->_hyptr) 411*51166Scael #define tabtab (env->_tabtab) 412*51166Scael #define line (env->_line) 413*51166Scael #define word (env->_word) 414*51166Scael 415*51166Scael /* 416*51166Scael * Note (jaap) 417*51166Scael * If this structure changes in ni.c, you should change 418*51166Scael * this as well 419*51166Scael */ 420*51166Scael struct env { 421*51166Scael int _ics; 422*51166Scael int _sps; 423*51166Scael int _spacesz; 424*51166Scael int _lss; 425*51166Scael int _lss1; 426*51166Scael int _ll; 427*51166Scael int _ll1; 428*51166Scael int _lt; 429*51166Scael int _lt1; 430*51166Scael tchar _ic; 431*51166Scael int _icf; 432*51166Scael tchar _chbits; 433*51166Scael tchar _spbits; 434*51166Scael tchar _nmbits; 435*51166Scael int _apts; 436*51166Scael int _apts1; 437*51166Scael int _pts; 438*51166Scael int _pts1; 439*51166Scael int _font; 440*51166Scael int _font1; 441*51166Scael int _ls; 442*51166Scael int _ls1; 443*51166Scael int _ad; 444*51166Scael int _nms; 445*51166Scael int _ndf; 446*51166Scael int _fi; 447*51166Scael int _cc; 448*51166Scael int _c2; 449*51166Scael int _ohc; 450*51166Scael int _tdelim; 451*51166Scael int _hyf; 452*51166Scael int _hyoff; 453*51166Scael int _hyalg; 454*51166Scael int _hyalg1; 455*51166Scael int _thresh; 456*51166Scael int _un1; 457*51166Scael int _tabc; 458*51166Scael int _dotc; 459*51166Scael int _adsp; 460*51166Scael int _adrem; 461*51166Scael int _lastl; 462*51166Scael int _nel; 463*51166Scael int _admod; 464*51166Scael tchar *_wordp; 465*51166Scael int _spflg; 466*51166Scael tchar *_linep; 467*51166Scael tchar *_wdend; 468*51166Scael tchar *_wdstart; 469*51166Scael int _wne; 470*51166Scael int _ne; 471*51166Scael int _nc; 472*51166Scael int _nb; 473*51166Scael int _lnmod; 474*51166Scael int _nwd; 475*51166Scael int _nn; 476*51166Scael int _ni; 477*51166Scael int _ul; 478*51166Scael int _cu; 479*51166Scael int _ce; 480*51166Scael int _in; 481*51166Scael int _in1; 482*51166Scael int _un; 483*51166Scael int _wch; 484*51166Scael int _pendt; 485*51166Scael tchar *_pendw; 486*51166Scael int _pendnf; 487*51166Scael int _spread; 488*51166Scael int _it; 489*51166Scael int _itmac; 490*51166Scael int _lnsize; 491*51166Scael tchar *_hyptr[NHYP]; 492*51166Scael int _tabtab[NTAB]; 493*51166Scael tchar _line[LNSIZE]; 494*51166Scael tchar _word[WDSIZE]; 495*51166Scael }; 496*51166Scael 497*51166Scael extern struct env *env; 498*51166Scael extern struct env env_array[]; 499*51166Scael 500*51166Scael /* 501*51166Scael * All changes will come after this comment (jaap) 502*51166Scael */ 503*51166Scael 504*51166Scael /* 505*51166Scael * hyphenation dependent stuff (jaap) 506*51166Scael */ 507*51166Scael #define THRESH 160 /*digram goodness threshold (from n8.c, (jaap))*/ 508*51166Scael #define DUTCH_THRESH 3 /* for recursive bestesplits (jaap) */ 509*51166Scael 510*51166Scael #define ORIGINAL 0 /* original (American) English) algorithm */ 511*51166Scael #define DUTCH 1 /* second hyphenation routine (bestesplits) */ 512*51166Scael #define MAXDIALECTS 1 /* number of hyphenation algorithms */ 513*51166Scael 514*51166Scael /* 515*51166Scael * define enough space for the fontcache. EXTRAFONT is maximum space 516*51166Scael * currently to be used by a font. The space for the fonttab is 517*51166Scael * for the "logical to physical font table mapping addition (jaap). 518*51166Scael */ 519*51166Scael #define MAXCHARS 255 /* current maximum of characters in a font */ 520*51166Scael 521*51166Scael #ifdef CWI 522*51166Scael #define EXTRAFONT (3*MAXCHARS * sizeof(char) + dev.nchtab + (128-32) \ 523*51166Scael * sizeof(char) + sizeof(struct Font) + 255 * sizeof(short)) 524*51166Scael #else 525*51166Scael #define EXTRAFONT (3*MAXCHARS * sizeof(char) + dev.nchtab + (128-32) \ 526*51166Scael * sizeof(char) + sizeof(struct Font)) 527*51166Scael #endif 528*51166Scael 529*51166Scael #include <stdio.h> 530*51166Scael #define fdprintf fprintf 531*51166Scael #define flusho() 532