version 1.17, 2004/03/11 03:32:46 |
version 1.19, 2004/09/05 00:51:18 |
|
|
/* $OpenXM: OpenXM/src/kxx/ox_texmacs.c,v 1.16 2004/03/09 07:10:46 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kxx/ox_texmacs.c,v 1.18 2004/03/25 01:37:14 takayama Exp $ */ |
|
|
#include <stdio.h> |
#include <stdio.h> |
#include <setjmp.h> |
#include <setjmp.h> |
|
|
|
|
extern int Quiet; |
extern int Quiet; |
extern JMP_BUF EnvOfStackMachine; |
extern JMP_BUF EnvOfStackMachine; |
|
extern int Calling_ctrlC_hook; |
int Format=1; /* 1 : latex mode */ |
int Format=1; /* 1 : latex mode */ |
int OutputLimit_for_TeXmacs = (1024*10); |
int OutputLimit_for_TeXmacs = (1024*10); |
|
|
Line 142 main(int argc,char *argv[]) { |
|
Line 143 main(int argc,char *argv[]) { |
|
while(1) { |
while(1) { |
/* printp(sys); no prompt */ |
/* printp(sys); no prompt */ |
if (SETJMP(EnvOfStackMachine)) { |
if (SETJMP(EnvOfStackMachine)) { |
KSexecuteString(" ctrlC-hook "); /* Execute User Defined functions. */ |
if (!Calling_ctrlC_hook) { |
|
Calling_ctrlC_hook = 1; |
|
KSexecuteString(" ctrlC-hook "); /* Execute User Defined functions. */ |
|
} |
|
Calling_ctrlC_hook = 0; |
if (signal(SIGINT,SIG_IGN) != SIG_IGN) { |
if (signal(SIGINT,SIG_IGN) != SIG_IGN) { |
signal(SIGINT,ctrlC); |
signal(SIGINT,ctrlC); |
} |
} |
Line 263 static char *readString(FILE *fp, char *prolog, char * |
|
Line 268 static char *readString(FILE *fp, char *prolog, char * |
|
fprintf(Dfp,"[%x] ",c); fflush(Dfp); |
fprintf(Dfp,"[%x] ",c); fflush(Dfp); |
#endif |
#endif |
if (c == END_OF_INPUT) { |
if (c == END_OF_INPUT) { |
|
/* If there remains data in the stream, |
|
read the remaining data. */ |
|
/* |
if (oxSocketSelect0(0,1)) { |
if (oxSocketSelect0(0,1)) { |
/* If there remains data in the stream, |
|
read the remaining data. */ |
|
if (c == '\n') c=' '; |
if (c == '\n') c=' '; |
s[n++] = c; s[n] = 0; m++; |
s[n++] = c; s[n] = 0; m++; |
INC_BUF ; |
INC_BUF ; |
continue; |
continue; |
} |
} |
|
*/ |
break; |
break; |
} |
} |
if (c == '\n') c=' '; |
if ( c == '\v') c=' '; |
s[n++] = c; s[n] = 0; m++; |
s[n++] = c; s[n] = 0; m++; |
INC_BUF ; |
INC_BUF ; |
} |
} |