=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/asir_lib.c,v retrieving revision 1.3 retrieving revision 1.8 diff -u -p -r1.3 -r1.8 --- OpenXM_contrib2/asir2000/parse/asir_lib.c 2000/08/22 05:04:25 1.3 +++ OpenXM_contrib2/asir2000/parse/asir_lib.c 2004/06/15 00:56:52 1.8 @@ -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/parse/asir_lib.c,v 1.2 2000/08/21 08:31:45 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/asir_lib.c,v 1.7 2004/02/13 05:48:36 saito Exp $ */ #include "ca.h" #include "parse.h" @@ -53,14 +53,14 @@ #include #endif -#if PARI -#include "genpari.h" - +#if defined(PARI) +# include "genpari.h" +# if !(PARI_VERSION_CODE > 131588 ) extern jmp_buf environnement; +# endif #endif extern jmp_buf env; -extern int *StackBottom; extern char *parse_strp; extern int do_file; @@ -69,7 +69,6 @@ int Call_Asir(char *,pointer *); void Init_Asir(int argc,char **argv) { - int tmp; FILE *ifp; char ifname[BUFSIZ]; extern int GC_dont_gc; @@ -80,9 +79,10 @@ void Init_Asir(int argc,char **argv) if ( asirlib_initialized ) return; + GC_init(); asirlib_initialized = 1; do_file = 1; -#if PARI +#if defined(PARI) risa_pari_init(); #endif srandom((int)get_current_time()); @@ -91,14 +91,12 @@ void Init_Asir(int argc,char **argv) #if defined(THINK_C) param_init(); #endif - StackBottom = &tmp + 1; /* XXX */ rtime_init(); env_init(); endian_init(); #if !defined(VISUAL) && !defined(THINK_C) /* check_key(); */ #endif - GC_init(); process_args(--argc,++argv); copyright(); output_init(); @@ -136,12 +134,16 @@ int Call_Asir(char *cmd,pointer *result) { SNODE snode; pointer val; -#if PARI +#if defined(PARI) + void recover(int); + recover(0); +# if !(PARI_VERSION_CODE > 131588) if ( setjmp(environnement) ) { avma = top; recover(1); error("PARI error"); } +# endif #endif if ( setjmp(env) ) { *result = 0;