=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2018/io/pexpr_body.c,v retrieving revision 1.1 retrieving revision 1.4 diff -u -p -r1.1 -r1.4 --- OpenXM_contrib2/asir2018/io/pexpr_body.c 2018/09/19 05:45:08 1.1 +++ OpenXM_contrib2/asir2018/io/pexpr_body.c 2020/10/06 06:31:20 1.4 @@ -1,4 +1,4 @@ -/* $OpenXM$ */ +/* $OpenXM: OpenXM_contrib2/asir2018/io/pexpr_body.c,v 1.3 2020/02/22 06:23:36 noro Exp $ */ #define PRINTHAT (fortran_output?PUTS("**"):PUTS("^")) @@ -45,6 +45,9 @@ void PRINTSF(unsigned int i); void PRINTSYMBOL(SYMBOL sym); void PRINTBF(BF a); void PRINTMPZ(mpz_t z); +#if defined(INTERVAL) +void PRINTBF4ITV(BF); +#endif void PRINTEXPR(VL vl,Obj p) { @@ -565,6 +568,7 @@ void PRINTFNODE(FNODE f,int paren) case L_AND: opname = ("@&&"); break; case L_OR: opname = ("@||"); break; case L_NOT: opname = ("@!"); break; + default: break; } if ( (lid)FA0(f)==L_NOT ) { PUTS(opname); PRINTFNODE((FNODE)FA1(f),1); @@ -742,21 +746,27 @@ void PRINTNUM(Num q) PRINTBF((BF)q); break; #if defined(INTERVAL) case N_IP: + PUTS("["); + PRINTNUM(INF((Itv)q)); + PUTS(","); + PRINTNUM(SUP((Itv)q)); + PUTS("]"); + break; case N_IntervalBigFloat: switch ( outputstyle ) { case 1: PUTS("intval("); - PRINTNUM(INF((Itv)q)); + PRINTBF4ITV(INF((IntervalBigFloat)q)); PUTS(","); - PRINTNUM(SUP((Itv)q)); + PRINTBF4ITV(SUP((IntervalBigFloat)q)); PUTS(")"); break; case 0: default: PUTS("["); - PRINTNUM(INF((Itv)q)); + PRINTBF4ITV(INF((IntervalBigFloat)q)); PUTS(","); - PRINTNUM(SUP((Itv)q)); + PRINTBF4ITV(SUP((IntervalBigFloat)q)); PUTS("]"); break; } @@ -1005,7 +1015,7 @@ void PRINTQUOTE(VL vl,QUOTE quote) LIST list; if ( print_quote == 1 ) { - fnodetotree(BDY(quote),&list); + fnodetotree(BDY(quote),quote->pvs,&list); PRINTEXPR(vl,(Obj)list); } else if ( print_quote == 2 ) { PRINTFNODE(BDY(quote),0); @@ -1089,7 +1099,7 @@ void PRINTUP2(UP2 p) PUTS("@"); PRINTHAT; TAIL PRINTF(OUT,"%d",d); } for ( i = d-1; i >= 0; i-- ) { - if ( p->b[i/BSH] & (1<<(i%BSH)) ) + if ( p->b[i/BSH] & (1<<(i%BSH)) ) { if ( !i ) { TAIL PRINTF(OUT,"+1"); } else if ( i == 1 ) { @@ -1097,6 +1107,7 @@ void PRINTUP2(UP2 p) } else { PUTS("+@"); PRINTHAT; TAIL PRINTF(OUT,"%d",i); } + } } TAIL PRINTF(OUT,")"); }