=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/builtin/ctrl.c,v retrieving revision 1.48 retrieving revision 1.54 diff -u -p -r1.48 -r1.54 --- OpenXM_contrib2/asir2000/builtin/ctrl.c 2015/08/14 13:51:54 1.48 +++ OpenXM_contrib2/asir2000/builtin/ctrl.c 2017/09/04 01:57:53 1.54 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/builtin/ctrl.c,v 1.47 2015/08/06 10:01:51 fujimoto Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/builtin/ctrl.c,v 1.53 2017/08/31 02:36:20 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -112,6 +112,9 @@ extern int diag_period; extern int weight_check; extern char **ASIRLOADPATH; extern int ASIRLOADPATH_LEN; +extern int No_ox_reset; +extern int plot_by_bigfloat; +extern int debug_plot; static struct { char *key; @@ -151,6 +154,10 @@ static struct { {"no_debug_on_error",&no_debug_on_error}, {"diag_period",&diag_period}, {"weight_check",&weight_check}, + {"no_ox_reset",&No_ox_reset}, + {"fake_ox_reset",&No_ox_reset}, + {"plot_by_bigfloat",&plot_by_bigfloat}, + {"debug_plot",&debug_plot}, #if defined(INTERVAL) {"zerorewrite",&zerorewrite}, {"itvplotsize",&Itvplot}, @@ -158,9 +165,7 @@ static struct { {0,0}, }; -void Pctrl(arg,rp) -NODE arg; -Q *rp; +void Pctrl(NODE arg,Q *rp) { int t,i,n; int nm,dv; @@ -172,6 +177,10 @@ Q *rp; STRING s; NODE node,p; LIST list; + P f; + extern Q ox_pari_stream; + extern int ox_pari_stream_initialized; + extern P ox_pari_starting_function; if ( !arg ) { *rp = 0; @@ -236,7 +245,7 @@ Q *rp; MKNODE(node,s,p); } MKLIST(list,node); - *rp = list; + *rp = (Q)list; } } else { list = (LIST)ARG1(arg); @@ -257,6 +266,39 @@ Q *rp; ASIRLOADPATH[i] = NULL; }else { error("ctrl : loadpath : invalid argument"); + } + } + return; + } else if ( !strcmp(key,"oxpari_id") ) { + if ( argc(arg) == 1 ) { + if(!ox_pari_stream_initialized) { + t=-1; + STOQ(t,*rp); + }else { + *rp = ox_pari_stream; + } + }else { + c = (Q)ARG1(arg); + if ( !c || ( NUM(c) && INT(c) && SGN(c)>0 ) ) { + ox_pari_stream_initialized = 1; + ox_pari_stream = c; + *rp = c; + }else { + t=-1; + STOQ(t,*rp); + } + } + return; + } else if ( !strcmp(key,"oxpari_start") ) { + if ( argc(arg) == 1 ) { + *rp = (Q)ox_pari_starting_function; + } else { + f = (P)ARG1(arg); + if ( !f || OID(f) == O_P) { + ox_pari_starting_function = f; + *rp = (Q)f; + }else { + *rp = 0; } } return;