version 1.1, 2000/11/22 06:20:13 |
version 1.7, 2006/02/08 05:31:37 |
|
|
* 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.7 2000/09/12 06:05:31 noro Exp $ |
* $OpenXM: OpenXM_contrib2/windows/engine2000/plot.c,v 1.6 2002/08/02 09:30:23 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
|
|
#include "genpari.h" |
#include "genpari.h" |
#endif |
#endif |
|
|
void ox_usr1_handler(); |
|
|
|
extern int asir_OperandStackSize; |
extern int asir_OperandStackSize; |
extern Obj *asir_OperandStack; |
extern Obj *asir_OperandStack; |
extern int asir_OperandStackPtr; |
extern int asir_OperandStackPtr; |
Line 74 extern char LastError[]; |
|
Line 72 extern char LastError[]; |
|
void create_error(ERR *,unsigned int ,char *); |
void create_error(ERR *,unsigned int ,char *); |
|
|
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 92 LIST asir_GetErrorList(); |
|
Line 90 LIST asir_GetErrorList(); |
|
static void asir_do_cmd(unsigned int,unsigned int); |
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); |
|
|
#if defined(VISUAL) |
#if defined(VISUAL) |
|
|
Line 105 void ox_plot_main() |
|
Line 104 void ox_plot_main() |
|
void ox_plot_main(int argc,char **argv) |
void ox_plot_main(int argc,char **argv) |
#endif |
#endif |
{ |
{ |
|
#if !defined(VISUAL) |
int ds; |
int ds; |
fd_set r; |
fd_set r; |
int n; |
int n; |
|
#endif |
int id; |
int id; |
Obj obj; |
Obj obj; |
unsigned int serial; |
unsigned int serial; |
Line 117 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 205 static void process_ox(int id, Obj obj, unsigned int s |
|
Line 206 static void process_ox(int id, Obj obj, unsigned int s |
|
break; |
break; |
if ( do_message ) |
if ( do_message ) |
fprintf(stderr," %s\n",name_of_cmd(cmd)); |
fprintf(stderr," %s\n",name_of_cmd(cmd)); |
if ( ret = setjmp(env) ) { |
if ( ret = setjmp(main_env) ) { |
if ( ret == 1 ) { |
if ( ret == 1 ) { |
create_error(&err,serial,LastError); |
create_error(&err,serial,LastError); |
asir_push_one((Obj)err); |
asir_push_one((Obj)err); |
Line 232 static void process_ox(int id, Obj obj, unsigned int s |
|
Line 233 static void process_ox(int id, Obj obj, unsigned int s |
|
fprintf(stderr,"\n"); |
fprintf(stderr,"\n"); |
} |
} |
|
|
static process_resize(can,startp,endp) |
static void process_resize(struct canvas *can,POINT startp,POINT endp) |
struct canvas *can; |
|
POINT startp,endp; |
|
{ |
{ |
if ( can->mode == MODE_INTERACTIVE ) |
if ( can->mode == MODE_INTERACTIVE || can->mode == MODE_POLARPLOT ) |
return; |
return; |
|
|
if ( can->mode == MODE_PLOT ) |
if ( can->mode == MODE_PLOT ) |
Line 284 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
Line 283 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 301 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
Line 301 static void asir_do_cmd(unsigned int cmd,unsigned int |
|
} |
} |
} |
} |
|
|
static void asir_executeFunction(serial) |
static void asir_executeFunction(int serial) |
int serial; |
|
{ |
{ |
char *func; |
char *func; |
int argc; |
int argc; |
int id; |
int id; |
FUNC f; |
|
Q ret; |
Q ret; |
VL vl; |
|
ERR err; |
ERR err; |
NODE n,n1; |
NODE n,n1; |
|
|
|
|
create_error(&err,serial,LastError); |
create_error(&err,serial,LastError); |
asir_push_one((Obj)err); |
asir_push_one((Obj)err); |
} |
} |
|
} else if ( !strcmp(func,"draw_string") ) { |
|
if ( draw_string(n) < 0 ) { |
|
create_error(&err,serial,LastError); |
|
asir_push_one((Obj)err); |
|
} |
} else if ( !strcmp(func,"clear_canvas") ) { |
} else if ( !strcmp(func,"clear_canvas") ) { |
clear_canvas(n); |
clear_canvas(n); |
} |
} |
} |
} |
|
|
print_rect(int x, int y, int z, int w) |
void print_rect(int x, int y, int z, int w) |
{ |
{ |
extern DWORD MainThread; |
extern DWORD MainThread; |
|
|