/* Micro-C header file */ #define DEBUG error(-1) /*#include "CCLIB.TXT" */ #include "stdio.h" #define SIZE_INT 4 #define INT (-1) #define CHAR (-2) #define UNSIGNED (-3) #define POINTER (-4) #define ARRAY (-5) #define STRUCT (-6) #define UNION (-7) #define FUNCTION (-8) #define EMPTY (-9) #define STATIC (-10) #define GOTO (-11) #define RETURN (-12) #define BREAK (-13) #define CONTINUE (-14) #define IF (-15) #define ELSE (-16) #define FOR (-17) #define DO (-18) #define WHILE (-19) #define SWITCH (-20) #define CASE (-21) #define DEFAULT (-22) #define RESERVE (-23) #define TAG (-24) #define FIELD (-25) #define IDENT (-26) #define STRING (-27) #define MACRO (-28) #define BLABEL (-29) #define FLABEL (-30) #define TYPEDEF (-31) #define SIZEOF (-32) #define TYPE (-33) #define LONG (-34) #define SHORT (-35) #define EXTRN (-36) #define TOP 0 #define GDECL 1 #define GSDECL 2 #define GUDECL 3 #define ADECL 4 #define LDECL 5 #define LSDECL 6 #define LUDECL 7 #define STADECL 8 #define STAT 9 #define GTDECL 10 #define LTDECL 11 #define GVAR 1 #define RGVAR 2 #define CRGVAR 3 #define LVAR 4 #define RLVAR 5 #define CRLVAR 6 #define CONST 7 #define FNAME 8 #define INDIRECT 9 #define RINDIRECT 10 #define CRINDIRECT 11 #define ADDRESS 12 #define MINUS 13 #define LNOT 14 #define BNOT 15 #define INC 16 #define POSTINC 17 #define PREINC 18 #define CPOSTINC 19 #define CPREINC 20 #define DEC 21 #define CPOSTDEC 22 #define CPREDEC 23 #define MUL 24 #define UMUL 25 #define DIV 26 #define UDIV 27 #define MOD 28 #define UMOD 29 #define ADD 30 #define SUB 31 #define RSHIFT 32 #define URSHIFT 33 #define LSHIFT 34 #define ULSHIFT 35 #define GT 36 #define UGT 37 #define GE 38 #define UGE 39 #define LT 40 #define ULT 41 #define LE 42 #define ULE 43 #define EQ 44 #define NEQ 45 #define BAND 46 #define EOR 47 #define BOR 48 #define LAND 49 #define LOR 50 #define COND 51 #define ASS 52 #define CASS 53 #define ASSOP 54 #define CASSOP 55 #define COMMA 56 #define LPAR 57 #define RPAR 58 #define LBRA 59 #define RBRA 60 #define LC 61 #define RC 62 #define COLON 63 #define SM 64 #define PERIOD 65 #define ARROW 66 #define US 1 #define AS 100 #define FILERR 1 #define DCERR 2 #define STERR 3 #define EXERR 4 #define CNERR 5 #define CHERR 6 #define GSERR 7 #define LSERR 8 #define STRERR 9 #define LNERR 10 #define EOFERR 11 #define MCERR 12 #define INCERR 13 #define HPERR 14 #define TYERR 15 #define LVERR 16 #define UDERR 17 #define OPTION 18 #define GSYMS 4500 #define LSYMS 500 #define HEAPSIZE 1000 /* #define CHEAPSIZE 3000 */ #define CHEAPSIZE 256000 #define LBUFSIZE 4096 #define FILES 3 #define OUTPUT_FILE_NAME "mcout.s" EXTERN int sym,ch,chsave,type,mode,stmode,gfree,lfree,mflag,lineno,glineno; EXTERN int labelno,gpc,lvar,disp,debug; EXTERN int symval,args,heap[HEAPSIZE]; EXTERN int blabel,clabel,dlabel,cslabel,ilabel,control,ac,ac2,lsrc,chk,asmf; EXTERN unsigned hash; EXTERN char linebuf[LBUFSIZE],namebuf[LBUFSIZE],*chptr,*chptrsave; EXTERN char *name,*cheapp,**av,/*obuf[320],*/*sptr,escape(); EXTERN int arg_offset,stat_no,int_size,disp_offset,endian,csvalue,csvalue1; EXTERN int retlabel,retpending; EXTERN FILE *obuf; typedef struct nametable { char *nm; int sc,ty,dsp; } NMTBL; EXTERN NMTBL ntable[GSYMS+LSYMS],*nptr,*gnptr,*decl0(),*decl1(),*lsearch(),*gsearch(); EXTERN struct {int fd,ln;/*char fcb[320]*/FILE *fcb;} *filep,filestack[FILES]; EXTERN char cheap[CHEAPSIZE];