=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/glob.c,v retrieving revision 1.59 retrieving revision 1.61 diff -u -p -r1.59 -r1.61 --- OpenXM_contrib2/asir2000/parse/glob.c 2005/10/10 15:16:38 1.59 +++ OpenXM_contrib2/asir2000/parse/glob.c 2006/02/03 03:55:18 1.61 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.58 2005/08/24 06:28:39 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.60 2005/10/26 07:33:03 noro Exp $ */ #include "ca.h" #include "al.h" @@ -126,10 +126,11 @@ struct oVL oVLIST[52]; VL CO = oVLIST; VL ALG; -struct oVS oGPVS,oAPVS,oEPVS; +struct oVS oGPVS,oAPVS,oEPVS,oPPVS; VS GPVS = &oGPVS; VS APVS = &oAPVS; VS EPVS = &oEPVS; +VS PPVS = &oPPVS; VS CPVS,MPVS; NODE MODULE_LIST; @@ -165,6 +166,7 @@ void glob_init() { VR(&oVLIST[i]) = &oVAR[i]; NEXT(&oVLIST[i]) = 0; reallocarray((char **)&GPVS->va,(int *)&GPVS->asize,(int *)&GPVS->n,(int)sizeof(struct oPV)); reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV)); + reallocarray((char **)&PPVS->va,(int *)&PPVS->asize,(int *)&PPVS->n,(int)sizeof(struct oPV)); CPVS = GPVS; MKNODE(ONENODE,mkfnode(1,I_FORMULA,ONE),0); OID(F_TRUE)=O_F; FOP(F_TRUE)=AL_TRUE; F_TRUE->arg.dummy = 0; @@ -477,7 +479,13 @@ void resetenv(char *s) #if !defined(VISUAL) reset_timer(); #endif - LONGJMP(main_env,1); + if ( read_exec_file <= 1 ) { + read_exec_file = 0; + LONGJMP(main_env,1); + } else { + read_exec_file = 0; + LONGJMP(exec_env,1); + } } void fatal(int n) @@ -568,10 +576,9 @@ void int_handler(int sig) fprintf(stderr, "done.\n"); } } - if ( read_exec_file ) { - read_exec_file = 0; + if ( read_exec_file ) resetenv("initialization aborted; return to toplevel"); - } else + else resetenv("return to toplevel"); break; case 'd': @@ -705,8 +712,6 @@ void error(char *s) if ( CPVS != GPVS ) if ( !no_debug_on_error && (do_server_in_X11 || isatty(0)) ) bp(error_snode); - if ( read_exec_file ) - read_exec_file = 0; resetenv("return to toplevel"); } @@ -726,8 +731,6 @@ void toplevel(char *s) showpos_to_string(errbuf+strlen(errbuf)); ExitAsir(); } - if ( read_exec_file ) - read_exec_file = 0; resetenv("return to toplevel"); }