=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/kanExport1.c,v retrieving revision 1.10 retrieving revision 1.17 diff -u -p -r1.10 -r1.17 --- OpenXM/src/kan96xx/Kan/kanExport1.c 2003/08/27 03:11:12 1.10 +++ OpenXM/src/kan96xx/Kan/kanExport1.c 2005/06/09 04:09:22 1.17 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.9 2003/08/24 05:19:42 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.16 2004/09/05 07:42:43 takayama Exp $ */ #include #include "datatype.h" #include "stackm.h" @@ -85,6 +85,7 @@ struct object Kgroebner(ob) extern int StopDegree; int sdflag = 0; int forceReduction = 0; + int reduceOnly = 0; int ob1Size, ob2Size, noZeroEntry; int *ob1ToOb2; @@ -130,6 +131,8 @@ struct object Kgroebner(ob) needSyz = needBack = 1; }else if (strcmp(ob2c.lc.str,"forceReduction")==0) { forceReduction = 1; + }else if (strcmp(ob2c.lc.str,"reduceOnly")==0) { + reduceOnly = 1; }else if (strcmp(ob2c.lc.str,"countDown")==0) { countDown = 1; cdflag = 1; if (needSyz) { @@ -234,8 +237,8 @@ struct object Kgroebner(ob) } /* Assume ob1Size , ob2Size > 0 */ ob2 = newObjectArray(ob2Size); - ob1ToOb2 = (int *)GC_malloc(sizeof(int)*ob1Size); - ob1ZeroPos = (int *)GC_malloc(sizeof(int)*(ob1Size-ob2Size+1)); + ob1ToOb2 = (int *)sGC_malloc(sizeof(int)*ob1Size); + ob1ZeroPos = (int *)sGC_malloc(sizeof(int)*(ob1Size-ob2Size+1)); if (ob1ToOb2 == NULL || ob1ZeroPos == NULL) errorKan1("%s\n","No more memory."); j = 0; k = 0; for (i=0; im; + } + if (tf->ringp != cr) { + n = tf->ringp->n; + m = tf->ringp->m; + l = tf->ringp->l; + c = tf->ringp->c; + nn = tf->ringp->nn; + mm = tf->ringp->mm; + ll = tf->ringp->ll; + cc = tf->ringp->cc; + cr = tf->ringp; + } + if (type == 0) { + size = 0; + for (i=c; inext; + } + rob = newObjectArray(fsize); + + ff = f; + p = 0; + while (ff != POLYNULL) { + r = 0; + tob = newObjectArray(size); + tf = ff->m; + for (i=ll-1; i>=c; i--) { + putoa(tob,r,KpoInteger(tf->e[i].x)); + putoa(tob,hsize+r,KpoInteger(tf->e[i].D)); + r++; + } + for (i=mm-1; i>=l; i--) { + putoa(tob,r,KpoInteger(tf->e[i].x)); + putoa(tob,hsize+r,KpoInteger(tf->e[i].D)); + r++; + } + for (i=nn-1; i>=m; i--) { + putoa(tob,r,KpoInteger(tf->e[i].x)); + putoa(tob,hsize+r,KpoInteger(tf->e[i].D)); + r++; + } + if (type == 1) { + for (i=cc-1; i>=0; i--) { + putoa(tob,hsize+r,KpoInteger(tf->e[i].D)); + r++; + putoa(tob,hsize+r,KpoInteger(tf->e[i].x)); + r++; + } + }else if (type == 2) { + for (i=cc-1; i>=0; i--) { + putoa(tob,hsize+r,KpoInteger(tf->e[i].D)); + r++; + } + } + + putoa(rob,p,tob); + p++; + ff = ff->next; + } + return rob; }