=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/plugin/oxmisc.c,v retrieving revision 1.23 retrieving revision 1.28 diff -u -p -r1.23 -r1.28 --- OpenXM/src/kan96xx/plugin/oxmisc.c 2004/09/17 08:46:10 1.23 +++ OpenXM/src/kan96xx/plugin/oxmisc.c 2015/09/27 08:12:42 1.28 @@ -1,5 +1,6 @@ -/* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc.c,v 1.22 2004/09/17 07:27:28 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc.c,v 1.27 2013/11/06 06:23:24 takayama Exp $ */ #include +#include #include #include #include @@ -23,6 +24,11 @@ FILE *MyErrorOut = NULL; #include "ox_kan.h" +#if defined(__MSYS__) +#define setjmp(e) _setjmp(e) +#define sigsetjmp(e,n) _setjmp(e) +#endif + #define READBUFSIZE 5000 int OxVersion = 200012030; @@ -178,6 +184,9 @@ int oxWaitSyncBall(ox_stream ostream) fprintf(stderr,"Looking for the next message tag. mtag=%d\n",mtag); /* or stdout */ fflush(NULL); + if (mtag == -1) { + fprintf(stderr,"Your peer seems to be dead.\n"); return 0; + } } } @@ -344,7 +353,7 @@ void oxSendResultOfControl(int fd) void oxSendMathCap(ox_stream os,struct mathCap *mathcap) { int i,n,infosize,ncmo; - struct object mathinfo; + struct object mathinfo = OINIT; /* printf("ox sending mathcap\n"); fflush(stdout); */ mathinfo = *((struct object *)(mathcap->infop)); infosize = getoaSize(mathinfo);