=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/stackmachine.c,v retrieving revision 1.10 retrieving revision 1.14 diff -u -p -r1.10 -r1.14 --- OpenXM/src/kan96xx/Kan/stackmachine.c 2002/11/04 10:53:56 1.10 +++ OpenXM/src/kan96xx/Kan/stackmachine.c 2003/12/05 13:51:31 1.14 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.9 2002/02/24 10:27:18 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.13 2003/11/20 09:20:36 takayama Exp $ */ /* stackmachin.c */ #include @@ -74,6 +74,7 @@ static void pstack(void); static struct object executableStringToExecutableArray(char *str); extern int SerialCurrent; +extern int QuoteMode; int SGClock = 0; int UserCtrlC = 0; @@ -733,6 +734,7 @@ void scanner() { char *tmp2; extern int ErrorMessageMode; int jval; + extern int InSendmsg2; getokenSM(INIT); initSystemDictionary(); @@ -816,7 +818,8 @@ void scanner() { fprintf(Fstack,"\nscanner> "); } KSexecuteString(" ctrlC-hook "); /* Execute User Defined functions. */ - KSexecuteString(" (Computation is interrupted.) "); + KSexecuteString(" (Computation is interrupted.) "); /* move to ctrlC-hook? */ + InSendmsg2 = 0; continue ; } else { } if (DebugStack >= 1) { printOperandStack(); } @@ -835,7 +838,7 @@ void ctrlC(sig) extern int SGClock; extern int UserCtrlC; extern int OXlock; - + signal(sig,SIG_IGN); /* see 133p */ cancelAlarm(); @@ -898,6 +901,7 @@ int executeToken(token) int i,h0,h1; extern int WarningMessageMode; extern int Strict; + extern int InSendmsg2; if (GotoP) { /* for goto */ if (token.kind == ID && isLiteral(token.token)) { @@ -962,6 +966,13 @@ int executeToken(token) ob.lc.ival = primitive; return(executePrimitive(ob)); } else { + if (QuoteMode) { + if (InSendmsg2) return(DO_QUOTE); + else { + Kpush(KpoString(token.token)); + return(0); /* normal exit.*/ + } + } if (WarningMessageMode == 1 || WarningMessageMode == 2) { char tmpc[1024]; if (strlen(token.token) < 900) { @@ -1114,6 +1125,8 @@ KSexecuteString(s) } recursive--; if (localCatchCtrlC) { signal(SIGINT, sigfunc); } + KSexecuteString(" ctrlC-hook "); /* Execute User Defined functions. */ + KSexecuteString(" (Computation is interrupted.) "); /* move to ctrlC-hook?*/ return(-1); }else{ } }else{ @@ -1130,6 +1143,8 @@ KSexecuteString(s) } recursive = 0; if (localCatchCtrlC) { signal(SIGINT, sigfunc); } + KSexecuteString(" ctrlC-hook "); /* Execute User Defined functions. */ + KSexecuteString(" (Computation is interrupted.) "); return(-1); }else { } }