=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/kanExport1.c,v retrieving revision 1.10 retrieving revision 1.12 diff -u -p -r1.10 -r1.12 --- OpenXM/src/kan96xx/Kan/kanExport1.c 2003/08/27 03:11:12 1.10 +++ OpenXM/src/kan96xx/Kan/kanExport1.c 2004/07/30 11:21:55 1.12 @@ -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.11 2004/02/23 09:03:42 takayama Exp $ */ #include #include "datatype.h" #include "stackm.h" @@ -234,8 +234,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].x)); + putoa(tob,r,KpoInteger(tf->e[i].D)); + 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; }