| version 1.16, 2004/09/05 00:51:17 |
version 1.18, 2004/09/05 08:08:41 |
|
|
| /* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.15 2004/09/04 11:25:58 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.17 2004/09/05 01:15:47 takayama Exp $ */ |
| /* stackmachin.c */ |
/* stackmachin.c */ |
| |
|
| #include <stdio.h> |
#include <stdio.h> |
|
|
| { |
{ |
| int h=0; |
int h=0; |
| while (*str != '\0') { |
while (*str != '\0') { |
| h = ((h*128)+(*str)) % USER_DICTIONARY_SIZE; |
h = ((h*128)+((unsigned char)(*str))) % USER_DICTIONARY_SIZE; |
| str++; |
str++; |
| } |
} |
| return(h); |
return(h); |
|
|
| int hash1(str) |
int hash1(str) |
| char *str; |
char *str; |
| { |
{ |
| return(8-(str[0]%8)); |
return(8-((unsigned char)(str[0])%8)); |
| } |
} |
| |
|
| void hashInitialize(struct dictionary *dic) |
void hashInitialize(struct dictionary *dic) |
| Line 965 int executeToken(token) |
|
| Line 965 int executeToken(token) |
|
| for (i=0; i<size; i++) { |
for (i=0; i<size; i++) { |
| status = executeToken(tokenArray[i]); |
status = executeToken(tokenArray[i]); |
| if (status != 0) { |
if (status != 0) { |
| return(status); |
tracePopName(); return(status); |
| } |
} |
| } |
} |
| tracePopName(); |
tracePopName(); |
| Line 978 int executeToken(token) |
|
| Line 978 int executeToken(token) |
|
| ob.tag = Soperator; |
ob.tag = Soperator; |
| ob.lc.ival = primitive; |
ob.lc.ival = primitive; |
| status = executePrimitive(ob); |
status = executePrimitive(ob); |
| if (status == 0) tracePopName(); |
tracePopName(); |
| return(status); |
return(status); |
| } else { |
} else { |
| if (QuoteMode) { |
if (QuoteMode) { |