| version 1.6, 2000/12/10 02:21:45 |
version 1.7, 2001/01/08 05:26:48 |
|
|
| /* $OpenXM: OpenXM/src/k097/d.c,v 1.5 2000/05/04 11:05:19 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/k097/d.c,v 1.6 2000/12/10 02:21:45 takayama Exp $ */ |
| /* simple.c, 1996, 1/1 --- 1/5 */ |
/* simple.c, 1996, 1/1 --- 1/5 */ |
| #include <stdio.h> |
#include <stdio.h> |
| #include <ctype.h> |
#include <ctype.h> |
|
|
| |
|
| int Interactive = 1; |
int Interactive = 1; |
| |
|
| |
static int isThereStdin(); |
| |
#define MARK_CHAR 3 |
| |
|
| main2(int argc, char *argv[]) { |
main2(int argc, char *argv[]) { |
| FILE *f; |
FILE *f; |
| FILE *outf; |
FILE *outf; |
| Line 584 KCerror(char *s) /* You need this function. Otherwis |
|
| Line 587 KCerror(char *s) /* You need this function. Otherwis |
|
| { |
{ |
| K00recoverFromError(); |
K00recoverFromError(); |
| fprintf(stderr,"\nSyntax Error in the line %d:%s\n",Linenumber,s); |
fprintf(stderr,"\nSyntax Error in the line %d:%s\n",Linenumber,s); |
| showStringBuff(Inop); return ; |
showStringBuff(Inop); |
| |
/* Clean the junks. Try load("debug/buggy.k"); */ |
| |
if (isThereStdin()) { |
| |
ungetc(MARK_CHAR,stdin); |
| |
while (fsgetc(Inop) > MARK_CHAR) ; |
| |
} |
| |
return ; |
| longjmp(KCenvOfParser,2); |
longjmp(KCenvOfParser,2); |
| exit(1); |
exit(1); |
| } |
} |
| Line 875 static int popFile() { |
|
| Line 884 static int popFile() { |
|
| /* Saki = SakiStack[Stackp]; */ |
/* Saki = SakiStack[Stackp]; */ |
| Saki = '\n'; |
Saki = '\n'; |
| return(Saki); |
return(Saki); |
| |
} |
| |
|
| |
static int isThereStdin() { |
| |
if (Stackp > 1 && (InopStack[1])->tag == Sfile |
| |
&& (InopStack[1])->lc.file == stdin) { |
| |
return(1); |
| |
}else{ |
| |
return(0); |
| |
} |
| } |
} |
| |
|
| int fsgetc(objectp op) { |
int fsgetc(objectp op) { |