=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/primitive.c,v retrieving revision 1.5 retrieving revision 1.11 diff -u -p -r1.5 -r1.11 --- OpenXM/src/kan96xx/Kan/primitive.c 2002/11/04 10:53:56 1.5 +++ OpenXM/src/kan96xx/Kan/primitive.c 2003/12/05 23:14:14 1.11 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/primitive.c,v 1.4 2001/05/04 01:06:25 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/primitive.c,v 1.10 2003/12/05 13:51:31 takayama Exp $ */ /* primitive.c */ /* The functions in this module were in stackmachine.c */ @@ -14,6 +14,7 @@ int PrintDollar = 1; /* flag for printObject() */ int PrintComma = 1; /* flag for printObject() */ +int InSendmsg2 = 0; #define OB_ARRAY_MAX (AGLIMIT+100) extern int GotoP; @@ -24,6 +25,7 @@ extern int ClassTypes[]; /* kclass.c */ extern struct context *PrimitiveContextp; extern struct context *CurrentContextp; extern struct dictionary *SystemDictionary; +extern int QuoteMode; static char *operatorType(int i); @@ -122,6 +124,7 @@ static char *operatorType(type) #define Scclass 99 #define Scoeff2 100 #define Stlimit 101 +#define Soxshell 102 /***********************************************/ void printObject(ob,nl,fp) struct object ob; @@ -375,6 +378,7 @@ void KdefinePrimitiveFunctions() { putPrimitiveFunction("system_variable",Ssystem_variable); putPrimitiveFunction("test",Stest); putPrimitiveFunction("tlimit",Stlimit); + putPrimitiveFunction("oxshell",Soxshell); putPrimitiveFunction("map",Smap); putPrimitiveFunction("to_records",Sto_records); putPrimitiveFunction("Usage",Susage); @@ -1283,6 +1287,7 @@ int executePrimitive(ob) KsetOrderByObjArray(ob1); break; case Sset_up_ring: + KresetDegreeShift(); ob5 = Kpop(); ob4=Kpop(); ob3=Kpop(); ob2=Kpop(); ob1=Kpop(); KsetUpRing(ob1,ob2,ob3,ob4,ob5); break; @@ -1360,8 +1365,17 @@ int executePrimitive(ob) if (ob2.tag != Sarray) { Kpush(Khead(ob2)); }else{ - ob1 = Kpop(); - Kpush(oInitW(ob1,ob2)); + if (getoaSize(ob2) > 0) { + if (getoa(ob2,getoaSize(ob2)-1).tag == Spoly) { + Kpush(oInitW(ob2,newObjectArray(0))); + }else{ + ob1 = Kpop(); + Kpush(oInitW(ob1,ob2)); + } + }else{ + ob1 = Kpop(); + Kpush(oInitW(ob1,ob2)); + } } break; @@ -1547,8 +1561,38 @@ int executePrimitive(ob) size = ob1.rc.ival; for (i=0; icontextName)); + } + putoa(qattr,0,qattr2); + putoa(qob,1,qattr); + putoa(qob,2,ob4); /* Argument */ + qob = KpoTree(qob); + Kpush(qob); + } else if (status != 0) break; } if (ccflag) { contextControl(CCPOP); ccflag = 0; @@ -1673,6 +1717,11 @@ int executePrimitive(ob) } */ + break; + + case Soxshell: + ob1 = Kpop(); + Kpush(KoxShell(ob1)); break; case Stlimit: