1: /*******************************************************************************
   2:  *
   3:  *	globals	--	global variables used by the ditroff to interpress
   4:  *			conversion routines
   5:  *
   6:  *	John Mellor-Crummey (Xerox Corp)
   7:  *
   8:  *	Copyright (c) 1985 Xerox Corporation
   9:  *
  10:  ******************************************************************************/
  11: 
  12: #include <stdio.h>
  13: #include "defs.h"           /* constant and macro declarations */
  14: #include "types.h"          /* data type declarations */
  15: #include "deviceinfo.h"
  16: 
  17: 
  18: /*-----------------------------------------------------------------------------
  19:  *
  20:  *	global variables used by the ditroff to interpress conversion routines
  21:  *
  22:  *---------------------------------------------------------------------------*/
  23: 
  24: char    *tempfilename   = "/tmp/dipXXXXXb"; /* used to form names of output files */
  25: int outputfile;         /* output file */
  26: int pagebodyfile;           /* temporary to hold page bodies */
  27: int outputflag = 0;         /* output this page? */
  28: 
  29: int nPageRanges = 0;        /* output page list if > 0 */
  30: int pagerange[MAXPAGESPEC][2];  /* pairs of page numbers */
  31: 
  32: /* font tables */
  33: char    *fontdirectory  = "/usr/local/export/ip/lib/font";
  34: char    devicename[20];
  35: struct  device_entry device;
  36: struct  font_entry *fontPtr[MAX_NUM_FONTS+1];
  37: short   *pointsizeTab;
  38: int specFontPos = 0;        /* position of first special font */
  39: char    *specCharStrTab;
  40: short   *specCharTab;
  41: unsigned char   *fontIndexTab[MAX_NUM_FONTS+1];
  42: char    *charCodeTab[MAX_NUM_FONTS+1];  /* character codes for device */
  43: unsigned char   *charWidthTab[MAX_NUM_FONTS+1]; /* char widths for fonts */
  44: 
  45: int dbg = 0;
  46: int linenumber = 1;         /* for error reporting */
  47: 
  48: int spotsPerInch;           /* input uses this resolution */
  49: int size    = -1;           /* current size */
  50: int font    = -1;           /* current font */
  51: long    ftsz    = -1;           /* combination of size and font */
  52: long    oldftsz = -1;           /* former value of ftsz */
  53: int hor_pos;            /* next horizontal position (= 0, left of page) */
  54: int old_hor;            /* previous horizontal position */
  55: int ver_pos;            /* current vertical position (> 0, down page) */
  56: int old_ver;            /* previous vertical position */
  57: int hor_orig;           /* horizontal origin of current block */
  58: int ver_orig;           /* vertical origin of current block */
  59: 
  60: /* interpress stuff */
  61: 
  62: struct ifont *currfonts[MAX_NUM_FONTS+1];
  63: #ifndef lint
  64: struct ifont *inactfonts = NULL;
  65: #endif
  66: 
  67: int frameindex = 1;         /* current frame index */
  68: int mapcnt;             /* number of names in troff to ip map */
  69: int charw;              /* current character's troff width */
  70: char **trname;              /* troff name pointers (into timap) */
  71: char **ipname;              /* interpress name pointers (into timap) */
  72: char *timap;                /* buffer holds strings for font mapping */
  73: char in_correct = 0;            /* true when inside a "correct" body */
  74: char virgin_line = 1;           /* true if line untouched (character not yet shown) */
  75: double scale;               /* scale used in translating troff to ip co-ords */
  76: 
  77: /* this is for the bitmap interface */
  78: int drawidth;               /* width of the drawing pen */
  79: double drawscale;           /* scaling factor for drawing points */
  80: 
  81: /* for saving environments with push,pop */
  82: struct  state   state[MAXSTATE];
  83: struct  state   *statep = state;

Defined variables

charw defined in line 69; used 3 times
device defined in line 35; used 22 times
drawidth defined in line 78; used 7 times
font defined in line 50; used 17 times
frameindex defined in line 67; used 2 times
ftsz defined in line 51; used 4 times
hor_orig defined in line 57; used 3 times
in_correct defined in line 73; used 3 times
inactfonts defined in line 64; used 3 times
old_hor defined in line 54; used 5 times
old_ver defined in line 56; used 5 times
oldftsz defined in line 52; used 3 times
scale defined in line 75; used 4 times
size defined in line 49; used 11 times
spotsPerInch defined in line 48; used 2 times
state defined in line 82; used 3 times
statep defined in line 83; used 14 times
timap defined in line 72; used 6 times
ver_orig defined in line 58; used 3 times
virgin_line defined in line 74; used 3 times
Last modified: 1986-01-06
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1495
Valid CSS Valid XHTML 1.0 Strict