=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/pexpr_body.c,v retrieving revision 1.10 retrieving revision 1.16 diff -u -p -r1.10 -r1.16 --- OpenXM_contrib2/asir2000/io/pexpr_body.c 2005/11/16 23:42:54 1.10 +++ OpenXM_contrib2/asir2000/io/pexpr_body.c 2015/08/06 10:01:52 1.16 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM_contrib2/asir2000/io/pexpr_body.c,v 1.9 2005/09/28 08:08:34 noro Exp $ */ +/* $OpenXM: OpenXM_contrib2/asir2000/io/pexpr_body.c,v 1.15 2015/08/04 06:20:45 noro Exp $ */ #define PRINTHAT (fortran_output?PUTS("**"):PUTS("^")) @@ -616,7 +616,7 @@ void PRINTFNODE(FNODE f,int paren) /* lists */ case I_LIST: PUTS("["); PRINTFNODENODE((NODE)FA0(f)); PUTS("]"); break; /* function */ - case I_FUNC: + case I_FUNC: case I_FUNC_QARG: if ( !strcmp(((FUNC)FA0(f))->name,"@pi") ) PUTS("@pi"); else if ( !strcmp(((FUNC)FA0(f))->name,"@e") ) PUTS("@e"); else { @@ -689,7 +689,7 @@ Num q; int i,expo; m = (unsigned int *)&BDY((Real)q); -#if defined(__i386__) || defined(MIPSEL) || defined(VISUAL) || defined(__alpha) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__x86_64) +#if defined(__i386__) || defined(MIPSEL) || defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) || defined(__alpha) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__x86_64) u = m[1]; l = m[0]; #else u = m[0]; l = m[1]; @@ -765,10 +765,8 @@ Num q; case N_A: PUTS("("); PRINTR(ALG,(R)BDY((Alg)q)); PUTS(")"); break; -#if defined(PARI) case N_B: PRINTBF((BF)q); break; -#endif #if defined(INTERVAL) case N_IP: case N_IntervalBigFloat: @@ -890,6 +888,12 @@ Num q; PRINTN(NM(dn)); } break; + case N_GZ: + mpz_out_str(OUT,10,BDY((GZ)q)); + break; + case N_GQ: + mpq_out_str(OUT,10,BDY((GQ)q)); + break; } } @@ -1087,13 +1091,17 @@ void PRINTNBP(VL vl,NBP p) else { for ( t = BDY(p); t; t = NEXT(t) ) { m = (NBM)BDY(t); + PUTS("("); PRINTEXPR(vl,(Obj)m->c); + PUTS(")*"); d = m->d; b = m->b; - for ( i = 0; i < d; i++ ) { - if ( NBM_GET(b,i) ) PUTS("x"); - else PUTS("y"); - } + if ( d ) + for ( i = 0; i < d; i++ ) { + if ( NBM_GET(b,i) ) PUTS("x"); + else PUTS("y"); + } + else PUTS("1"); if ( NEXT(t) ) PUTS("+"); } }