41 #if defined __cplusplus
89 double *
p, *values, *
d = (
double *) xDT->
data;
92 if( xDT->
length == 0 )
return( NULL );
93 if( *n == 0 )
return( NULL );
95 if(( values = (
double*)
xData_malloc2( NULL, *n *
sizeof(
double ), 0,
"values" ) )) {
97 for( i = 0; i < *
n; i++, p++, d++ ) *p = *d;
123 if( ( xDT->
data =
xData_malloc2( smr, n *
sizeof(
double ), 0,
"data" ) ) == NULL )
return( 1 );
124 for( i = 0, s = text, p = (
double *) xDT->
data; i < n; i++, p++, s = e ) {
128 while( isspace( *e ) ) e++;
130 smr_setMessageError( smr, smrUser, __FILE__, __LINE__, 1,
"text contains extra data = %s", e );
134 if( status != 0 ) release( smr, xDT );
144 char *str, *
p, fmt[32] =
" %15.7e\n";
146 double *
d = (
double*) xDT->
data;
149 if( ( str = (
char *) malloc( recordSize * ( n + 1 ) ) ) == NULL )
return( NULL );
150 for( i = 0, p = str; i <
n; i++, p += recordSize, d++ ) sprintf( p, fmt, d ); *p = 0;
170 double *
p, *values, *d = (
double*) xDT->
data;
172 if( xDT->
length == 0 )
return( NULL );
173 if( ( xDT->
length + 1 ) != nXs )
return( NULL );
175 if( ( values = (
double*)
xData_malloc2( NULL, 4 * xDT->
length *
sizeof(
double ), 0,
"values" ) ) == NULL )
return( NULL );
177 for( i = 0; i < xDT->
length; i++ ) {
183 p = &(values[4 * xDT->
start + 1]);
184 for( i = xDT->
start; i < xDT->end; i++, d++, p += 2 ) {
192 #if defined __cplusplus