version 1.47, 2016/06/29 05:07:23 |
version 1.49, 2022/03/28 09:12:38 |
|
|
/* -*- mode: C; coding: euc-japan -*- */ |
/* -*- mode: C; coding: euc-japan -*- */ |
/* $OpenXM: OpenXM/src/ox_toolkit/ox.c,v 1.46 2016/06/28 11:59:15 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); |
} |
} |