version 1.10, 2014/05/13 20:07:23 |
version 1.14, 2020/02/01 14:19:01 |
|
|
* 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.9 2014/05/09 17:45:49 ohara Exp $ |
* $OpenXM: OpenXM_contrib2/windows/engine2000/plot.c,v 1.13 2019/03/28 07:04:13 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 91 static void asir_do_cmd(unsigned int,unsigned int); |
|
Line 91 static void asir_do_cmd(unsigned int,unsigned int); |
|
static void process_ox(); |
static void process_ox(); |
static void asir_executeFunction(); |
static void asir_executeFunction(); |
static void process_resize(struct canvas *can,POINT startp,POINT endp); |
static void process_resize(struct canvas *can,POINT startp,POINT endp); |
|
int Im_ox_plot; |
|
|
#if defined(VISUAL) |
#if defined(VISUAL) |
|
|
Line 128 void ox_plot_main(int argc,char **argv) |
|
Line 129 void ox_plot_main(int argc,char **argv) |
|
#endif |
#endif |
if ( do_message ) |
if ( do_message ) |
fprintf(stderr,"I'm an ox_plot, Version %d.\n",ASIR_VERSION); |
fprintf(stderr,"I'm an ox_plot, Version %d.\n",ASIR_VERSION); |
|
Im_ox_plot=1; |
|
|
/* XXX: dummy */ |
/* XXX: dummy */ |
MKUSINT(ui,0); GC_free(ui); |
MKUSINT(ui,0); GC_free(ui); |
Line 184 static void process_ox(int id, Obj obj, unsigned int s |
|
Line 186 static void process_ox(int id, Obj obj, unsigned int s |
|
ERR err; |
ERR err; |
int ret; |
int ret; |
extern char LastError[]; |
extern char LastError[]; |
extern int recv_intr; |
|
|
|
#if defined(VISUAL) |
check_intr(); |
if ( recv_intr ) { |
|
if ( recv_intr == 1 ) { |
|
recv_intr = 0; |
|
int_handler(SIGINT); |
|
} else { |
|
recv_intr = 0; |
|
ox_usr1_handler(0); |
|
} |
|
} |
|
#endif |
|
if ( do_message ) |
if ( do_message ) |
fprintf(stderr,"#%d Got %s",serial,name_of_id(id)); |
fprintf(stderr,"#%d Got %s",serial,name_of_id(id)); |
switch ( id ) { |
switch ( id ) { |
Line 238 static void process_resize(struct canvas *can,POINT st |
|
Line 229 static void process_resize(struct canvas *can,POINT st |
|
if ( can->mode == modeNO(INTERACTIVE) || can->mode == modeNO(POLARPLOT) ) |
if ( can->mode == modeNO(INTERACTIVE) || can->mode == modeNO(POLARPLOT) ) |
return; |
return; |
|
|
|
#if 0 |
if ( can->mode == modeNO(PLOT) ) |
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 249 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
Line 244 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
MATHCAP client_mathcap; |
MATHCAP client_mathcap; |
LIST list; |
LIST list; |
int i; |
int i; |
Q q; |
Z q; |
|
|
switch ( cmd ) { |
switch ( cmd ) { |
case SM_dupErrors: |
case SM_dupErrors: |
Line 258 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
Line 253 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
break; |
break; |
case SM_getsp: |
case SM_getsp: |
i = asir_OperandStackPtr+1; |
i = asir_OperandStackPtr+1; |
STOQ(i,q); |
STOZ(i,q); |
asir_push_one((Obj)q); |
asir_push_one((Obj)q); |
break; |
break; |
case SM_popSerializedLocalObject: |
case SM_popSerializedLocalObject: |
Line 306 static void asir_executeFunction(int serial) |
|
Line 301 static void asir_executeFunction(int serial) |
|
char *func; |
char *func; |
int argc; |
int argc; |
int id; |
int id; |
Q ret; |
Z ret; |
ERR err; |
ERR err; |
NODE n,n1; |
NODE n,n1; |
|
|
Line 321 static void asir_executeFunction(int serial) |
|
Line 316 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,PLOT); |
id = plot(n,modeNO(PLOT)); |
STOQ(id,ret); asir_push_one((Obj)ret); |
STOZ(id,ret); asir_push_one((Obj)ret); |
}else if ( !strcmp(func,"ifplot") ) { |
}else if ( !strcmp(func,"ifplot") ) { |
id = plot(n,IFPLOT); |
id = plot(n,modeNO(IFPLOT)); |
STOQ(id,ret); asir_push_one((Obj)ret); |
STOZ(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); |
STOZ(id,ret); asir_push_one((Obj)ret); |
} else if ( !strcmp(func,"open_canvas") ) { |
} else if ( !strcmp(func,"open_canvas") ) { |
id = open_canvas(n); |
id = open_canvas(n); |
STOQ(id,ret); asir_push_one((Obj)ret); |
STOZ(id,ret); asir_push_one((Obj)ret); |
} else if ( !strcmp(func,"plotover") ) { |
} else if ( !strcmp(func,"plotover") ) { |
plotover(n); |
plotover(n); |
} else if ( !strcmp(func,"drawcircle") ) { |
} else if ( !strcmp(func,"drawcircle") ) { |