=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/eval.c,v retrieving revision 1.69 retrieving revision 1.73 diff -u -p -r1.69 -r1.73 --- OpenXM_contrib2/asir2000/parse/eval.c 2013/11/21 06:48:04 1.69 +++ OpenXM_contrib2/asir2000/parse/eval.c 2015/08/08 14:19:42 1.73 @@ -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/eval.c,v 1.68 2011/02/18 02:54:49 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/eval.c,v 1.72 2015/08/06 10:01:53 fujimoto Exp $ */ #include #include "ca.h" @@ -57,9 +57,6 @@ #endif #include #include -#if defined(PARI) -#include "genpari.h" -#endif extern JMP_BUF timer_env; extern FUNC cur_binf; @@ -70,7 +67,7 @@ int evalstatline; int recv_intr; int show_crossref; 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); pointer eval(FNODE f) @@ -95,7 +92,7 @@ pointer eval(FNODE f) RANGE range; QUOTE expr,pattern; -#if defined(VISUAL) +#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) if ( recv_intr ) { #include if ( recv_intr == 1 ) { @@ -196,7 +193,7 @@ pointer eval(FNODE f) val = eval_rec_mapf((FUNC)FA0(f),(FNODE)FA1(f)); break; case I_IFUNC: val = evalif((FNODE)FA0(f),(FNODE)FA1(f),(FNODE)FA2(f)); break; -#if !defined(VISUAL) +#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) case I_TIMER: { int interval; @@ -733,15 +730,9 @@ pointer evalstat(SNODE f) case S_BP: if ( !nextbp && (!FA1(f) || eval((FNODE)FA1(f))) ) { if ( (FNODE)FA2(f) ) { -#if defined(PARI) - pari_outfile = stderr; -#endif asir_out = stderr; printexpr(CO,eval((FNODE)FA2(f))); putc('\n',asir_out); fflush(asir_out); -#if defined(PARI) - pari_outfile = stdout; -#endif asir_out = stdout; } else { nextbp = 1; nextbplevel = 0; @@ -882,7 +873,7 @@ pointer evalf(FUNC f,FNODE a,FNODE opt) FUNC f1; if ( f->id == A_UNDEF ) { - gen_searchf_searchonly(f->fullname,&f1); + gen_searchf_searchonly(f->fullname,&f1,0); if ( f1->id == A_UNDEF ) { sprintf(errbuf,"evalf : %s undefined",NAME(f)); error(errbuf); @@ -936,7 +927,7 @@ pointer evalf(FUNC f,FNODE a,FNODE opt) break; case A_USR: /* stack check */ -#if !defined(VISUAL) && !defined(__CYGWIN__) +#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) && !defined(__CYGWIN__) if ( !stack_size ) { struct rlimit rl; getrlimit(RLIMIT_STACK,&rl); @@ -1435,10 +1426,9 @@ void gen_searchf(char *name,FUNC *r) *r = val; } -void gen_searchf_searchonly(char *name,FUNC *r) +void gen_searchf_searchonly(char *name,FUNC *r,int global) { FUNC val = 0; - int global = 0; if ( *name == ':' ) { global = 1; name += 2; @@ -1602,6 +1592,9 @@ void mkuf(char *name,char *fname,NODE args,SNODE body, CPVS = GPVS; CUR_FUNC = 0; clearbp(f); +#if defined(__MINGW32__) || defined(__MINGW64__) + fflush(stderr); +#endif } /*