version 1.13, 2016/08/01 01:35:01 |
version 1.15, 2016/09/23 07:03:29 |
|
|
/* $OpenXM: OpenXM/src/ox_pari/ox_pari.c,v 1.12 2015/08/21 01:20:30 noro Exp $ */ |
/* $OpenXM: OpenXM/src/ox_pari/ox_pari.c,v 1.14 2016/08/23 03:03:26 ohara Exp $ */ |
|
|
#include "ox_pari.h" |
#include "ox_pari.h" |
|
|
|
|
|
|
int sm_mathcap() |
int sm_mathcap() |
{ |
{ |
mathcap_init(OX_PARI_VERSION, ID_STRING, "ox_pari", NULL, NULL); |
char *opts[] = {"no_ox_reset", NULL}; |
|
mathcap_init2(OX_PARI_VERSION, ID_STRING, "ox_pari", NULL, NULL, opts); |
push((cmo*)oxf_cmo_mathcap(fd_rw)); |
push((cmo*)oxf_cmo_mathcap(fd_rw)); |
return 0; |
return 0; |
} |
} |
Line 151 int sm_executeFunction() |
|
Line 152 int sm_executeFunction() |
|
struct parif *parif; |
struct parif *parif; |
unsigned long prec; |
unsigned long prec; |
char buf[BUFSIZ]; |
char buf[BUFSIZ]; |
|
int status; |
|
char *err; |
|
|
if ( setjmp(GP_DATA->env) ) { |
if ( (status = setjmp(GP_DATA->env)) != 0 ) { |
sprintf(buf,"sm_executeFunction : an error occured in PARI."); |
err = errmessage[status]; |
|
if ( status == errpile ) { |
|
sprintf(buf,"%s\nIncrease PARI stack by pari(allocatemem,size).",err); |
|
init_pari(); |
|
} else if ( strlen(err) != 0 ) |
|
sprintf(buf,"An error occured in PARI :%s",err); |
|
else |
|
sprintf(buf,"An error occured in PARI."); |
push((cmo*)make_error2(buf)); |
push((cmo*)make_error2(buf)); |
return -1; |
return -1; |
} |
} |