=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/kanExport0.c,v retrieving revision 1.16 retrieving revision 1.20 diff -u -p -r1.16 -r1.20 --- OpenXM/src/kan96xx/Kan/kanExport0.c 2003/08/20 01:39:17 1.16 +++ OpenXM/src/kan96xx/Kan/kanExport0.c 2003/12/06 02:49:22 1.20 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.15 2003/08/18 11:59:56 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.19 2003/12/05 13:51:31 takayama Exp $ */ #include #include "datatype.h" #include "stackm.h" @@ -19,6 +19,7 @@ int SerialCurrent = -1; /* Current Serial number of t int ReverseOutputOrder = 1; int WarningNoVectorVariable = 1; +extern int QuoteMode; /** :arithmetic **/ struct object KooAdd(ob1,ob2) @@ -142,7 +143,11 @@ struct object KooAdd(ob1,ob2) default: - warningKan("KooAdd() has not supported yet these objects.\n"); + if (QuoteMode) { + rob = addTree(ob1,ob2); + }else{ + warningKan("KooAdd() has not supported yet these objects.\n"); + } break; } return(rob); @@ -270,7 +275,11 @@ struct object KooSub(ob1,ob2) break; default: - warningKan("KooSub() has not supported yet these objects.\n"); + if (QuoteMode) { + rob = minusTree(ob1,ob2); + }else{ + warningKan("KooSub() has not supported yet these objects.\n"); + } break; } return(rob); @@ -412,7 +421,11 @@ struct object KooMult(ob1,ob2) break; default: - warningKan("KooMult() has not supported yet these objects.\n"); + if (QuoteMode) { + rob = timesTree(ob1,ob2); + }else{ + warningKan("KooMult() has not supported yet these objects.\n"); + } break; } return(rob); @@ -451,7 +464,11 @@ struct object KoNegate(obj) break; default: - warningKan("KoNegate() has not supported yet these objects.\n"); + if (QuoteMode) { + rob = unaryminusTree(obj); + }else{ + warningKan("KoNegate() has not supported yet these objects.\n"); + } break; } return(rob); @@ -653,7 +670,11 @@ struct object KooDiv(ob1,ob2) default: - warningKan("KooDiv() has not supported yet these objects.\n"); + if (QuoteMode) { + rob = divideTree(ob1,ob2); + }else{ + warningKan("KooDiv() has not supported yet these objects.\n"); + } break; } return(rob); @@ -2124,6 +2145,16 @@ static void checkDuplicateName(xvars,dvars,n) } } +struct object KooPower(struct object ob1,struct object ob2) { + struct object rob; + /* Bug. It has not yet been implemented. */ + if (QuoteMode) { + rob = powerTree(ob1,ob2); + }else{ + warningKan("KooDiv2() has not supported yet these objects.\n"); + } + return(rob); +} @@ -2186,7 +2217,11 @@ struct object KooDiv2(ob1,ob2) break; default: - warningKan("KooDiv2() has not supported yet these objects.\n"); + if (QuoteMode) { + rob = divideTree(ob1,ob2); + }else{ + warningKan("KooDiv2() has not supported yet these objects.\n"); + } break; } return(rob); @@ -2322,6 +2357,13 @@ struct object KgbExtension(struct object obj) errorKan1("%s\n","The datatype of the argument mismatch: [(isConstant) polynomial] gbext"); } return(KpoInteger(isConstant(KopPOLY(obj1)))); + }else if (strcmp(key,"isConstantAll")==0) { + if (size != 2) errorKan1("%s\n","[(isConstantAll) poly ] gbext bool"); + obj1 = getoa(obj,1); + if (obj1.tag != Spoly) { + errorKan1("%s\n","The datatype of the argument mismatch: [(isConstantAll) polynomial] gbext"); + } + return(KpoInteger(isConstantAll(KopPOLY(obj1)))); }else if (strcmp(key,"schreyerSkelton") == 0) { if (size != 2) errorKan1("%s\n","[(schreyerSkelton) array_of_poly ] gbext array"); obj1 = getoa(obj,1); @@ -2370,6 +2412,11 @@ struct object KgbExtension(struct object obj) }else{ putoa(rob,1,KpoPOLY(newCell(cont,newMonomial(f1->m->ringp)))); } + }else if (strcmp(key,"ord_ws_all")==0) { + if (size != 3) errorKan1("%s\n","[(ord_ws_all) fv wv] gbext"); + obj1 = getoa(obj,1); + obj2 = getoa(obj,2); + rob = KordWsAll(obj1,obj2); }else { errorKan1("%s\n","gbext : unknown tag."); }