71,6 → 71,25 |
return new; |
} |
|
measured_string_ref measured_string_copy( measured_string_ref source ){ |
measured_string_ref new; |
|
if( ! source ) return NULL; |
new = ( measured_string_ref ) malloc( sizeof( measured_string_t )); |
if( new ){ |
new->value = ( char * ) malloc( source->length + 1 ); |
if( new->value ){ |
new->length = source->length; |
memcpy( new->value, source->value, new->length ); |
new->value[ new->length ] = '\0'; |
return new; |
}else{ |
free( new ); |
} |
} |
return NULL; |
} |
|
int measured_strings_receive( measured_string_ref * strings, char ** data, size_t count ){ |
ERROR_DECLARE; |
|