version 1.3, 2001/10/09 01:36:29 |
version 1.11, 2014/08/20 16:51:34 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* 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.10 2014/05/13 20:07:23 ohara Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 69 extern jmp_buf ox_env; |
|
Line 69 extern jmp_buf ox_env; |
|
extern MATHCAP my_mathcap; |
extern MATHCAP my_mathcap; |
extern char LastError[]; |
extern char LastError[]; |
|
|
void create_error(ERR *,unsigned int ,char *); |
void create_error(ERR *,unsigned int ,char *,LIST); |
|
|
void ox_io_init(); |
void ox_io_init(); |
void ox_asir_init(int,char **); |
void ox_asir_init(int,char **,char *); |
Obj asir_pop_one(); |
Obj asir_pop_one(); |
void asir_push_one(Obj); |
void asir_push_one(Obj); |
void asir_end_flush(); |
void asir_end_flush(); |
Line 118 void ox_plot_main(int argc,char **argv) |
|
Line 118 void ox_plot_main(int argc,char **argv) |
|
extern int plot_argc; |
extern int plot_argc; |
extern char **plot_argv; |
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 */ |
/* inform the watch thread of the completion of initialization */ |
SetEvent(hStreamNotify_Ack); |
SetEvent(hStreamNotify_Ack); |
#else |
#else |
ox_asir_init(argc,argv); |
ox_asir_init(argc,argv,"ox_plot"); |
init_plot_display(argc,argv); |
init_plot_display(argc,argv); |
ds = ConnectionNumber(display); |
ds = ConnectionNumber(display); |
#endif |
#endif |
Line 208 static void process_ox(int id, Obj obj, unsigned int s |
|
Line 208 static void process_ox(int id, Obj obj, unsigned int s |
|
fprintf(stderr," %s\n",name_of_cmd(cmd)); |
fprintf(stderr," %s\n",name_of_cmd(cmd)); |
if ( ret = setjmp(main_env) ) { |
if ( ret = setjmp(main_env) ) { |
if ( ret == 1 ) { |
if ( ret == 1 ) { |
create_error(&err,serial,LastError); |
create_error(&err,serial,LastError,0); |
asir_push_one((Obj)err); |
asir_push_one((Obj)err); |
} |
} |
break; |
break; |
Line 235 static void process_ox(int id, Obj obj, unsigned int s |
|
Line 235 static void process_ox(int id, Obj obj, unsigned int s |
|
|
|
static void process_resize(struct canvas *can,POINT startp,POINT endp) |
static void process_resize(struct canvas *can,POINT startp,POINT endp) |
{ |
{ |
if ( can->mode == MODE_INTERACTIVE ) |
if ( can->mode == modeNO(INTERACTIVE) || can->mode == modeNO(POLARPLOT) ) |
return; |
return; |
|
|
if ( can->mode == MODE_PLOT ) |
#if 0 |
|
if ( can->mode == modeNO(PLOT) ) |
plot_resize(can,startp,endp); |
plot_resize(can,startp,endp); |
else |
else |
ifplot_resize(can,startp,endp); |
ifplot_resize(can,startp,endp); |
|
#else |
|
plot_resize(can,startp,endp); |
|
#endif |
} |
} |
|
|
static void asir_do_cmd(unsigned int cmd,unsigned int serial) |
static void asir_do_cmd(unsigned int cmd,unsigned int serial) |
Line 283 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
Line 287 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
asir_executeFunction(); |
asir_executeFunction(); |
break; |
break; |
case SM_shutdown: |
case SM_shutdown: |
asir_terminate(2); |
asir_infile = 0; |
|
asir_terminate(3); |
break; |
break; |
case SM_pops: |
case SM_pops: |
asir_pops(); |
asir_pops(); |
Line 320 static void asir_executeFunction(int serial) |
|
Line 325 static void asir_executeFunction(int serial) |
|
NEXT(n1) = 0; |
NEXT(n1) = 0; |
id = -1; |
id = -1; |
if ( !strcmp(func,"plot") ) { |
if ( !strcmp(func,"plot") ) { |
id = plot(n); |
id = plot(n,modeNO(PLOT)); |
STOQ(id,ret); asir_push_one((Obj)ret); |
STOQ(id,ret); asir_push_one((Obj)ret); |
|
}else if ( !strcmp(func,"ifplot") ) { |
|
id = plot(n,modeNO(IFPLOT)); |
|
STOQ(id,ret); asir_push_one((Obj)ret); |
} else if ( !strcmp(func,"arrayplot") ) { |
} else if ( !strcmp(func,"arrayplot") ) { |
id = arrayplot(n); |
id = arrayplot(n); |
STOQ(id,ret); asir_push_one((Obj)ret); |
STOQ(id,ret); asir_push_one((Obj)ret); |
Line 334 static void asir_executeFunction(int serial) |
|
Line 342 static void asir_executeFunction(int serial) |
|
drawcircle(n); |
drawcircle(n); |
} else if ( !strcmp(func,"draw_obj") ) { |
} else if ( !strcmp(func,"draw_obj") ) { |
if ( draw_obj(n) < 0 ) { |
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); |
asir_push_one((Obj)err); |
} |
} |
} else if ( !strcmp(func,"clear_canvas") ) { |
} else if ( !strcmp(func,"clear_canvas") ) { |