=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/ox.c,v retrieving revision 1.7 retrieving revision 1.10 diff -u -p -r1.7 -r1.10 --- OpenXM_contrib2/asir2000/io/ox.c 2000/09/07 23:59:55 1.7 +++ OpenXM_contrib2/asir2000/io/ox.c 2000/11/08 08:02:51 1.10 @@ -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.6 2000/08/22 05:04:18 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/io/ox.c,v 1.9 2000/11/07 06:35:38 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); } @@ -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++); @@ -598,6 +618,7 @@ int ox_check_cmo(int s, Obj obj) return 1; switch ( OID(obj) ) { case O_MATHCAP: case O_STR: case O_ERR: case O_USINT: case O_VOID: + case O_BYTEARRAY: return 1; case O_P: if ( !check_by_mc(s,OX_DATA,CMO_RECURSIVE_POLYNOMIAL) )