| version 1.5, 2003/08/22 16:08:20 |
version 1.8, 2013/11/06 06:23:23 |
|
|
| /* $OpenXM: OpenXM/src/k097/ki.c,v 1.4 2002/02/24 10:27:21 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/k097/ki.c,v 1.7 2005/06/16 05:07:24 takayama Exp $ */ |
| /* ki.c ( kx interpreter ) */ |
/* ki.c ( kx interpreter ) */ |
| |
|
| #include <stdio.h> |
#include <stdio.h> |
| Line 42 extern int DebugMode; |
|
| Line 42 extern int DebugMode; |
|
| sendKan(int p) { |
sendKan(int p) { |
| static int n = 2; |
static int n = 2; |
| extern int Interactive; |
extern int Interactive; |
| struct object obj; |
struct object obj = OINIT; |
| int result; |
int result; |
| |
extern int InSendmsg2; |
| signal(SIGINT,SIG_IGN); /* Don't jump to ctrlC(). */ |
signal(SIGINT,SIG_IGN); /* Don't jump to ctrlC(). */ |
| if (p == 10) {printf("In(%d)= ",n++); return;} |
if (p == 10) {printf("In(%d)= ",n++); return 0;} |
| if (p == 0 && DebugCompiler) printf("sendKan[%s]\n",Kbuff); |
if (p == 0 && DebugCompiler) printf("sendKan[%s]\n",Kbuff); |
| /* printf("sendKan[%s]\n",Kbuff); */ |
/* printf("sendKan[%s]\n",Kbuff); */ |
| if (strlen(Kbuff) != 0) { |
if (strlen(Kbuff) != 0) { |
|
|
| } |
} |
| /* fprintf(stderr,"r=%d ",result); */ |
/* fprintf(stderr,"r=%d ",result); */ |
| if (result == -1) { |
if (result == -1) { |
| K00recoverFromError(); |
K00recoverFromError(); InSendmsg2 = 0; |
| fprintf(stderr,"--- Engine error or interrupt : "); |
fprintf(stderr,"--- Engine error or interrupt : "); |
| if (DebugMode) { |
if (DebugMode) { |
| signal(SIGINT,SIG_DFL); |
signal(SIGINT,SIG_DFL); |
|
|
| #define AFO |
#define AFO |
| #ifdef AFO |
#ifdef AFO |
| if (SETJMP(KCenvOfParser)) { |
if (SETJMP(KCenvOfParser)) { |
| |
InSendmsg2=0; |
| fprintf(stderr,"Error: Goto the top level.\n"); |
fprintf(stderr,"Error: Goto the top level.\n"); |
| parseAfile(stdin); |
parseAfile(stdin); |
| KCparse(); |
KCparse(); |
| Line 155 execFile(char *s) |
|
| Line 157 execFile(char *s) |
|
| fprintf(stderr,"Fatal error: Cannot open the system macro %s in %s, %s, %s nor %s.\n", |
fprintf(stderr,"Fatal error: Cannot open the system macro %s in %s, %s, %s nor %s.\n", |
| s,tname2,tname3,tname4,tname); |
s,tname2,tname3,tname4,tname); |
| exit(11); |
exit(11); |
| return; |
return 0; |
| } |
} |
| } |
} |
| } |
} |