=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/poly.c,v retrieving revision 1.1.1.1 retrieving revision 1.6 diff -u -p -r1.1.1.1 -r1.6 --- OpenXM/src/kan96xx/Kan/poly.c 1999/10/08 02:12:01 1.1.1.1 +++ OpenXM/src/kan96xx/Kan/poly.c 2010/01/27 15:10:08 1.6 @@ -1,4 +1,6 @@ +/* $OpenXM: OpenXM/src/kan96xx/Kan/poly.c,v 1.5 2005/07/03 11:08:54 ohara Exp $ */ #include +#include #include "datatype.h" #include "stackm.h" #include "extern.h" @@ -25,7 +27,7 @@ void KinitKan(void) { int i; static char *smallx[] = {"x","t"}; static char *smalld[] = {"h","T"}; - /* t x T h */ + /* t x T h */ static int smallOrder[] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, @@ -53,6 +55,7 @@ void KinitKan(void) { SmallRing.gbListTower = NULL; SmallRing.outputOrder = outputOrderForSmallRing; SmallRing.name = "SmallRingp"; + SmallRing.partialEcart = 0; CurrentRingp = &SmallRing; initSyzRingp(); @@ -63,7 +66,7 @@ void KinitKan(void) { #ifndef NOGC /* initialize MPZ */ - mp_set_memory_functions(sGC_malloc,sGC_realloc2,sGC_free2); + mp_set_memory_functions(sGC_malloc,sGC_realloc2,sGC_free2); #endif /* Msize is 8 on SUN gcc */ @@ -86,7 +89,7 @@ void KinitKan(void) { #ifndef NOGC void *sGC_realloc2(void *p,size_t old,size_t new) { - return((void *)sGC_realloc(p,(int) new)); + return(sGC_realloc(p,new)); } void sGC_free2(void *p,size_t size) { @@ -96,7 +99,7 @@ void sGC_free2(void *p,size_t size) MONOMIAL newMonomial(ringp) -struct ring *ringp; + struct ring *ringp; { MONOMIAL f; extern int Msize; @@ -115,7 +118,7 @@ struct ring *ringp; MONOMIAL monomialCopy(m) -MONOMIAL m; + MONOMIAL m; { extern int Msize; MONOMIAL f; @@ -152,8 +155,8 @@ MP_INT *newMP_INT() { } POLY newCell(c,mon) -struct coeff *c; -MONOMIAL mon; + struct coeff *c; + MONOMIAL mon; { POLY ff; ff = (POLY) sGC_malloc(sizeof(struct listPoly)); @@ -166,10 +169,10 @@ MONOMIAL mon; /* constructors */ POLY cxx(c,i,k,ringp) -int c,i,k; -struct ring *ringp; -/* c x_i^k where p is the characteristic. */ -/* New cell, monomial and coeff. */ + int c,i,k; + struct ring *ringp; + /* c x_i^k where p is the characteristic. */ + /* New cell, monomial and coeff. */ { POLY f; int p; @@ -198,12 +201,12 @@ struct ring *ringp; } POLY bxx(c,i,k,ringp) -MP_INT *c; -int i,k; -struct ring *ringp; -/* c x_i^k. c is not copied. */ + MP_INT *c; + int i,k; + struct ring *ringp; + /* c x_i^k. c is not copied. */ { -/* new cell, monomial, coeff. MP_INT c is not copied. */ + /* new cell, monomial, coeff. MP_INT c is not copied. */ POLY f; int p; p = ringp->p; @@ -228,10 +231,10 @@ struct ring *ringp; } POLY cdd(c,i,k,ringp) -int c,i,k; -struct ring *ringp; -/* c D_i^k where p is the characteristic. */ -/* New cell, monomial and coeff. */ + int c,i,k; + struct ring *ringp; + /* c D_i^k where p is the characteristic. */ + /* New cell, monomial and coeff. */ { POLY f; int p; @@ -262,7 +265,7 @@ struct ring *ringp; POLY pCopy(f) -POLY f; + POLY f; { POLY node; struct listPoly nod; @@ -280,7 +283,7 @@ POLY f; } POLY pcCopy(f) -POLY f; + POLY f; { POLY node; @@ -301,7 +304,7 @@ POLY f; } POLY pmCopy(f) -POLY f; + POLY f; { POLY node; struct listPoly nod; @@ -320,7 +323,7 @@ POLY f; } POLY pcmCopy(f) -POLY f; + POLY f; { POLY node; struct listPoly nod; @@ -339,7 +342,7 @@ POLY f; } POLY head(f) -POLY f; + POLY f; { if (f == ZERO) return(f); else { @@ -348,14 +351,14 @@ POLY f; } void errorPoly(str) -char *str; + char *str; { fprintf(stderr,"Error(poly.c): %s\n",str); exit(20); } void warningPoly(str) -char *str; + char *str; { fprintf(stderr,"Warning(poly.c): %s\n",str); }