=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/builtin/ctrl.c,v retrieving revision 1.48 retrieving revision 1.51 diff -u -p -r1.48 -r1.51 --- OpenXM_contrib2/asir2000/builtin/ctrl.c 2015/08/14 13:51:54 1.48 +++ OpenXM_contrib2/asir2000/builtin/ctrl.c 2016/08/24 01:33:53 1.51 @@ -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.50 2016/04/01 03:04:35 ohara Exp $ */ #include "ca.h" #include "parse.h" @@ -112,6 +112,7 @@ extern int diag_period; extern int weight_check; extern char **ASIRLOADPATH; extern int ASIRLOADPATH_LEN; +extern int No_ox_reset; static struct { char *key; @@ -151,6 +152,7 @@ static struct { {"no_debug_on_error",&no_debug_on_error}, {"diag_period",&diag_period}, {"weight_check",&weight_check}, + {"no_ox_reset",&No_ox_reset}, #if defined(INTERVAL) {"zerorewrite",&zerorewrite}, {"itvplotsize",&Itvplot}, @@ -172,6 +174,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; @@ -257,6 +263,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 = ox_pari_starting_function; + } else { + f = (Obj)ARG1(arg); + if ( !f || OID(f) == O_P) { + ox_pari_starting_function = f; + *rp = f; + }else { + *rp = 0; } } return;