1: /******************************************************************************
   2:  *
   3:  *	defs	--	constant and macro definitions for dipress
   4:  *
   5:  *	John Mellor-Crummey (Xerox Corp)
   6:  *
   7:  *	Copyright (c) 1985 Xerox Corporation
   8:  *
   9:  *****************************************************************************/
  10: 
  11: #define QUIT        1
  12: #define CONTINUE    0
  13: 
  14: #define MAX_NUM_FONTS   60
  15: 
  16: #define DEFAULTRANGEBOT -9999   /* used to fill in an unspecified lower page# */
  17: #define DEFAULTRANGETOP 9999    /* used to fill in an unspecified top page# */
  18: #define MAXPAGESPEC 25  /* maximum number of page specifications on
  19: 				 * the command line using -o
  20: 				 */
  21: 
  22: #define TRUE        1
  23: 
  24: #define BUFFERSIZE  512 /* buffer for reading ditroff commands */
  25: #define Showbuff_size   255
  26: #define INCH        2540    /* micas per inch */
  27: #define F_transform 0
  28: #define maxPointsInSpline   60  /* maximum number of points in a
  29: 					 * wiggly line
  30: 					 */
  31: 
  32: #define curr_strokewidth    (pointsizeTab[size - 1] * 4)
  33: #define gobj_size(h1,v1,h2,v2)  new_bitmap(curr_strokewidth, h1, v1, h2, v2)
  34: 
  35: /* macros for positioning within the document */
  36: #define hInc(n)     hor_pos += n
  37: #define hMov(n)     hor_pos = n
  38: #define vInc(n)     ver_pos += n
  39: #define vMov(n)     ver_pos = n
  40: 
  41: /* translate ditroff h and v into interpress x and y */
  42: /* (rx and ry are for relative x and y values) */
  43: 
  44: # define    xloc(h) ((h) * scale)
  45: # define    rx(h)   x(h)
  46: # define    yloc(v) (11 * INCH - ((v) * scale))
  47: # define    ry(v)   (-(v) * scale)
  48: 
  49: /* fontNumber -- coerce an out of range font index to the default font */
  50: #define fontNumber(n)   ((n < 0 || n > device.num_fonts) ? 1 : n)
  51: 
  52: #define white(ch)   (ch == ' ' || ch == '\t')
  53: #define abs(n)      (((n) < 0) ? - (n) : (n))
  54: #define sqr(n)      ((n) * (n))
  55: 
  56: 
  57: /* constants for drawarc -- definition of the directions of movement */
  58: #define M1      1
  59: #define M2      2
  60: #define M3      3
  61: 
  62: #define setpixel()  set_pixel(hor_pos,ver_pos)
  63: 
  64: #define MAXSTATE    5   /* maximum number of stacked environments */
  65: 
  66: /* mneumonics for the Device Independent Troff Commands */
  67: 
  68: #define cmdPointSize        's'
  69: #define cmdFont         'f'
  70: #define cmdChar         'c'
  71: #define cmdSpecChar     'C'
  72: #define cmdAbsHoriz     'H'
  73: #define cmdRelHoriz     'h'
  74: #define cmdAbsVert      'V'
  75: #define cmdRelVert      'v'
  76: #define cmdEol          'n'
  77: #define cmdWordSep      'w'
  78: #define cmdNewPage      'p'
  79: #define cmdPushEnv      '{'
  80: #define cmdPopEnv       '}'
  81: #define cmdCharString       't'
  82: #define cmdComment      '#'
  83: #define cmdDraw         'D'
  84: #define drawLine        'l'
  85: #define drawCircle      'c'
  86: #define drawEllipse     'e'
  87: #define drawArc         'a'
  88: #define drawWigglyLine      '~'
  89: #define cmdDevice       'x'
  90: #define deviceInit      'i'
  91: #define deviceName      'T'
  92: #define deviceResolution    'r'
  93: #define devicePause     'p'
  94: #define deviceStop      's'
  95: #define deviceTrailer       't'
  96: #define deviceFont      'f'
  97: #define deviceHeight        'H'
  98: #define deviceSlant     'S'

Defined macros

BUFFERSIZE defined in line 24; used 4 times
DEFAULTRANGEBOT defined in line 16; used 1 times
DEFAULTRANGETOP defined in line 17; used 1 times
F_transform defined in line 27; used 2 times
INCH defined in line 26; used 1 times
  • in line 46
M1 defined in line 58; used 1 times
M2 defined in line 59; used 2 times
M3 defined in line 60; used 1 times
MAXPAGESPEC defined in line 18; used 1 times
Showbuff_size defined in line 25; used 3 times
TRUE defined in line 22; used 1 times
abs defined in line 53; used 16 times
cmdAbsHoriz defined in line 72; never used
cmdAbsVert defined in line 74; never used
cmdChar defined in line 70; never used
cmdCharString defined in line 81; never used
cmdComment defined in line 82; never used
cmdDevice defined in line 89; never used
cmdDraw defined in line 83; never used
cmdEol defined in line 76; never used
cmdFont defined in line 69; never used
cmdNewPage defined in line 78; never used
cmdPointSize defined in line 68; never used
cmdPopEnv defined in line 80; never used
cmdPushEnv defined in line 79; never used
cmdRelHoriz defined in line 73; never used
cmdRelVert defined in line 75; never used
cmdSpecChar defined in line 71; never used
cmdWordSep defined in line 77; never used
curr_strokewidth defined in line 32; used 2 times
deviceFont defined in line 96; never used
deviceHeight defined in line 97; never used
deviceInit defined in line 90; never used
deviceName defined in line 91; never used
devicePause defined in line 93; never used
deviceResolution defined in line 92; never used
deviceSlant defined in line 98; never used
deviceStop defined in line 94; never used
deviceTrailer defined in line 95; never used
drawArc defined in line 87; never used
drawCircle defined in line 85; never used
drawEllipse defined in line 86; never used
drawLine defined in line 84; never used
drawWigglyLine defined in line 88; never used
fontNumber defined in line 50; used 1 times
hInc defined in line 36; used 2 times
rx defined in line 45; never used
ry defined in line 47; never used
setpixel defined in line 62; used 14 times
sqr defined in line 54; never used
vInc defined in line 38; used 1 times
xloc defined in line 44; used 4 times
yloc defined in line 46; used 3 times

Usage of this include

Last modified: 1985-09-04
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1644
Valid CSS Valid XHTML 1.0 Strict