=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/pexpr.c,v retrieving revision 1.27 retrieving revision 1.30 diff -u -p -r1.27 -r1.30 --- OpenXM_contrib2/asir2000/io/pexpr.c 2003/12/25 02:40:24 1.27 +++ OpenXM_contrib2/asir2000/io/pexpr.c 2004/02/13 05:48:36 1.30 @@ -44,7 +44,7 @@ * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. - * $OpenXM: OpenXM_contrib2/asir2000/io/pexpr.c,v 1.26 2003/12/24 08:00:38 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/io/pexpr.c,v 1.29 2004/02/09 08:23:30 noro Exp $ */ #include "ca.h" #include "al.h" @@ -107,6 +107,8 @@ int print_quote; #define PRINTUP printup #define PRINTUM printum #define PRINTSF printsf +#define PRINTSYMBOL printsymbol +#define PRINTRANGE printrange #endif #ifdef SPRINT @@ -117,6 +119,7 @@ extern int hex_output; extern int fortran_output; extern int double_output; extern int real_digit; +extern int real_binary; extern int print_quote; @@ -153,6 +156,8 @@ extern int print_quote; #define PRINTUP sprintup #define PRINTUM sprintum #define PRINTSF sprintsf +#define PRINTSYMBOL sprintsymbol +#define PRINTRANGE sprintrange #endif void PRINTEXPR(); @@ -184,6 +189,8 @@ void PRINTEOP(); void PRINTLOP(); void PRINTQOP(); void PRINTSF(); +void PRINTSYMBOL(); +void PRINTRANGE(); #ifdef FPRINT void output_init() { @@ -230,7 +237,11 @@ char *s; void myoutbrute(g) GEN g; { +# if PARI_VERSION_CODE > 131588 + brute(g, 'f',-1); +# else bruteall(g,'f',-1,1); +# endif } void sprintbf(a) @@ -294,6 +305,10 @@ Obj p; PRINTBYTEARRAY(vl,(BYTEARRAY)p); break; case O_QUOTE: PRINTQUOTE(vl,(QUOTE)p); break; + case O_SYMBOL: + PRINTSYMBOL((SYMBOL)p); break; + case O_RANGE: + PRINTRANGE(vl,(RANGE)p); break; default: break; } @@ -1169,4 +1184,18 @@ unsigned int i; } else { TAIL PRINTF(OUT,"@_%d",IFTOF(i)); } +} + +void PRINTSYMBOL(SYMBOL sym) +{ + PUTS(sym->name); +} + +void PRINTRANGE(VL vl,RANGE p) +{ + PUTS("range("); + PRINTEXPR(vl,p->start); + PUTS(","); + PRINTEXPR(vl,p->end); + PUTS(")"); }