1 /* $Id: comm1.h,v 2.17 1994/06/24 13:21:55 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
8 * variable declarations
14 #define INIT(x) /* empty */
17 extern short pass INIT(PASS_1);
19 extern short peekc; /* push back symbol (PASS_1) */
20 extern short unresolved; /* number of unresolved references */
21 extern long lineno; /* input line number */
22 extern short hllino; /* high-level language line number */
23 extern short nerrors; /* terminate at end of pass if set */
24 extern short sflag INIT(SYM_DEF);
25 /* -s option (symbol table info) */
26 extern char *progname; /* for error messages */
27 extern char *modulename; /* for error messages */
28 extern common_t *commons; /* header of commons list */
31 extern short archmode; /* scanning archives */
32 extern long archsize; /* size of individual archive entries */
34 extern short uflag; /* if 1 make undefineds extern */
35 /* symbol table index for last S_UND */
39 extern short dflag; /* -d option (list mode) */
44 extern short rflag; /* -r option (relocation info) */
45 #endif /* RELOCATION */
48 extern valu_t relonami;
52 extern short bflag; /* -b option (no optimizations) */
55 extern char *aoutpath INIT("a.out");
56 extern char temppath[50];
59 extern FILE *tempfile;
61 extern char *stringbuf; /* contains last string value */
62 extern int stringlen; /* contains length of last string value */
64 extern sect_t sect[SECTMAX];
67 * specials for the location counter
69 extern sect_t *DOTSCT; /* §[DOTTYP-S_MIN] or NULL */
70 extern ADDR_T DOTVAL; /* DOTSCT->s_size + DOTSCT->s_base */
71 extern short DOTTYP; /* S_MIN..S_MAX or S_UND */
73 extern unsigned short nname; /* Counts name table index in PASS_3 */
75 extern item_t *hashtab[H_TOTAL];
76 extern short hashindex; /* see item_search() */
78 extern item_t *fb_ptr[4*FB_SIZE];
81 #define BITCHUNK (8 * MEMINCR)
83 extern int bitindex; /* bitindex * MEMINCR * 8 + nbits gives
84 number of decisions so far
89 extern short listmode; /* -d option for current pass */
90 extern short listtemp; /* listmode if .list seen */
91 extern short listflag; /* copied from listtemp at '\n' */
92 extern short listcolm; /* column on output */
93 extern short listeoln INIT(1);
94 /* set by endline, tested by emit1 */
95 extern FILE *listfile; /* copy of source text */
96 extern char listpath[50];
100 extern item_t keytab[];
101 extern struct outhead outhead;
104 extern int curr_token;
106 /* forward function declarations */
108 extern char *readident();
110 extern char *remember();
111 extern item_t *fb_shift();
112 extern item_t *fb_alloc();
113 extern item_t *item_alloc();
114 extern item_t *item_search();
115 extern valu_t load();
116 extern FILE *ffcreat();
117 extern FILE *fftemp();
119 /* some library functions used */
120 extern char *mktemp();
121 extern char *malloc();
122 extern char *realloc();
123 extern char *calloc();
124 extern char *getenv();
125 extern char *strncpy();
127 /* ========== Machine dependent C declarations ========== */