=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/builtin/ctrl.c,v retrieving revision 1.49 retrieving revision 1.53 diff -u -p -r1.49 -r1.53 --- OpenXM_contrib2/asir2000/builtin/ctrl.c 2016/03/31 06:41:20 1.49 +++ OpenXM_contrib2/asir2000/builtin/ctrl.c 2017/08/31 02:36:20 1.53 @@ -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.48 2015/08/14 13:51:54 fujimoto Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/builtin/ctrl.c,v 1.52 2016/08/26 04:56:07 takayama 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,8 @@ 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}, #if defined(INTERVAL) {"zerorewrite",&zerorewrite}, {"itvplotsize",&Itvplot}, @@ -158,9 +161,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,8 +173,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; @@ -238,7 +241,7 @@ Q *rp; MKNODE(node,s,p); } MKLIST(list,node); - *rp = list; + *rp = (Q)list; } } else { list = (LIST)ARG1(arg); @@ -263,7 +266,6 @@ Q *rp; } return; } else if ( !strcmp(key,"oxpari_id") ) { - *rp = 0; if ( argc(arg) == 1 ) { if(!ox_pari_stream_initialized) { t=-1; @@ -280,6 +282,19 @@ Q *rp; }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;