# HG changeset patch # User kono # Date 1070185123 -32400 # Node ID 4beb7f079055cbc39934307cf8139aeaa676efaa # Parent f00e3bfa1b45e9b6ae1a746dd48c4e6bd67f2655 new file diff -r f00e3bfa1b45 -r 4beb7f079055 mc-parse.c --- a/mc-parse.c Sun Nov 30 18:26:36 2003 +0900 +++ b/mc-parse.c Sun Nov 30 18:38:43 2003 +0900 @@ -252,10 +252,10 @@ } static void -init(void) +reinit(void) { + int i; NMTBL *nptr; - int i; cheapp=cheap; for(nptr = ntable,i = GSYMS; i--;) (nptr++)->sc = 0; @@ -301,7 +301,6 @@ lfree=HEAPSIZE; filep=filestack; codegen_init(); - newfile(); macro_define("__micro_c__ 1\n"); // macro_define("__pure2\n"); @@ -315,16 +314,32 @@ macro_define("bsd 1\n"); #endif +} + +static void +init(void) +{ + + reinit(); + newfile(); + getline(); getch(); } +static int first_newfile = 1; + static void newfile(void) { char *s; int flag = 0; + if (!first_newfile) { + closing(); + reinit(); + } else + first_newfile = 0; lineno=0; if (chk) fprintf(stderr,"%s:\n",av[ac2]); if ( (filep->fcb = fopen(av[ac2++],"r")) == NULL ) error(FILERR);