=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/primitive.c,v retrieving revision 1.6 retrieving revision 1.13 diff -u -p -r1.6 -r1.13 --- OpenXM/src/kan96xx/Kan/primitive.c 2003/08/23 02:28:39 1.6 +++ OpenXM/src/kan96xx/Kan/primitive.c 2004/09/12 02:37:57 1.13 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/primitive.c,v 1.5 2002/11/04 10:53:56 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/primitive.c,v 1.12 2004/09/11 01:00:42 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); @@ -420,6 +424,8 @@ int executePrimitive(ob) int size; int i,j,k,n; int status; + int infixOn; + struct tokens infixToken; struct tokens *tokenArray; struct tokens token; FILE *fp; @@ -438,6 +444,8 @@ int executePrimitive(ob) extern TimerOn; extern SecureMode; + infixOn = 0; + if (DebugStack >= 2) { fprintf(Fstack,"In execute %d\n",ob.lc.ival); printOperandStack(); } @@ -592,21 +600,7 @@ int executePrimitive(ob) /* ob2 ob1 get */ ob1 = Kpop(); ob2 = Kpop(); - switch(ob2.tag) { - case Sarray: break; - default: errorStackmachine("Usage:get"); - } - switch(ob1.tag) { - case Sinteger: break; - default: errorStackmachine("Usage:get"); - } - i =ob1.lc.ival; - size = getoaSize(ob2); - if ((0 <= i) && (i i) errorStackmachine("The initial value must not be less than limit value (for).\n"); @@ -816,7 +829,17 @@ int executePrimitive(ob) size = ob1.rc.ival; for (j=0; jcontextName)); + } + putoa(qattr,0,qattr2); + putoa(qob,1,qattr); + putoa(qob,2,ob4); /* Argument */ + qob = KpoTree(qob); + Kpush(qob); + } else if (status & STATUS_BREAK) break; + } if (ccflag) { contextControl(CCPOP); ccflag = 0; @@ -1582,7 +1688,17 @@ int executePrimitive(ob) for (i=0; i