=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/builtin/strobj.c,v retrieving revision 1.7 retrieving revision 1.11 diff -u -p -r1.7 -r1.11 --- OpenXM_contrib2/asir2000/builtin/strobj.c 2000/08/22 05:04:00 1.7 +++ OpenXM_contrib2/asir2000/builtin/strobj.c 2004/02/13 05:48:35 1.11 @@ -45,14 +45,16 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/builtin/strobj.c,v 1.6 2000/08/21 08:31:21 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/builtin/strobj.c,v 1.10 2003/02/14 22:29:07 ohara Exp $ */ #include "ca.h" #include "parse.h" #include "ctype.h" -#if PARI +#if defined(PARI) #include "genpari.h" +# if !(PARI_VERSION_CODE > 131588) extern jmp_buf environnement; +# endif #endif #include @@ -105,7 +107,7 @@ Q *rp; p = BDY(str); spos = QTOS(start); chr = BDY(terminator)[0]; - if ( spos > strlen(p) ) + if ( spos > (int)strlen(p) ) r = -1; else { ind = strchr(p+spos,chr); @@ -203,15 +205,19 @@ Obj *rp; { FNODE fnode; char *cmd; -#if PARI +#if defined(PARI) + void recover(int); + recover(0); +# if !(PARI_VERSION_CODE > 131588) if ( setjmp(environnement) ) { avma = top; recover(1); resetenv(""); } +# endif #endif cmd = BDY((STRING)ARG0(arg)); - exprparse(0,cmd,&fnode); + exprparse_create_var(0,cmd,&fnode); *rp = eval(fnode); } @@ -233,7 +239,7 @@ void Pstrtov(arg,rp) NODE arg; P *rp; { - char *p,*t; + char *p; p = BDY((STRING)ARG0(arg)); #if 0