| version 1.25, 2014/05/12 16:54:41 |
version 1.28, 2015/08/08 14:19:42 |
|
|
| * 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/asir2000/plot/ox_plot.c,v 1.24 2013/12/20 02:27:17 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot.c,v 1.27 2015/08/06 10:01:53 fujimoto Exp $ |
| */ |
*/ |
| #include "ca.h" |
#include "ca.h" |
| #include "parse.h" |
#include "parse.h" |
| Line 96 static void asir_do_cmd(unsigned int,unsigned int); |
|
| Line 96 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(); |
| |
|
| #if defined(VISUAL) |
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
| void ox_plot_main() |
void ox_plot_main() |
| #else |
#else |
| void ox_plot_main(int argc,char **argv) |
void ox_plot_main(int argc,char **argv) |
| Line 107 void ox_plot_main(int argc,char **argv) |
|
| Line 107 void ox_plot_main(int argc,char **argv) |
|
| int n; |
int n; |
| int use_x; |
int use_x; |
| |
|
| #if !defined(VISUAL) |
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
| ox_asir_init(argc,argv,"ox_plot"); |
ox_asir_init(argc,argv,"ox_plot"); |
| use_x=init_plot_display(argc,argv); |
use_x=init_plot_display(argc,argv); |
| if(use_x) ds=ConnectionNumber(display); |
if(use_x) ds=ConnectionNumber(display); |
| else fprintf(stderr,"Entering no X mode\n"); |
else fprintf(stderr,"Entering no X mode\n"); |
| #endif |
#endif |
| if(do_message)fprintf(stderr,"I'm an ox_plot, Version %d.\n",ASIR_VERSION); |
if(do_message)fprintf(stderr,"I'm an ox_plot, Version %d.\n",ASIR_VERSION); |
| |
#if defined(__MINGW32__) || defined(__MINGW64__) |
| |
fflush(stderr); |
| |
#endif |
| if(SETJMP(ox_env)){ |
if(SETJMP(ox_env)){ |
| while(NEXT(asir_infile))closecurrentinput(); |
while(NEXT(asir_infile))closecurrentinput(); |
| reset_current_computation(); |
reset_current_computation(); |
| ox_send_sync(0); |
ox_send_sync(0); |
| } |
} |
| while (1){ |
while (1){ |
| #if defined(VISUAL) |
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
| process_ox(); |
process_ox(); |
| #else |
#else |
| if(ox_data_is_available(0)) process_ox(); |
if(ox_data_is_available(0)) process_ox(); |
| Line 174 static void process_ox(){ |
|
| Line 176 static void process_ox(){ |
|
| break; |
break; |
| } |
} |
| if(do_message)fprintf(stderr,"\n"); |
if(do_message)fprintf(stderr,"\n"); |
| |
#if defined(__MINGW32__) || defined(__MINGW64__) |
| |
fflush(stderr); |
| |
#endif |
| } |
} |
| |
|
| static void asir_do_cmd(unsigned int cmd,unsigned int serial){ |
static void asir_do_cmd(unsigned int cmd,unsigned int serial){ |
| Line 232 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
| Line 237 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
| } |
} |
| } |
} |
| |
|
| static void asir_executeFunction(int serial){ |
static void asir_executeFunction(int serial){ |
| char *fn; |
char *fn; |
| int argc,id,fno; |
int argc,id,fno; |
| FUNC f; |
FUNC f; |
| Line 252 static void asir_executeFunction(int serial){ |
|
| Line 257 static void asir_executeFunction(int serial){ |
|
| id=-1; |
id=-1; |
| fno=modeNO(fn); |
fno=modeNO(fn); |
| switch (fno){ |
switch (fno){ |
| case 0://IFPLOTD |
case 0://IFPLOT |
| id=plot(n,IFPLOT); |
id=plot(n,fno); |
| STOQ(id,ret); |
STOQ(id,ret); |
| asir_push_one((Obj)ret); |
asir_push_one((Obj)ret); |
| break; |
break; |
| case 1://CONPLOT |
case 1://CONPLOT |
| id=plot(n,CONPLOT); |
id=plot(n,fno); |
| STOQ(id,ret); |
STOQ(id,ret); |
| asir_push_one((Obj)ret); |
asir_push_one((Obj)ret); |
| |
break; |
| case 2://PLOT |
case 2://PLOT |
| id=plot(n,PLOT); |
id=plot(n,fno); |
| STOQ(id,ret); |
STOQ(id,ret); |
| asir_push_one((Obj)ret); |
asir_push_one((Obj)ret); |
| break; |
break; |
| case 4://POLARPLOT |
case 4://POLARPLOT |
| id=polarplotNG(n); |
id=plot(n,fno); |
| STOQ(id,ret); |
STOQ(id,ret); |
| asir_push_one((Obj)ret); |
asir_push_one((Obj)ret); |
| break; |
break; |
| Line 306 static void asir_executeFunction(int serial){ |
|
| Line 312 static void asir_executeFunction(int serial){ |
|
| case 37://CLEAR_CANVAS |
case 37://CLEAR_CANVAS |
| clear_canvas(n); |
clear_canvas(n); |
| break; |
break; |
| #if defined(INTERVAL) |
|
| // ifplotNG |
// ifplotNG |
| case 36://OBJ_CP |
case 36://OBJ_CP |
| id=objcp(n); |
id=objcp(n); |
| Line 322 static void asir_executeFunction(int serial){ |
|
| Line 327 static void asir_executeFunction(int serial){ |
|
| case 21://CONPLOTD |
case 21://CONPLOTD |
| case 22://CONPLOTQ |
case 22://CONPLOTQ |
| case 23://CONPLOTB |
case 23://CONPLOTB |
| |
#if defined(INTERVAL) |
| case 24://ITVIFPLOT |
case 24://ITVIFPLOT |
| id=ifplotNG(n,modeNO(fn)); |
#endif |
| |
id=ifplotNG(n,fno); |
| STOQ(id,ret); |
STOQ(id,ret); |
| asir_push_one((Obj)ret); |
asir_push_one((Obj)ret); |
| break; |
break; |
| Line 339 static void asir_executeFunction(int serial){ |
|
| Line 346 static void asir_executeFunction(int serial){ |
|
| case 25://PLOTOVERD |
case 25://PLOTOVERD |
| case 26://PLOTOVERQ |
case 26://PLOTOVERQ |
| case 27://PLOTOVERB |
case 27://PLOTOVERB |
| id=ifplotOP(n,modeNO(fn)); |
id=ifplotOP(n,fno); |
| STOQ(id,ret); |
STOQ(id,ret); |
| asir_push_one((Obj)ret); |
asir_push_one((Obj)ret); |
| break; |
break; |
| #endif |
case 38://POLARPLOTD |
| |
id=polarplotNG(n); |
| |
STOQ(id,ret); |
| |
asir_push_one((Obj)ret); |
| |
break; |
| } |
} |
| } |
} |