=================================================================== RCS file: /home/cvs/OpenXM_contrib2/windows/engine2000/plot.c,v retrieving revision 1.3 retrieving revision 1.8 diff -u -p -r1.3 -r1.8 --- OpenXM_contrib2/windows/engine2000/plot.c 2001/10/09 01:36:29 1.3 +++ OpenXM_contrib2/windows/engine2000/plot.c 2014/03/25 19:30:18 1.8 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/windows/engine2000/plot.c,v 1.2 2001/10/05 10:23:08 noro Exp $ + * $OpenXM: OpenXM_contrib2/windows/engine2000/plot.c,v 1.7 2006/02/08 05:31:37 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -69,10 +69,10 @@ extern jmp_buf ox_env; extern MATHCAP my_mathcap; extern char LastError[]; -void create_error(ERR *,unsigned int ,char *); +void create_error(ERR *,unsigned int ,char *,LIST); void ox_io_init(); -void ox_asir_init(int,char **); +void ox_asir_init(int,char **,char *); Obj asir_pop_one(); void asir_push_one(Obj); void asir_end_flush(); @@ -118,11 +118,11 @@ void ox_plot_main(int argc,char **argv) extern int plot_argc; extern char **plot_argv; - ox_asir_init(plot_argc,plot_argv); + ox_asir_init(plot_argc,plot_argv,"ox_plot"); /* inform the watch thread of the completion of initialization */ SetEvent(hStreamNotify_Ack); #else - ox_asir_init(argc,argv); + ox_asir_init(argc,argv,"ox_plot"); init_plot_display(argc,argv); ds = ConnectionNumber(display); #endif @@ -208,7 +208,7 @@ static void process_ox(int id, Obj obj, unsigned int s fprintf(stderr," %s\n",name_of_cmd(cmd)); if ( ret = setjmp(main_env) ) { if ( ret == 1 ) { - create_error(&err,serial,LastError); + create_error(&err,serial,LastError,0); asir_push_one((Obj)err); } break; @@ -235,7 +235,7 @@ static void process_ox(int id, Obj obj, unsigned int s static void process_resize(struct canvas *can,POINT startp,POINT endp) { - if ( can->mode == MODE_INTERACTIVE ) + if ( can->mode == MODE_INTERACTIVE || can->mode == MODE_POLARPLOT ) return; if ( can->mode == MODE_PLOT ) @@ -283,7 +283,8 @@ static void asir_do_cmd(unsigned int cmd,unsigned int asir_executeFunction(); break; case SM_shutdown: - asir_terminate(2); + asir_infile = 0; + asir_terminate(3); break; case SM_pops: asir_pops(); @@ -320,7 +321,7 @@ static void asir_executeFunction(int serial) NEXT(n1) = 0; id = -1; if ( !strcmp(func,"plot") ) { - id = plot(n); + id = plot(n,MODE_PLOT); STOQ(id,ret); asir_push_one((Obj)ret); } else if ( !strcmp(func,"arrayplot") ) { id = arrayplot(n); @@ -334,7 +335,12 @@ static void asir_executeFunction(int serial) drawcircle(n); } else if ( !strcmp(func,"draw_obj") ) { if ( draw_obj(n) < 0 ) { - create_error(&err,serial,LastError); + create_error(&err,serial,LastError,0); + asir_push_one((Obj)err); + } + } else if ( !strcmp(func,"draw_string") ) { + if ( draw_string(n) < 0 ) { + create_error(&err,serial,LastError,0); asir_push_one((Obj)err); } } else if ( !strcmp(func,"clear_canvas") ) {