=================================================================== RCS file: /home/cvs/OpenXM_contrib/pari-2.2/src/language/Attic/compat.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/language/Attic/compat.c 2001/10/02 11:17:09 1.1.1.1 +++ OpenXM_contrib/pari-2.2/src/language/Attic/compat.c 2002/09/11 07:27:03 1.2 @@ -1,4 +1,4 @@ -/* $Id: compat.c,v 1.1.1.1 2001/10/02 11:17:09 noro Exp $ +/* $Id: compat.c,v 1.2 2002/09/11 07:27:03 noro Exp $ Copyright (C) 2000 The PARI group. @@ -14,6 +14,7 @@ with the package; see the file 'COPYING'. If not, writ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "pari.h" +#include "parinf.h" extern GEN geni(void); static GEN @@ -38,16 +39,43 @@ subres0(GEN x, GEN y) { return subres(x,y); } static long rounderror(GEN x) { - long e, av=avma; - grndtoi(x,&e); avma=av; return (long)(e*L2SL10); + gpmem_t av = avma; + long e; (void)grndtoi(x,&e); + avma = av; return (long)(e*L2SL10); } static GEN -_factpol(GEN x, long unused, long hint) { return factpol(x,hint); } +_factpol(GEN x, long t/*unused*/, long hint) { return factpol(x,hint); } static void -suppressed(ANYARG) {err(talker,"this function has been suppressed");} +suppressed(void) {err(talker,"this function has been suppressed");} +#define BUCH_PROTO "GD0.3,G,D0.3,G,D5,G,D1,G,D4,L,D3,L,p" +static GEN +buchgen(GEN g1,GEN g2,GEN g3,GEN g4, GEN g5,long l1,long l2, long prec) { + return buchall(g1,g2,g3,g4,g5,l1,l2,0,prec); +} +static GEN +buchgenfu(GEN g1,GEN g2,GEN g3,GEN g4, GEN g5,long l1,long l2,long prec) { + return buchall(g1,g2,g3,g4,g5,l1,l2,nf_UNITS,prec); +} +static GEN +buchgenforcefu(GEN g1,GEN g2,GEN g3,GEN g4, GEN g5,long l1,long l2,long prec) { + return buchall(g1,g2,g3,g4,g5,l1,l2,nf_UNITS|nf_FORCE,prec); +} +static GEN +buchinit(GEN g1,GEN g2,GEN g3,GEN g4, GEN g5,long l1,long l2,long prec) { + return buchall(g1,g2,g3,g4,g5,l1,l2,nf_INIT,prec); +} +static GEN +buchinitfu(GEN g1,GEN g2,GEN g3,GEN g4, GEN g5,long l1,long l2,long prec) { + return buchall(g1,g2,g3,g4,g5,l1,l2,nf_INIT|nf_UNITS,prec); +} +static GEN +buchinitforcefu(GEN g1,GEN g2,GEN g3,GEN g4, GEN g5,long l1,long l2,long prec) { + return buchall(g1,g2,g3,g4,g5,l1,l2,nf_INIT|nf_UNITS|nf_FORCE,prec); +} + entree oldfonctions[]={ {"O",50,NULL,7,NULL}, {"abs",1,(void *)gabs,3,"Gp"}, @@ -88,13 +116,13 @@ entree oldfonctions[]={ {"boundfact",21,(void *)boundfact,4,"GL"}, {"buchcertify",10,(void *)certifybuchall,6,"lG"}, {"buchfu",1,(void *)buchfu,6,"Gp"}, -{"buchgen",92,(void *)buchall,6,"GD0.3,G,D0.3,G,D5,G,D1,G,D4,L,D3,L,D0,L,p"}, -{"buchgenforcefu",95,(void *)buchall,6,"GD0.3,G,D0.3,G,D5,G,D1,G,D4,L,D3,L,D3,L,p"}, -{"buchgenfu",94,(void *)buchall,6,"GD0.3,G,D0.3,G,D5,G,D1,G,D4,L,D3,L,D2,L,p"}, -{"buchimag",96,(void *)buchimag,4,"GD0.1,G,D0.1,G,D5,G,"}, -{"buchinit",91,(void *)buchall,6,"GD0.3,G,D0.3,G,D5,G,D1,G,D4,L,D3,L,D-1,L,p"}, -{"buchinitforcefu",89,(void *)buchall,6,"GD0.3,G,D0.3,G,D5,G,D1,G,D4,L,D3,L,D-3,L,p"}, -{"buchinitfu",90,(void *)buchall,6,"GD0.3,G,D0.3,G,D5,G,D1,G,D4,L,D3,L,D-2,L,p"}, +{"buchgen",99,(void *)buchgen,6,BUCH_PROTO}, +{"buchgenforcefu",99,(void *)buchgenforcefu,6,BUCH_PROTO}, +{"buchgenfu",99,(void *)buchgenfu,6,BUCH_PROTO}, +{"buchimag",99,(void *)buchimag,4,"GD0.1,G,D0.1,G,D5,G,"}, +{"buchinit",99,(void *)buchinit,6,BUCH_PROTO}, +{"buchinitforcefu",99,(void *)buchinitforcefu,6,BUCH_PROTO}, +{"buchinitfu",99,(void *)buchinitfu,6,BUCH_PROTO}, {"buchnarrow",1,(void *)buchnarrow,6,"Gp"}, {"buchray",2,(void *)buchray,6,"GGp"}, {"buchrayinit",2,(void *)buchrayinit,6,"GGp"}, @@ -179,8 +207,8 @@ entree oldfonctions[]={ {"factor",1,(void *)factor,4,"G"}, {"factoredbasis",28,(void *)factoredbase,6,"GGf"}, {"factoreddiscf",2,(void *)factoreddiscf,6,"GG"}, -{"factoredpolred",2,(void *)factoredpolred,6,"GGp"}, -{"factoredpolred2",2,(void *)factoredpolred2,6,"GGp"}, +{"factoredpolred",2,(void *)factoredpolred,6,"GG"}, +{"factoredpolred2",2,(void *)factoredpolred2,6,"GG"}, {"factornf",2,(void *)polfnf,6,"GG"}, {"factorpadic",32,(void *)factorpadic4,7,"GGL"}, {"factorpadic2",32,(void *)factorpadic2,7,"GGL"}, @@ -281,10 +309,10 @@ entree oldfonctions[]={ {"initzeta",1,(void *)initzeta,6,"Gp"}, {"integ",14,(void *)integ,7,"Gn"}, {"intersect",2,(void *)intersect,8,"GG"}, -{"intgen",37,(void *)rombint,9,"V=GGIp"}, -{"intinf",37,(void *)qromi,9,"V=GGIp"}, -{"intnum",37,(void *)qromb,9,"V=GGIp"}, -{"intopen",37,(void *)qromo,9,"V=GGIp"}, +{"intgen",99,(void *)intnum0,9,"V=GGID1,L,p"}, +{"intinf",99,(void *)intnum0,9,"V=GGID2,L,p"}, +{"intnum",99,(void *)intnum0,9,"V=GGID0,L,p"}, +{"intopen",99,(void *)intnum0,9,"V=GGID3,L,p"}, {"inverseimage",2,(void *)inverseimage,8,"GG"}, {"isdiagonal",10,(void *)isdiagonal,8,"lG"}, {"isfund",1,(void *)gisfundamental,4,"G"}, @@ -318,7 +346,7 @@ entree oldfonctions[]={ {"keri",1,(void *)keri,8,"G"}, {"kerint",1,(void *)kerint,8,"G"}, {"kerint1",1,(void *)kerint1,8,"G"}, -{"kerint2",1,(void *)kerint2,8,"G"}, +{"kerint2",1,(void *)suppressed,8,"G"}, {"kro",2,(void *)gkronecker,4,"GG"}, {"label",0,(void*)suppressed,11,"s*"}, {"lambdak",2,(void *)glambdak,6,"GGp"}, @@ -332,10 +360,10 @@ entree oldfonctions[]={ {"lindep",1,(void *)lindep,8,"Gp"}, {"lindep2",23,(void *)lindep2,8,"GLp"}, {"lll",1,(void *)lll,8,"Gp"}, -{"lll1",1,(void *)lll1,8,"Gp"}, +{"lll1",1,(void *)suppressed,8,"Gp"}, {"lllgen",1,(void *)lllgen,8,"Gp"}, {"lllgram",1,(void *)lllgram,8,"Gp"}, -{"lllgram1",1,(void *)lllgram1,8,"Gp"}, +{"lllgram1",1,(void *)suppressed,8,"Gp"}, {"lllgramgen",1,(void *)lllgramgen,8,"G"}, {"lllgramint",1,(void *)lllgramint,8,"G"}, {"lllgramkerim",1,(void *)lllgramkerim,8,"G"}, @@ -344,7 +372,7 @@ entree oldfonctions[]={ {"lllintpartial",1,(void *)lllintpartial,8,"G"}, {"lllkerim",1,(void *)lllkerim,8,"G"}, {"lllkerimgen",1,(void *)lllkerimgen,8,"G"}, -{"lllrat",1,(void *)lllrat,8,"G"}, +{"lllrat",1,(void *)suppressed,8,"G"}, {"ln",1,(void *)glog,3,"Gp"}, {"lngamma",1,(void *)glngamma,3,"Gp"}, {"localred",2,(void *)localreduction,5,"GG"}, @@ -407,13 +435,13 @@ entree oldfonctions[]={ {"pnqn",1,(void *)pnqn,4,"G"}, {"pointell",2,(void *)pointell,5,"GGp"}, {"polint",31,(void *)polint,7,"GGGD&"}, -{"polred",1,(void *)polred,6,"Gp"}, -{"polred2",1,(void *)polred2,6,"Gp"}, -{"polredabs",1,(void *)polredabs,6,"Gp"}, -{"polredabs2",1,(void *)polredabs2,6,"Gp"}, -{"polredabsall",1,(void *)polredabsall,6,"Gp"}, +{"polred",1,(void *)polred,6,"G"}, +{"polred2",1,(void *)polred2,6,"G"}, +{"polredabs",1,(void *)polredabs,6,"G"}, +{"polredabs2",1,(void *)polredabs2,6,"G"}, +{"polredabsall",1,(void *)polredabsall,6,"G"}, {"polredabsfast",0,(void *)suppressed,6,""}, -{"polredabsnored",1,(void *)polredabsnored,6,"Gp"}, +{"polredabsnored",1,(void *)polredabs,6,"G"}, {"polsym",21,(void *)polsym,7,"GL"}, {"polvar",1,(void *)gpolvar,2,"G"}, {"poly",14,(void *)gtopoly,2,"Gn"}, @@ -503,8 +531,8 @@ entree oldfonctions[]={ {"smalldiscf",1,(void *)smalldiscf,6,"G"}, {"smallfact",1,(void *)smallfact,4,"G"}, {"smallinitell",1,(void *)smallinitell,5,"Gp"}, -{"smallpolred",1,(void *)smallpolred,6,"Gp"}, -{"smallpolred2",1,(void *)smallpolred2,6,"Gp"}, +{"smallpolred",1,(void *)smallpolred,6,"G"}, +{"smallpolred2",1,(void *)smallpolred2,6,"G"}, {"smith",1,(void *)smith,8,"G"}, {"smith2",1,(void *)smith2,8,"G"}, {"smithclean",1,(void *)smithclean,8,"G"}, @@ -517,7 +545,7 @@ entree oldfonctions[]={ {"srgcd",2,(void *)srgcd,7,"GG"}, {"sturm",10,(void *)sturm0,7,"lG"}, {"sturmpart",30,(void *)sturmpart,7,"lGGG"}, -{"subcyclo",2,(void *)subcyclo,6,"GGDn"}, +{"subcyclo",2,(void *)subcyclo,6,"LLDn"}, {"subell",3,(void *)subell,5,"GGGp"}, {"subst",26,(void *)gsubst,7,"GnG"}, {"sum",48,(void *)sum0,9,"GV=GGI"},