version 1.1, 2001/10/02 11:17:06 |
version 1.2, 2002/09/11 07:26:56 |
Line 20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
|
Line 20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
|
/*******************************************************************/ |
/*******************************************************************/ |
#include "pari.h" |
#include "pari.h" |
#include "../graph/rect.h" |
#include "../graph/rect.h" |
|
#include "../language/anal.h" |
|
#include "gp.h" |
|
|
extern void addhelp(entree *ep, char *s); |
extern void allocatemem0(size_t newsize); |
extern void allocatemem0(unsigned long newsize); |
|
extern GEN default0(char *a, char *b, long flag); |
extern GEN default0(char *a, char *b, long flag); |
extern void error0(GEN *g); |
extern void error0(GEN *g); |
extern GEN extern0(char *cmd); |
extern GEN extern0(char *cmd); |
extern void gp_quit(void); |
extern void gp_quit(void); |
extern void gpwritebin(char *s, GEN x); |
extern GEN input0(void); |
extern GEN input0(); |
|
extern void kill0(entree *ep); |
extern void kill0(entree *ep); |
extern void print0(GEN *g,long flag); |
extern void print0(GEN *g,long flag); |
extern GEN read0(char *s); |
extern GEN read0(char *s); |
extern long setprecr(long n); |
|
extern void system0(char *cmd); |
extern void system0(char *cmd); |
extern GEN trap0(char *e, char *f, char *r); |
extern GEN trap0(char *e, char *f, char *r); |
extern int whatnow(char *s, int silent); |
extern int whatnow(char *s, int silent); |
extern void write0(char *s, GEN *g, long flag); |
|
|
|
static void |
static void whatnow0(char *s) { whatnow(s,0); } |
whatnow0(char *s) { whatnow(s,0); } |
|
|
|
entree functions_gp[]={ |
entree functions_gp[]={ |
{"allocatemem",0,(void*)allocatemem0,11,"vD0,L,"}, |
{"allocatemem",0,(void*)allocatemem0,11,"vD0,L,"}, |
Line 48 entree functions_gp[]={ |
|
Line 45 entree functions_gp[]={ |
|
{"extern",1,(void*)extern0,11,"s"}, |
{"extern",1,(void*)extern0,11,"s"}, |
{"input",0,(void*)input0,11,""}, |
{"input",0,(void*)input0,11,""}, |
{"global",88,NULL,11,NULL}, |
{"global",88,NULL,11,NULL}, |
{"print",0,(void*)print0,11,"vs*D0,L,"}, |
{"print",0,(void*)print,11,"vs*"}, |
{"print1",0,(void*)print0,11,"vs*D5,L,"}, |
{"print1",0,(void*)print1,11,"vs*"}, |
{"printp",0,(void*)print0,11,"vs*D2,L,"}, |
{"printp",0,(void*)printp,11,"vs*"}, |
{"printp1",0,(void*)print0,11,"vs*D7,L,"}, |
{"printp1",0,(void*)printp1,11,"vs*"}, |
{"printtex",0,(void*)print0,11,"vs*D4,L,"}, |
{"printtex",0,(void*)printtex,11,"vs*"}, |
{"quit",0,(void*)gp_quit,11,"v"}, |
{"quit",0,(void*)gp_quit,11,"v"}, |
{"read",0,(void*)read0,11,"D\"\",s,"}, |
{"read",0,(void*)read0,11,"D\"\",s,"}, |
{"system",70,(void*)system0,11,"vs"}, |
{"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"}, |
{"whatnow",1,(void*)whatnow0,11,"vr"}, |
{"write",99,(void*)write0,11,"vss*D0,L,"}, |
{"write",99,(void*)write0,11,"vss*"}, |
{"write1",99,(void*)write0,11,"vss*D5,L,"}, |
{"write1",99,(void*)write1,11,"vss*"}, |
{"writebin",99,(void*)gpwritebin,11,"vsDG"}, |
{"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 */ |
{NULL,0,NULL,0,NULL} /* sentinel */ |
}; |
}; |
Line 111 setserieslength(long n) |
|
Line 108 setserieslength(long n) |
|
return m; |
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[] = { |
entree functions_oldgp[] = { |
{"allocatemem",11,(void *)allocatemem0,2,"vLp"}, |
{"allocatemem",11,(void *)allocatemem0,2,"vLp"}, |
{"box",35,(void *)rectbox,10,"vLGG"}, |
{"box",35,(void *)rectbox,10,"vLGG"}, |
Line 135 entree functions_oldgp[] = { |
|
Line 140 entree functions_oldgp[] = { |
|
{"postploth",37,(void *)postploth,10,"V=GGIpD0,L,D0,L,"}, |
{"postploth",37,(void *)postploth,10,"V=GGIpD0,L,D0,L,"}, |
{"postploth2",37,(void *)postploth2,10,"V=GGIpD0,L,"}, |
{"postploth2",37,(void *)postploth2,10,"V=GGIpD0,L,"}, |
{"postplothraw",2,(void *)postplothraw,10,"GGD0,L,"}, |
{"postplothraw",2,(void *)postplothraw,10,"GGD0,L,"}, |
{"pprint",0,(void*)print0,11,"vs*D2,L,"}, |
{"pprint",0,(void*)printp,11,"vs*"}, |
{"pprint1",0,(void*)print0,11,"vs*D7,L,"}, |
{"pprint1",0,(void*)printp1,11,"vs*"}, |
{"print",0,(void*)print0,11,"vs*D0,L,"}, |
{"print",0,(void*)print,11,"vs*"}, |
{"print1",0,(void*)print0,11,"vs*D5,L,"}, |
{"print1",0,(void*)print1,11,"vs*"}, |
{"rbox",35,(void *)rectrbox,10,"vLGG"}, |
{"rbox",35,(void *)rectrbox,10,"vLGG"}, |
{"read",0,(void *)input0,11,""}, |
{"read",0,(void *)input0,11,""}, |
{"rline",35,(void *)rectrline,10,"vLGG"}, |
{"rline",35,(void *)rectrline,10,"vLGG"}, |
Line 152 entree functions_oldgp[] = { |
|
Line 157 entree functions_oldgp[] = { |
|
{"settype",21,(void *)gsettype,2,"GL"}, |
{"settype",21,(void *)gsettype,2,"GL"}, |
{"string",57,(void*)rectstring,10,"vLs"}, |
{"string",57,(void*)rectstring,10,"vLs"}, |
{"system",70,(void*) system0,11,"vs"}, |
{"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"}, |
{"type",1,(void *)gtype,2,"Gp"}, |
|
|
{NULL,0,NULL,0,NULL} /* sentinel */ |
{NULL,0,NULL,0,NULL} /* sentinel */ |