version 1.69, 2013/11/21 06:48:04 |
version 1.71, 2015/08/04 06:20:45 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/parse/eval.c,v 1.68 2011/02/18 02:54:49 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/eval.c,v 1.70 2014/08/09 06:08:11 noro Exp $ |
*/ |
*/ |
#include <ctype.h> |
#include <ctype.h> |
#include "ca.h" |
#include "ca.h" |
|
|
#endif |
#endif |
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
#if defined(PARI) |
|
#include "genpari.h" |
|
#endif |
|
|
|
extern JMP_BUF timer_env; |
extern JMP_BUF timer_env; |
extern FUNC cur_binf; |
extern FUNC cur_binf; |
Line 70 int evalstatline; |
|
Line 67 int evalstatline; |
|
int recv_intr; |
int recv_intr; |
int show_crossref; |
int show_crossref; |
int at_root; |
int at_root; |
void gen_searchf_searchonly(char *name,FUNC *r); |
void gen_searchf_searchonly(char *name,FUNC *r,int global); |
LIST eval_arg(FNODE a,unsigned int quote); |
LIST eval_arg(FNODE a,unsigned int quote); |
|
|
pointer eval(FNODE f) |
pointer eval(FNODE f) |
Line 733 pointer evalstat(SNODE f) |
|
Line 730 pointer evalstat(SNODE f) |
|
case S_BP: |
case S_BP: |
if ( !nextbp && (!FA1(f) || eval((FNODE)FA1(f))) ) { |
if ( !nextbp && (!FA1(f) || eval((FNODE)FA1(f))) ) { |
if ( (FNODE)FA2(f) ) { |
if ( (FNODE)FA2(f) ) { |
#if defined(PARI) |
|
pari_outfile = stderr; |
|
#endif |
|
asir_out = stderr; |
asir_out = stderr; |
printexpr(CO,eval((FNODE)FA2(f))); |
printexpr(CO,eval((FNODE)FA2(f))); |
putc('\n',asir_out); fflush(asir_out); |
putc('\n',asir_out); fflush(asir_out); |
#if defined(PARI) |
|
pari_outfile = stdout; |
|
#endif |
|
asir_out = stdout; |
asir_out = stdout; |
} else { |
} else { |
nextbp = 1; nextbplevel = 0; |
nextbp = 1; nextbplevel = 0; |
Line 882 pointer evalf(FUNC f,FNODE a,FNODE opt) |
|
Line 873 pointer evalf(FUNC f,FNODE a,FNODE opt) |
|
FUNC f1; |
FUNC f1; |
|
|
if ( f->id == A_UNDEF ) { |
if ( f->id == A_UNDEF ) { |
gen_searchf_searchonly(f->fullname,&f1); |
gen_searchf_searchonly(f->fullname,&f1,0); |
if ( f1->id == A_UNDEF ) { |
if ( f1->id == A_UNDEF ) { |
sprintf(errbuf,"evalf : %s undefined",NAME(f)); |
sprintf(errbuf,"evalf : %s undefined",NAME(f)); |
error(errbuf); |
error(errbuf); |
Line 1435 void gen_searchf(char *name,FUNC *r) |
|
Line 1426 void gen_searchf(char *name,FUNC *r) |
|
*r = val; |
*r = val; |
} |
} |
|
|
void gen_searchf_searchonly(char *name,FUNC *r) |
void gen_searchf_searchonly(char *name,FUNC *r,int global) |
{ |
{ |
FUNC val = 0; |
FUNC val = 0; |
int global = 0; |
|
if ( *name == ':' ) { |
if ( *name == ':' ) { |
global = 1; |
global = 1; |
name += 2; |
name += 2; |