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 = 0; /* output page list if > 0 */
30: int [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
dbg
defined in line
45; used 43 times
- in /usr/src/new/dipress/src/bin/dipress/font.c line
143-148(2),
156,
162-165(2),
172,
179,
189,
201
- in /usr/src/new/dipress/src/bin/dipress/ipress.c line
51,
75-90(6),
101,
112,
134,
144,
237,
325-326(2),
335-339(2),
356,
397,
404-409(2),
423,
504,
566,
604,
615,
630,
687,
722,
755,
791
- in /usr/src/new/dipress/src/bin/dipress/main.c line
46-49(4)
device
defined in line
35; used 22 times
font
defined in line
50; used 17 times
ftsz
defined in line
51; used 4 times
hor_pos
defined in line
53; used 21 times
- in /usr/src/new/dipress/src/bin/dipress/ipress.c line
121,
153-162(4),
173,
241,
482-485(3),
503-507(2),
521,
531,
664,
827
- in /usr/src/new/dipress/src/bin/dipress/parser.c line
158(2),
170(2),
183
defined in line
29; used 6 times
defined in line
30; used 5 times
scale
defined in line
75; used 4 times
size
defined in line
49; used 11 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_pos
defined in line
55; used 20 times
- in /usr/src/new/dipress/src/bin/dipress/ipress.c line
121,
154-162(4),
174,
196,
482-485(3),
502-507(2),
521,
530,
828
- in /usr/src/new/dipress/src/bin/dipress/parser.c line
158(2),
170(2),
183