summaryrefslogtreecommitdiff
path: root/src/icont/tglobals.h
blob: 5a45ea62ee9f3f3453e614ec976f0433ee2a1237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 *  Global variables.
 */

#ifndef Global
   #define Global extern
   #define Init(v)
#endif					/* Global */

/*
 * Masks for accessing hash tables.
 */
Global int cmask;			/* mask for constant table hash */
Global int fmask;			/* mask for field table hash */
Global int gmask;			/* mask for global table hash */
Global int imask;			/* mask for identifier table hash */
Global int lmask;			/* mask for local table hash */

/*
 * Array sizes for various linker tables that can be expanded with realloc().
 */
Global unsigned int csize	Init(100);	/* constant table */
Global unsigned int lsize	Init(100);	/* local table */
Global unsigned int nsize	Init(1000);	/* ipc/line num. assoc. table */
Global unsigned int stsize	Init(20000);	/* string space */
Global unsigned int maxcode	Init(15000);	/* code space */
Global unsigned int fnmsize	Init(10);	/* ipc/file name assoc. table */
Global unsigned int maxlabels	Init(500);	/* maximum num of labels/proc */

/*
 * Sizes of various hash tables.
 */
Global unsigned int lchsize	Init(128);	/* constant hash table */
Global unsigned int fhsize	Init(32);	/* field hash table */
Global unsigned int ghsize	Init(128);	/* global hash table */
Global unsigned int ihsize	Init(128);	/* identifier hash table */
Global unsigned int lhsize	Init(128);	/* local hash table */

/*
 * Variables related to command processing.
 */
Global char *progname	Init("icont");	/* program name for diagnostics */
Global int silent	Init(0);	/* -s: suppress info messages? */
Global int m4pre	Init(0);	/* -m: use m4 preprocessor? */
Global int uwarn	Init(0);	/* -u: warn about undefined ids? */
Global int trace	Init(0);	/* -t: initial &trace value */
Global int pponly	Init(0);	/* -E: preprocess only */
Global int strinv	Init(0);	/* -f s: allow full string invocation */
Global int verbose	Init(1);	/* -v n: verbosity of commentary */

/*
 * Files and related globals.
 */
Global char *lpath;			/* search path for $include */
Global char *ipath;			/* search path for linking */

Global FILE *codefile	Init(0);	/* current ucode output file */
Global FILE *globfile	Init(0);	/* current global table output file */

Global char *ofile	Init(NULL);	/* name of linker output file */

Global char *iconxloc;			/* path to iconx */
Global long hdrsize;			/* size of iconx header */