1: #include <signal.h>
   2: #include <sgtty.h>
   3: 
   4:     /* printer parameters */
   5: #define BSPEED  B2400
   6: #define HOR 1   /* 1 mil */
   7: #define VERT    3   /* actually 3.5 mil */
   8: #define PTID    0
   9: #define FT  0   /*default font position*/
  10: #define PFONT   3   /* maximum number of proportional fonts in -F option */
  11:     /*
  12: 	 * default spacings
  13: 	 */
  14: #define INCH    1000        /*increments per inch*/
  15: #define stou(x) (int)((long)(x)*7/2)    /* internal vertical steps to units */
  16: #ifdef PGOFF
  17: #define PO  INCH        /*page offset*/
  18: #else
  19: #define PO  0
  20: #endif
  21: #define DTAB    INCH/2      /* tab stops */
  22: #define NDTAB   INCH/10*8   /* tabs for -nroff */
  23: #define LL  (6*INCH+INCH/2) /*line length; 39picas=6.5in*/
  24: #define SD_LL   (7*INCH)    /* printer default line length */
  25: #define TOP_MARG   INCH/2   /* printer (hard) top margin */
  26: #define VS  INCH/6      /*vert space; 12points*/
  27: 
  28: #define LG  0
  29: 
  30:     /*
  31: 	 * internal characters
  32: 	 */
  33: #define LEADER  001
  34: #define IMP 004     /*impossible char*/
  35: #define TAB 011
  36: #define COLON   013
  37: #define RPT 014
  38: #define OHC 024
  39: #define CONT    025
  40: #define PRESC   026
  41: #define UNPAD   027
  42: #define XPAR    030
  43: #define FLSS    031
  44: #define TDELIM  032
  45: #define ESC 033
  46: #define LEFT    035
  47: #define RIGHT   036
  48: #define FILLER  037
  49: #define JREG    0374
  50: #define LX  0375        /*low-order part of xlss*/
  51: #define HX  0376        /*High-order part of xlss*/
  52: 
  53: 
  54:     /*
  55: 	 * output characters
  56: 	 */
  57: 
  58:     /* ascii control characters */
  59: #define C_DEL   0177        /* DEL, 0177 */
  60: #define C_NUL   0200        /* NULL */
  61: #define C_BS    0201        /* backspace */
  62: #define C_TAB   0202        /* horizontal tab */
  63: #define C_LF    0203        /* linefeed */
  64: #define C_FF    0204        /* formfeed */
  65: #define C_CR    0205        /* carriage return */
  66: #define C_ESC   0206        /* ESC, 033 */
  67:     /* sanders escape sequences */
  68: #define S_FT    0212        /* select font */
  69: #define S_AD    0221        /* select format (adjust) */
  70: #define S_LL    0222        /* set line length */
  71: #define S_TI    0223        /* set temporary indent */
  72: #define S_IN    0224        /* set indent */
  73: #define S_WS    0225        /* set word spacing */
  74: #define S_PL    0226        /* set page length */
  75:     /* characters receiving special handling */
  76: #define C_HY    055     /* hyphen */
  77: #define C_RN    0311        /* root en */
  78: #define C_BR    0341        /* vertical box rule */
  79: #define C_VB    0372        /* single vertical bar */
  80: #define C_UR    0347        /* underrule */
  81: #define C_EM    0350        /* 3/4 em dash */
  82: #define MAXCHAR 0373    /* 1 greater than max printing character */
  83: 
  84: /*
  85:  *  Sanders escape sequences used internally (sent directly)
  86:  */
  87: #define SE_CHFONT   "\033a"     /* change font */
  88: #define SE_MOUNT    "\033d"     /* mount font */
  89: #define SE_DRAFT    "\033t"     /* mount font */
  90: #define SE_LMARGIN  "\033f"     /* set page offset */
  91: 
  92: #define SE_VMOT     "\033o"     /* vertical motion */
  93: #define SE_VBLOCK   2047        /* chunks for vertical motion */
  94: #define SE_UPBL     "\033o`A"   /* up VBLOCK */
  95: #define SE_DOWNBL   "\033o_\177"    /* down VBLOCK */
  96: #define SE_UP1      "\033o\177\177" /* up 1 step */
  97: #define SE_DOWN1    "\033o@A"   /* down 1 step */
  98: 
  99: #define SE_HMOT     "\033l"     /* horizontal motion */
 100: #define SE_HBLOCK   2047        /* chunks for horizontal motion */
 101: #define SE_LEFTBL   "\033l`A"   /* left HBLOCK */
 102: #define SE_RIGHTBL  "\033l_\177"    /* right HBLOCK */
 103: 
 104: 
 105: #define ZONE 8  /*8hrs for PST*/
 106:     /*
 107: 	 * fonts; bits in chbits
 108: 	 */
 109: #define ZBIT   010000   /*zero width char*/
 110: #define ULMODE 020000   /* underline this character */
 111: #define EBIT   040000   /* stan, character in escape sequence for sanders */
 112: #define NFONTS 8        /* power of 2, maximum 16 */
 113: #define FONTSHFT 8      /* position of font bits in chbits */
 114: #define FONTMSK (NFONTS-1)  /* physical font in fonts[] */
 115: #define PROPOR 0100     /* physical font is proportional */
 116: #define getfont(i)  ((i>>FONTSHFT)&FONTMSK) /* font of char i */
 117: 
 118:     /* more bit masks */
 119: #define DBL 0100000     /*double size indicator*/
 120: #define MOT 0100000     /*motion character indicator*/
 121: #define MOTV    0160000     /*clear for motion part*/
 122: #define VMOT    0040000     /*vert motion bit*/
 123: #define NMOT    0020000     /* negative motion indicator*/
 124: #define MMASK   0100000     /*macro mask indicator*/
 125: #define CMASK   0100377
 126: #define WDMASK  01777       /* width part of *fontab */
 127: #define BMASK   0377
 128: #define BYTE    8
 129: #define TMASK   037777
 130: #define RTAB    0100000
 131: #define CTAB    0040000
 132: 
 133: 
 134: #define PAIR(A,B) (A|(B<<BYTE))
 135: 
 136:     /* array sizes and limits */
 137: #define NN  200 /*number registers*/
 138: /* NN changed Jan 31 from 132 */
 139: #define NNAMES  14  /*predefined reg names*/
 140: #define NIF 15  /*if-else nesting*/
 141: #define NEV 3   /*environments*/
 142: #define EVLSZ   10  /*size of ev stack*/
 143: #define EVS 4*256   /*environment size in words*/
 144: /* BWK - trying 4*256 instead of 3*256 */
 145: #ifdef VMUNIX
 146: #define NM  500 /*requests + macros */
 147: #else
 148: #define NM  300 /*requests + macros*/
 149: #endif
 150: #define NHYP    10  /*max hyphens per word*/
 151: #define NHEX    128 /*byte size of exception word list*/
 152: #define NTAB    35  /*tab stops*/
 153: #define NSO 5   /*"so" depth*/
 154: #define NDI 5   /*number of diversions*/
 155: #define NPN 20  /*numbers in "-o"*/
 156: #define NPP 10  /*pads per field*/
 157: #define NOV 10  /*number of overstrike chars*/
 158: #define NTRAP   20  /*number of traps*/
 159: 
 160:     /* buffer sizes */
 161: #define NS  64  /*name buffer*/
 162: #define NTM 256 /*tm buffer*/
 163: #define DELTA   512 /*delta core bytes*/
 164: #define WDSIZE  200 /*stan, changed from 170, word buffer size*/
 165: #define LNSIZE  680 /*line buffer size*/
 166: /* BWK - changed from 480 after EVS changed */
 167: #define FBUFSZ  256 /*field buf size words*/
 168: #define OBUFSZ  512 /*bytes*/
 169: #define IBUFSZ  512 /*bytes*/
 170: #define NC  256 /*cbuf size words*/
 171: #ifdef  VMUNIX
 172: #define MAXPTR (char *)0x7fffffff  /* max value of any pointer variable */
 173: #else
 174: #define MAXPTR  (char *)(-1)    /* max value of any pointer variable */
 175: #endif
 176: 
 177:     /* temp file management */
 178: #define BLK 128 /*alloc block words*/
 179: #define TEMP    512 /*65Kw*/
 180: #ifdef BIG
 181: typedef long filep;
 182: #define NBLIST  BIG /*allocation , BIG = 256 per 65k*/
 183: #define BLKBITS 7   /*for BLK=128*/
 184: #endif
 185: #ifndef BIG
 186: typedef unsigned filep;
 187: #define NBLIST  TEMP    /*allocation list, TEMP<=512*/
 188: /* BLK*NBLIST<=65536 words, if filep=unsigned */
 189: #define BLKBITS 0
 190: #endif

Defined typedef's

filep defined in line 181; used 69 times

Defined macros

BLK defined in line 178; used 12 times
BLKBITS defined in line 189; used 11 times
BSPEED defined in line 5; used 1 times
BYTE defined in line 128; used 7 times
COLON defined in line 36; used 1 times
CONT defined in line 39; used 3 times
CTAB defined in line 131; used 1 times
C_BR defined in line 78; never used
C_BS defined in line 61; never used
C_CR defined in line 65; never used
C_DEL defined in line 59; never used
C_EM defined in line 81; used 2 times
C_ESC defined in line 66; never used
C_FF defined in line 64; never used
C_HY defined in line 76; used 2 times
C_LF defined in line 63; never used
C_NUL defined in line 60; never used
C_RN defined in line 77; never used
C_TAB defined in line 62; never used
C_UR defined in line 80; never used
C_VB defined in line 79; used 1 times
DBL defined in line 119; never used
DELTA defined in line 163; used 5 times
DTAB defined in line 21; used 16 times
ESC defined in line 45; used 2 times
EVLSZ defined in line 142; used 3 times
FBUFSZ defined in line 167; used 3 times
FLSS defined in line 43; used 3 times
FONTMSK defined in line 114; used 3 times
FONTSHFT defined in line 113; used 3 times
FT defined in line 9; used 2 times
HOR defined in line 6; used 3 times
HX defined in line 51; used 1 times
IBUFSZ defined in line 169; used 8 times
JREG defined in line 49; used 2 times
LEADER defined in line 33; used 2 times
LEFT defined in line 46; used 5 times
LG defined in line 28; used 1 times
LL defined in line 23; used 4 times
LNSIZE defined in line 165; used 6 times
LX defined in line 50; used 1 times
MAXPTR defined in line 174; used 4 times
MMASK defined in line 124; used 9 times
MOTV defined in line 121; used 5 times
NBLIST defined in line 187; used 3 times
NDI defined in line 154; used 1 times
NDTAB defined in line 22; used 1 times
NEV defined in line 141; used 5 times
NHEX defined in line 151; used 3 times
NHYP defined in line 150; used 9 times
NIF defined in line 140; used 2 times
NM defined in line 148; used 8 times
NMOT defined in line 123; used 7 times
NN defined in line 137; used 13 times
NNAMES defined in line 139; used 2 times
NOV defined in line 157; used 3 times
NPN defined in line 155; used 2 times
NPP defined in line 156; used 2 times
NS defined in line 161; used 3 times
NSO defined in line 153; used 6 times
NTAB defined in line 152; used 4 times
NTM defined in line 162; used 3 times
NTRAP defined in line 158; used 16 times
OBUFSZ defined in line 168; used 5 times
OHC defined in line 38; used 3 times
PAIR defined in line 134; used 100 times
PO defined in line 19; used 1 times
PRESC defined in line 40; used 2 times
PTID defined in line 8; used 1 times
RIGHT defined in line 47; used 3 times
RPT defined in line 37; used 3 times
RTAB defined in line 130; used 2 times
SD_LL defined in line 24; used 1 times
SE_CHFONT defined in line 87; used 1 times
SE_DOWN1 defined in line 97; used 1 times
SE_DOWNBL defined in line 95; used 1 times
SE_DRAFT defined in line 89; used 1 times
SE_HBLOCK defined in line 100; used 4 times
SE_HMOT defined in line 99; used 2 times
SE_LEFTBL defined in line 101; used 1 times
SE_LMARGIN defined in line 90; used 1 times
SE_MOUNT defined in line 88; used 1 times
SE_RIGHTBL defined in line 102; used 1 times
SE_UP1 defined in line 96; used 1 times
SE_UPBL defined in line 94; used 1 times
SE_VBLOCK defined in line 93; used 2 times
SE_VMOT defined in line 92; used 1 times
S_AD defined in line 69; used 1 times
S_FT defined in line 68; never used
S_IN defined in line 72; used 1 times
S_LL defined in line 70; used 1 times
S_PL defined in line 74; used 1 times
S_TI defined in line 71; used 1 times
S_WS defined in line 73; used 1 times
TAB defined in line 35; used 1 times
TDELIM defined in line 44; never used
TEMP defined in line 179; used 1 times
TMASK defined in line 129; used 4 times
TOP_MARG defined in line 25; used 3 times
ULMODE defined in line 110; used 8 times
UNPAD defined in line 41; used 2 times
VERT defined in line 7; used 3 times
VMOT defined in line 122; used 6 times
VS defined in line 26; used 2 times
WDMASK defined in line 126; used 2 times
WDSIZE defined in line 164; used 3 times
XPAR defined in line 42; used 2 times
ZBIT defined in line 109; used 9 times
ZONE defined in line 105; used 1 times
getfont defined in line 116; used 2 times
stou defined in line 15; used 1 times

Usage of this include

Last modified: 1982-07-28
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1799
Valid CSS Valid XHTML 1.0 Strict