=================================================================== RCS file: /home/cvs/OpenXM_contrib/pari-2.2/src/gp/Attic/gp_init.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -p -r1.1.1.1 -r1.2 --- OpenXM_contrib/pari-2.2/src/gp/Attic/gp_init.c 2001/10/02 11:17:06 1.1.1.1 +++ OpenXM_contrib/pari-2.2/src/gp/Attic/gp_init.c 2002/09/11 07:26:56 1.2 @@ -1,4 +1,4 @@ -/* $Id: gp_init.c,v 1.1.1.1 2001/10/02 11:17:06 noro Exp $ +/* $Id: gp_init.c,v 1.2 2002/09/11 07:26:56 noro Exp $ Copyright (C) 2000 The PARI group. @@ -20,26 +20,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, /*******************************************************************/ #include "pari.h" #include "../graph/rect.h" +#include "../language/anal.h" +#include "gp.h" -extern void addhelp(entree *ep, char *s); -extern void allocatemem0(unsigned long newsize); +extern void allocatemem0(size_t newsize); extern GEN default0(char *a, char *b, long flag); extern void error0(GEN *g); extern GEN extern0(char *cmd); extern void gp_quit(void); -extern void gpwritebin(char *s, GEN x); -extern GEN input0(); +extern GEN input0(void); extern void kill0(entree *ep); extern void print0(GEN *g,long flag); extern GEN read0(char *s); -extern long setprecr(long n); extern void system0(char *cmd); extern GEN trap0(char *e, char *f, char *r); extern int whatnow(char *s, int silent); -extern void write0(char *s, GEN *g, long flag); -static void -whatnow0(char *s) { whatnow(s,0); } +static void whatnow0(char *s) { whatnow(s,0); } entree functions_gp[]={ {"allocatemem",0,(void*)allocatemem0,11,"vD0,L,"}, @@ -48,20 +45,20 @@ entree functions_gp[]={ {"extern",1,(void*)extern0,11,"s"}, {"input",0,(void*)input0,11,""}, {"global",88,NULL,11,NULL}, -{"print",0,(void*)print0,11,"vs*D0,L,"}, -{"print1",0,(void*)print0,11,"vs*D5,L,"}, -{"printp",0,(void*)print0,11,"vs*D2,L,"}, -{"printp1",0,(void*)print0,11,"vs*D7,L,"}, -{"printtex",0,(void*)print0,11,"vs*D4,L,"}, +{"print",0,(void*)print,11,"vs*"}, +{"print1",0,(void*)print1,11,"vs*"}, +{"printp",0,(void*)printp,11,"vs*"}, +{"printp1",0,(void*)printp1,11,"vs*"}, +{"printtex",0,(void*)printtex,11,"vs*"}, {"quit",0,(void*)gp_quit,11,"v"}, {"read",0,(void*)read0,11,"D\"\",s,"}, {"system",70,(void*)system0,11,"vs"}, -{"trap",0,(void*)trap0,11,"D\"\",r,DI,DI"}, +{"trap",0,(void*)trap0,11,"D\"\",r,DIDI"}, {"whatnow",1,(void*)whatnow0,11,"vr"}, -{"write",99,(void*)write0,11,"vss*D0,L,"}, -{"write1",99,(void*)write0,11,"vss*D5,L,"}, +{"write",99,(void*)write0,11,"vss*"}, +{"write1",99,(void*)write1,11,"vss*"}, {"writebin",99,(void*)gpwritebin,11,"vsDG"}, -{"writetex",99,(void*)write0,11,"vss*D4,L,"}, +{"writetex",99,(void*)writetex,11,"vss*"}, {NULL,0,NULL,0,NULL} /* sentinel */ }; @@ -111,6 +108,14 @@ setserieslength(long n) return m; } +static long +setprecr(long n) +{ + long m = GP_DATA->fmt->sigd; + if (n > 0) { GP_DATA->fmt->sigd = n; prec = (long)(n*pariK1 + 3); } + return m; +} + entree functions_oldgp[] = { {"allocatemem",11,(void *)allocatemem0,2,"vLp"}, {"box",35,(void *)rectbox,10,"vLGG"}, @@ -135,10 +140,10 @@ entree functions_oldgp[] = { {"postploth",37,(void *)postploth,10,"V=GGIpD0,L,D0,L,"}, {"postploth2",37,(void *)postploth2,10,"V=GGIpD0,L,"}, {"postplothraw",2,(void *)postplothraw,10,"GGD0,L,"}, -{"pprint",0,(void*)print0,11,"vs*D2,L,"}, -{"pprint1",0,(void*)print0,11,"vs*D7,L,"}, -{"print",0,(void*)print0,11,"vs*D0,L,"}, -{"print1",0,(void*)print0,11,"vs*D5,L,"}, +{"pprint",0,(void*)printp,11,"vs*"}, +{"pprint1",0,(void*)printp1,11,"vs*"}, +{"print",0,(void*)print,11,"vs*"}, +{"print1",0,(void*)print1,11,"vs*"}, {"rbox",35,(void *)rectrbox,10,"vLGG"}, {"read",0,(void *)input0,11,""}, {"rline",35,(void *)rectrline,10,"vLGG"}, @@ -152,7 +157,7 @@ entree functions_oldgp[] = { {"settype",21,(void *)gsettype,2,"GL"}, {"string",57,(void*)rectstring,10,"vLs"}, {"system",70,(void*) system0,11,"vs"}, -{"texprint",0,(void*)print0,11,"vs*D4,L,"}, +{"texprint",0,(void*)printtex,11,"vs*"}, {"type",1,(void *)gtype,2,"Gp"}, {NULL,0,NULL,0,NULL} /* sentinel */