[BACK]Return to ox.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / io

Diff for /OpenXM_contrib2/asir2000/io/ox.c between version 1.6 and 1.11

version 1.6, 2000/08/22 05:04:18 version 1.11, 2001/08/03 08:50:19
Line 44 
Line 44 
  * 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.5 2000/08/21 08:31:38 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
 };  };
   
 static int available_sm[] = {  static int available_sm[] = {
         SM_dupErrors, SM_getsp, SM_popSerializedLocalObject,          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_evalName, SM_executeStringByLocalParser,
         SM_executeStringByLocalParserInBatchMode,          SM_executeStringByLocalParserInBatchMode,
         SM_executeFunction, SM_shutdown, SM_pops,          SM_executeFunction, SM_shutdown, SM_pops,
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;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.11

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>