version 1.1, 1999/12/03 07:39:13 |
version 1.4, 2000/06/07 08:46:41 |
|
|
/* $OpenXM: OpenXM/src/asir99/plot/ox_plot.c,v 1.3 1999/11/19 05:51:24 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot.c,v 1.3 2000/04/13 06:51:09 noro Exp $ */ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
#include "ox.h" |
#include "ox.h" |
#include "ifplot.h" |
#include "ifplot.h" |
#include "version.h" |
#include "version.h" |
|
#include <signal.h> |
|
#if PARI |
|
#include "genpari.h" |
|
#endif |
|
|
void ox_usr1_handler(); |
void ox_usr1_handler(); |
|
|
Line 36 static void asir_popSerializedLocalObject(); |
|
Line 40 static void asir_popSerializedLocalObject(); |
|
static char *name_of_cmd(unsigned int); |
static char *name_of_cmd(unsigned int); |
static char *name_of_id(int); |
static char *name_of_id(int); |
static void asir_do_cmd(unsigned int,unsigned int); |
static void asir_do_cmd(unsigned int,unsigned int); |
|
static LIST asir_GetErrorList(); |
|
|
static void create_error(ERR *err,unsigned int serial,char *msg) |
static void create_error(ERR *err,unsigned int serial,char *msg) |
{ |
{ |
Line 132 static void process_ox() |
|
Line 137 static void process_ox() |
|
static void asir_do_cmd(unsigned int cmd,unsigned int serial) |
static void asir_do_cmd(unsigned int cmd,unsigned int serial) |
{ |
{ |
MATHCAP client_mathcap; |
MATHCAP client_mathcap; |
|
LIST list; |
|
int i; |
|
Q q; |
|
|
switch ( cmd ) { |
switch ( cmd ) { |
|
case SM_dupErrors: |
|
list = asir_GetErrorList(); |
|
asir_push_one((Obj)list); |
|
break; |
|
case SM_getsp: |
|
i = plot_OperandStackPtr+1; |
|
STOQ(i,q); |
|
asir_push_one((Obj)q); |
|
break; |
case SM_popSerializedLocalObject: |
case SM_popSerializedLocalObject: |
asir_popSerializedLocalObject(); |
asir_popSerializedLocalObject(); |
break; |
break; |
Line 430 static void asir_push_one(Obj obj) |
|
Line 447 static void asir_push_one(Obj obj) |
|
} |
} |
plot_OperandStack[plot_OperandStackPtr] = obj; |
plot_OperandStack[plot_OperandStackPtr] = obj; |
} |
} |
|
} |
|
|
|
static LIST asir_GetErrorList() |
|
{ |
|
int i; |
|
NODE n,n0; |
|
LIST err; |
|
Obj obj; |
|
|
|
for ( i = 0, n0 = 0; i <= plot_OperandStackPtr; i++ ) |
|
if ( (obj = plot_OperandStack[i]) && (OID(obj) == O_ERR) ) { |
|
NEXTNODE(n0,n); BDY(n) = (pointer)obj; |
|
} |
|
if ( n0 ) |
|
NEXT(n) = 0; |
|
MKLIST(err,n0); |
|
return err; |
} |
} |
|
|
static Obj asir_pop_one() { |
static Obj asir_pop_one() { |