=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/ox_asir.c,v retrieving revision 1.59 retrieving revision 1.64 diff -u -p -r1.59 -r1.64 --- OpenXM_contrib2/asir2000/io/ox_asir.c 2006/02/08 02:11:19 1.59 +++ OpenXM_contrib2/asir2000/io/ox_asir.c 2006/09/26 05:35:26 1.64 @@ -44,7 +44,7 @@ * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. - * $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.58 2005/07/26 00:58:50 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.63 2006/06/21 09:46:06 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -191,6 +191,7 @@ void ox_main(int argc,char **argv) { asir_push_one((Obj)err); while ( NEXT(asir_infile) ) closecurrentinput(); + resetpvs(); } break; } @@ -596,6 +597,12 @@ void asir_pushCMOtag(unsigned int serial) } } +void print_to_wfep(Obj obj) +{ + asir_push_one(obj); + asir_popString(); +} + void asir_popString() { Obj val; @@ -703,6 +710,7 @@ int asir_executeString() #else parse_strp = cmd; #endif + asir_infile->ln = 1; if ( mainparse(&snode) ) { return -1; } @@ -858,6 +866,7 @@ void ox_asir_init(int argc,char **argv,char *servernam FILE *ifp; char *homedir; char *ptr; + int do_server_sav; #if !defined(VISUAL) int tmp; #endif @@ -916,7 +925,11 @@ void ox_asir_init(int argc,char **argv,char *servernam if ( do_asirrc && (ifp = fopen(ifname,"r")) ) { fclose(ifp); - execasirfile(ifname); + do_server_sav = do_server_in_X11; + do_server_in_X11 = 0; + if ( !SETJMP(main_env) ) + execasirfile(ifname); + do_server_in_X11 = do_server_sav; } /* XXX Windows compatibility */ @@ -1179,16 +1192,13 @@ int asir_ox_init(int byteorder) #if defined(UINIT) reg_sysf(); #endif + input_init(0,"string"); sprintf(ifname,"%s/.asirrc",getenv("HOME")); if ( do_asirrc && (ifp = fopen(ifname,"r")) ) { - input_init(ifp,ifname); - if ( !SETJMP(asir_infile->jmpbuf) ) { - asir_infile->ready_for_longjmp; - read_eval_loop(); - } fclose(ifp); + if ( !SETJMP(main_env) ) + execasirfile(ifname); } - input_init(0,"string"); asir_OperandStackSize = BUFSIZ; asir_OperandStack = (Obj *)CALLOC(asir_OperandStackSize,sizeof(Obj));