[BACK]Return to ox.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_toolkit

Diff for /OpenXM/src/ox_toolkit/ox.c between version 1.46 and 1.49

version 1.46, 2016/06/28 11:59:15 version 1.49, 2022/03/28 09:12:38
Line 1 
Line 1 
 /* -*- mode: C; coding: euc-japan -*- */  /* -*- mode: C; coding: euc-japan -*- */
 /* $OpenXM: OpenXM/src/ox_toolkit/ox.c,v 1.45 2015/08/27 03:03:33 ohara Exp $ */  /* $OpenXM: OpenXM/src/ox_toolkit/ox.c,v 1.48 2016/06/30 01:14:00 ohara Exp $ */
   
 /*  /*
    This module includes functions for sending/receiveng CMO's.     This module includes functions for sending/receiveng CMO's.
    Some commnets is written in Japanese by the EUC-JP coded  
    character set.  
 */  */
   
 #include <stdio.h>  #include <stdio.h>
Line 183  static cmo_int32* receive_cmo_int32(OXFILE *oxfp)
Line 181  static cmo_int32* receive_cmo_int32(OXFILE *oxfp)
   
 static cmo_string* receive_cmo_string(OXFILE *oxfp)  static cmo_string* receive_cmo_string(OXFILE *oxfp)
 {  {
       int i,n;
     int len = receive_int32(oxfp);      int len = receive_int32(oxfp);
     char* s = MALLOC(len+1);      char* s = MALLOC(len+1);
     memset(s, '\0', len+1);      memset(s, '\0', len+1);
     if (len > 0) {      for(i=0; i<len; i+=n) {
         oxf_read(s, 1, len, oxfp);          n=oxf_read(s+i, 1, len-i, oxfp);
     }      }
     return new_cmo_string(s);      return new_cmo_string(s);
 }  }
Line 384  cmo *receive_cmo_tag(OXFILE *oxfp, int tag)
Line 383  cmo *receive_cmo_tag(OXFILE *oxfp, int tag)
     case CMO_QQ:      case CMO_QQ:
         m = (cmo *)receive_cmo_qq(oxfp);          m = (cmo *)receive_cmo_qq(oxfp);
         break;          break;
     case CMO_BIGFLOAT:      case CMO_BIGFLOAT32:
         m = (cmo *)receive_cmo_bf(oxfp);          m = (cmo *)receive_cmo_bf(oxfp);
         break;          break;
     case CMO_COMPLEX:      case CMO_COMPLEX:
Line 748  void send_cmo(OXFILE *oxfp, cmo* c)
Line 747  void send_cmo(OXFILE *oxfp, cmo* c)
     case CMO_QQ:      case CMO_QQ:
         send_cmo_qq(oxfp, (cmo_qq *)c);          send_cmo_qq(oxfp, (cmo_qq *)c);
         break;          break;
     case CMO_BIGFLOAT:      case CMO_BIGFLOAT32:
         send_cmo_bf(oxfp, (cmo_bf *)c);          send_cmo_bf(oxfp, (cmo_bf *)c);
         break;          break;
     case CMO_COMPLEX:      case CMO_COMPLEX:

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.49

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