=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/pexpr.c,v retrieving revision 1.25 retrieving revision 1.29 diff -u -p -r1.25 -r1.29 --- OpenXM_contrib2/asir2000/io/pexpr.c 2003/12/02 06:56:48 1.25 +++ OpenXM_contrib2/asir2000/io/pexpr.c 2004/02/09 08:23:30 1.29 @@ -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.24 2003/06/09 16:18:10 saito Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/io/pexpr.c,v 1.28 2004/02/04 07:42:07 noro Exp $ */ #include "ca.h" #include "al.h" @@ -52,6 +52,10 @@ #include "comp.h" #include "base.h" +#if defined(PARI) +#include "genpari.h" +#endif + #ifndef FPRINT #define FPRINT #endif @@ -103,6 +107,8 @@ int print_quote; #define PRINTUP printup #define PRINTUM printum #define PRINTSF printsf +#define PRINTSYMBOL printsymbol +#define PRINTRANGE printrange #endif #ifdef SPRINT @@ -113,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; @@ -149,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(); @@ -180,6 +189,8 @@ void PRINTEOP(); void PRINTLOP(); void PRINTQOP(); void PRINTSF(); +void PRINTSYMBOL(); +void PRINTRANGE(); #ifdef FPRINT void output_init() { @@ -210,8 +221,6 @@ P p; void printbf(a) BF a; { - void sor(); - sor(a->body,double_output ? 'f' : 'g',-1,0); } #endif @@ -225,8 +234,6 @@ char *s; } #if defined(PARI) -#include "genpari.h" - void myoutbrute(g) GEN g; { @@ -237,7 +244,6 @@ void sprintbf(a) BF a; { char *str; - char *GENtostr(); char *GENtostr0(); if ( double_output ) { @@ -295,6 +301,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; } @@ -402,7 +412,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__) +#if defined(__i386__) || defined(MIPSEL) || defined(VISUAL) || defined(__alpha) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__x86_64) u = m[1]; l = m[0]; #else u = m[0]; l = m[1]; @@ -1170,4 +1180,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(")"); }