=================================================================== RCS file: /home/cvs/OpenXM/src/kxx/ox_texmacs.c,v retrieving revision 1.17 retrieving revision 1.19 diff -u -p -r1.17 -r1.19 --- OpenXM/src/kxx/ox_texmacs.c 2004/03/11 03:32:46 1.17 +++ OpenXM/src/kxx/ox_texmacs.c 2004/09/05 00:51:18 1.19 @@ -1,4 +1,4 @@ -/* $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 #include @@ -47,6 +47,7 @@ extern int Quiet; extern JMP_BUF EnvOfStackMachine; +extern int Calling_ctrlC_hook; int Format=1; /* 1 : latex mode */ int OutputLimit_for_TeXmacs = (1024*10); @@ -142,7 +143,11 @@ main(int argc,char *argv[]) { while(1) { /* printp(sys); no prompt */ 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) { signal(SIGINT,ctrlC); } @@ -263,17 +268,19 @@ static char *readString(FILE *fp, char *prolog, char * fprintf(Dfp,"[%x] ",c); fflush(Dfp); #endif if (c == END_OF_INPUT) { + /* If there remains data in the stream, + read the remaining data. */ + /* if (oxSocketSelect0(0,1)) { - /* If there remains data in the stream, - read the remaining data. */ if (c == '\n') c=' '; s[n++] = c; s[n] = 0; m++; INC_BUF ; continue; } + */ break; } - if (c == '\n') c=' '; + if ( c == '\v') c=' '; s[n++] = c; s[n] = 0; m++; INC_BUF ; }