version 1.7, 2000/09/07 23:59:55 |
version 1.11, 2001/08/03 08:50:19 |
|
|
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* 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.10 2000/11/08 08:02:51 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 94 static struct mathcap my_mc; |
|
Line 94 static struct mathcap my_mc; |
|
static struct mathcap *remote_mc; |
static struct mathcap *remote_mc; |
static int remote_mc_len; |
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) |
void ox_resetenv(s) |
char *s; |
char *s; |
{ |
{ |
|
#if defined(VISUAL) |
|
cleanup_events(); |
|
#endif |
fprintf(stderr,"%s\n",s); |
fprintf(stderr,"%s\n",s); |
longjmp(ox_env,1); |
longjmp(ox_env,1); |
} |
} |
Line 109 static int available_cmo[] = { |
|
Line 125 static int available_cmo[] = { |
|
CMO_RING_BY_NAME, CMO_DISTRIBUTED_POLYNOMIAL, |
CMO_RING_BY_NAME, CMO_DISTRIBUTED_POLYNOMIAL, |
CMO_RECURSIVE_POLYNOMIAL, CMO_UNIVARIATE_POLYNOMIAL, |
CMO_RECURSIVE_POLYNOMIAL, CMO_UNIVARIATE_POLYNOMIAL, |
CMO_INDETERMINATE, |
CMO_INDETERMINATE, |
|
CMO_TREE, |
0 |
0 |
}; |
}; |
|
|
Line 438 void wait_for_data(int s) |
|
Line 455 void wait_for_data(int s) |
|
|
|
void ox_send_data(int s,pointer p) |
void ox_send_data(int s,pointer p) |
{ |
{ |
if ( ox_check && !ox_check_cmo(s,(Obj)p) ) |
ERR err; |
error("ox_send_data : Mathcap violation"); |
|
|
if ( ox_check && !ox_check_cmo(s,(Obj)p) ) { |
|
create_error(&err,ox_serial,"ox_send_data : Mathcap violation"); |
|
p = (pointer)err; |
|
} |
begin_critical(); |
begin_critical(); |
ox_write_int(s,OX_DATA); |
ox_write_int(s,OX_DATA); |
ox_write_int(s,ox_serial++); |
ox_write_int(s,ox_serial++); |
Line 598 int ox_check_cmo(int s, Obj obj) |
|
Line 619 int ox_check_cmo(int s, Obj obj) |
|
return 1; |
return 1; |
switch ( OID(obj) ) { |
switch ( OID(obj) ) { |
case O_MATHCAP: case O_STR: case O_ERR: case O_USINT: case O_VOID: |
case O_MATHCAP: case O_STR: case O_ERR: case O_USINT: case O_VOID: |
|
case O_BYTEARRAY: |
return 1; |
return 1; |
case O_P: |
case O_P: |
if ( !check_by_mc(s,OX_DATA,CMO_RECURSIVE_POLYNOMIAL) ) |
if ( !check_by_mc(s,OX_DATA,CMO_RECURSIVE_POLYNOMIAL) ) |
Line 630 int ox_check_cmo(int s, Obj obj) |
|
Line 652 int ox_check_cmo(int s, Obj obj) |
|
for ( m = BDY((LIST)obj); m; m = NEXT(m) ) |
for ( m = BDY((LIST)obj); m; m = NEXT(m) ) |
if ( !ox_check_cmo(s,(BDY(m))) ) |
if ( !ox_check_cmo(s,(BDY(m))) ) |
return 0; |
return 0; |
|
return 1; |
|
case O_QUOTE: /* XXX */ |
return 1; |
return 1; |
default: |
default: |
return 0; |
return 0; |