=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/ox.c,v retrieving revision 1.5 retrieving revision 1.9 diff -u -p -r1.5 -r1.9 --- OpenXM_contrib2/asir2000/io/ox.c 2000/08/21 08:31:38 1.5 +++ OpenXM_contrib2/asir2000/io/ox.c 2000/11/07 06:35:38 1.9 @@ -23,7 +23,7 @@ * shall be made on your publication or presentation in any form of the * results obtained by use of the SOFTWARE. * (4) In the event that you modify the SOFTWARE, you shall notify FLL by - * e-mail at risa-admin@flab.fujitsu.co.jp of the detailed specification + * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification * for such modification or the source code of the modified part of the * SOFTWARE. * @@ -44,7 +44,7 @@ * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. - * $OpenXM: OpenXM_contrib2/asir2000/io/ox.c,v 1.4 2000/03/28 06:32:22 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/io/ox.c,v 1.8 2000/09/12 06:05:30 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -94,9 +94,25 @@ static struct mathcap my_mc; static struct mathcap *remote_mc; static int remote_mc_len; +#if defined(VISUAL) +/* XXX : mainly used in engine2000/io.c, but declared here */ +HANDLE hStreamNotify,hStreamNotify_Ack; + +void cleanup_events() +{ + /* ox_watch_stream may be waiting for hStreamNotify_Ack to be set */ + + ResetEvent(hStreamNotify); + SetEvent(hStreamNotify_Ack); +} +#endif + void ox_resetenv(s) char *s; { +#if defined(VISUAL) + cleanup_events(); +#endif fprintf(stderr,"%s\n",s); longjmp(ox_env,1); } @@ -114,7 +130,7 @@ static int available_cmo[] = { static int available_sm[] = { SM_dupErrors, SM_getsp, SM_popSerializedLocalObject, - SM_popCMO, SM_popString, SM_setName, + SM_popCMO, SM_popString, SM_pushCMOtag, SM_setName, SM_evalName, SM_executeStringByLocalParser, SM_executeStringByLocalParserInBatchMode, SM_executeFunction, SM_shutdown, SM_pops, @@ -438,8 +454,12 @@ void wait_for_data(int s) void ox_send_data(int s,pointer p) { - if ( ox_check && !ox_check_cmo(s,(Obj)p) ) - error("ox_send_data : Mathcap violation"); + ERR err; + + if ( ox_check && !ox_check_cmo(s,(Obj)p) ) { + create_error(&err,ox_serial,"ox_send_data : Mathcap violation"); + p = (pointer)err; + } begin_critical(); ox_write_int(s,OX_DATA); ox_write_int(s,ox_serial++);