/* vars.h */

/*#include */
#include "defines.h"

extern char	symtab[SYMTBSZ];	/* symbol table */
extern char	*staticptr, *autoptr;	/* ptrs to next entries */

extern int	ws[WSTBLSZ];		/* while stack */
extern int	*wsptr;			/* ptr to next entry */

/** ucc **/
extern int	swstcase[SWSTSZ];
extern int	swstlab[SWSTSZ];
extern int	swstp;

extern char	litq[LITABSZ];		/* literal pool */
extern int	litptr;			/* ptr to next entry */

extern char	macq[MACQ_SZ];		/* macro string buffer */
extern int	macptr;			/* and its index */

extern char	line[LINESIZE];		/* parsing buffer */
extern char	mline[LINESIZE];	/* temp macro buffer */
extern int	lptr, mptr;		/* ptrs into each */

/*	Misc storage	*/
extern int	nxtlab,		/* next avail label # */
		litlab,		/* label # assigned to literal pool */
		Msp,		/* Maximum relative stk ptr */
		Csp,		/* compiler relative stk ptr */
		argstk,		/* function arg sp */
		ncmp,		/* # open compound statements */
		errcnt,		/* # errors in compilation */
		errstop,	/* stop on error */
		eof_flg,	/* set non-zero on final input eof */
		glbflag,	/* non-zero if internal globals */
		ctext,		/* non-zero to intermix c-source */
		cmode,		/* non-zero while parsing c-code */
				/* zero when passing assembly code */
		lastst,		/* last executed statement type */
		mainflg,	/* output is to be first asm file */
		fnstart,	/* line# of start of current fn. */
		lineno,		/* line# in current file */
		infunc,		/* "inside function" flag */
		savestart,	/* copy of fnstart "	" */
		saveline,	/* copy of lineno  "	" */
		saveinfn;	/* copy of infunc  "	" */

extern char	*currfn,	/* ptr to symtab entry for current fn. */
       		*savecurr;	/* copy of currfn for #include */
extern char	quote[2];	/* literal string for '"' */
extern char	*symbptr;	/* work ptr to any char buffer */
extern int	*iptr;		/* work ptr to any int buffer */

#define FILE int

extern FILE	*fp_input,	/* iob # for input file */
		*fp_output,	/* iob # for output file (if any) */
		*fp_input2,	/* iob # for "include" file */
		*saveout;	/* holds outpt ptr whn diverted to console */