diff mc.h @ 29:160e20394f80

macro function (imcomplete)
author kono
date Sat, 08 Feb 2003 04:14:23 +0900
parents c6994794f084
children 20ed2786a276
line wrap: on
line diff
--- a/mc.h	Sat Feb 08 00:58:04 2003 +0900
+++ b/mc.h	Sat Feb 08 04:14:23 2003 +0900
@@ -70,6 +70,7 @@
 #define GTDECL	10
 #define LTDECL	11
 #define IFDEF	12
+#define MDECL	13
 
 #define GVAR	1
 #define RGVAR	2
@@ -164,9 +165,11 @@
 #define OPTION	18
 #define REG_ERR	19
 #define CODE_ERR	20
+#define MSERR   21
 
 #define GSYMS	9000
 #define LSYMS	500
+#define MSYMS	500
 
 #define HEAPSIZE	10000
 /* #define CHEAPSIZE	3000 */
@@ -176,7 +179,7 @@
 #define FILES 10
 #define OUTPUT_FILE_NAME "mcout.s"
 
-EXTERN int sym,ch,chsave,type,mode,stmode,gfree,lfree,mflag,lineno,glineno;
+EXTERN int sym,ch,type,mode,stmode,gfree,lfree,mflag,lineno,glineno;
 EXTERN int labelno,gpc,disp,reg_var,debug;
 EXTERN int symval,args,init_vars,heap[HEAPSIZE];
 EXTERN int blabel,clabel,dlabel,cslabel,ilabel,control,ac,ac2,lsrc,chk,asmf;
@@ -184,7 +187,8 @@
 
 EXTERN unsigned hash;
 
-EXTERN char linebuf[LBUFSIZE],namebuf[LBUFSIZE],*chptr,*chptrsave;
+EXTERN int chptrsave;
+EXTERN char linebuf[LBUFSIZE],namebuf[LBUFSIZE],*chptr;
 EXTERN char *name,*cheapp,**av,/*obuf[320],*/*sptr,escape(void);
 EXTERN int arg_offset,stat_no,size_of_int,disp_offset,endian,csvalue,csvalue1;
 EXTERN int code_arg_offset;
@@ -197,9 +201,11 @@
 	int sc,ty,dsp; } NMTBL;
 
 EXTERN NMTBL ntable[GSYMS+LSYMS];
+EXTERN NMTBL mtable[MSYMS];
 EXTERN NMTBL *nptr,*gnptr;
 EXTERN NMTBL *decl0(void),*decl1(void),*lsearch(char *name),*gsearch(void);
 EXTERN NMTBL *fnptr;
+EXTERN NMTBL *msearch(char *name);
 
 EXTERN struct {int fd,ln;char *name0;FILE *fcb;} *filep,filestack[FILES];
 EXTERN char cheap[CHEAPSIZE];