| version 1.11, 2002/11/04 11:08:59 |
version 1.13, 2003/11/20 09:20:36 |
|
|
| /* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.10 2002/11/04 10:53:56 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.12 2002/11/07 23:35:23 takayama Exp $ */ |
| /* stackmachin.c */ |
/* stackmachin.c */ |
| |
|
| #include <stdio.h> |
#include <stdio.h> |
| Line 74 static void pstack(void); |
|
| Line 74 static void pstack(void); |
|
| static struct object executableStringToExecutableArray(char *str); |
static struct object executableStringToExecutableArray(char *str); |
| |
|
| extern int SerialCurrent; |
extern int SerialCurrent; |
| |
extern int QuoteMode; |
| |
|
| int SGClock = 0; |
int SGClock = 0; |
| int UserCtrlC = 0; |
int UserCtrlC = 0; |
| Line 816 void scanner() { |
|
| Line 817 void scanner() { |
|
| fprintf(Fstack,"\nscanner> "); |
fprintf(Fstack,"\nscanner> "); |
| } |
} |
| KSexecuteString(" ctrlC-hook "); /* Execute User Defined functions. */ |
KSexecuteString(" ctrlC-hook "); /* Execute User Defined functions. */ |
| KSexecuteString(" (Computation is interrupted.) "); |
KSexecuteString(" (Computation is interrupted.) "); /* move to ctrlC-hook? */ |
| continue ; |
continue ; |
| } else { } |
} else { } |
| if (DebugStack >= 1) { printOperandStack(); } |
if (DebugStack >= 1) { printOperandStack(); } |
| Line 962 int executeToken(token) |
|
| Line 963 int executeToken(token) |
|
| ob.lc.ival = primitive; |
ob.lc.ival = primitive; |
| return(executePrimitive(ob)); |
return(executePrimitive(ob)); |
| } else { |
} else { |
| |
if (QuoteMode) { |
| |
return(DO_QUOTE); |
| |
} |
| if (WarningMessageMode == 1 || WarningMessageMode == 2) { |
if (WarningMessageMode == 1 || WarningMessageMode == 2) { |
| char tmpc[1024]; |
char tmpc[1024]; |
| if (strlen(token.token) < 900) { |
if (strlen(token.token) < 900) { |
| Line 1115 KSexecuteString(s) |
|
| Line 1119 KSexecuteString(s) |
|
| recursive--; |
recursive--; |
| if (localCatchCtrlC) { signal(SIGINT, sigfunc); } |
if (localCatchCtrlC) { signal(SIGINT, sigfunc); } |
| KSexecuteString(" ctrlC-hook "); /* Execute User Defined functions. */ |
KSexecuteString(" ctrlC-hook "); /* Execute User Defined functions. */ |
| KSexecuteString(" (Computation is interrupted.) "); |
KSexecuteString(" (Computation is interrupted.) "); /* move to ctrlC-hook?*/ |
| return(-1); |
return(-1); |
| }else{ } |
}else{ } |
| }else{ |
}else{ |