41 #if defined __cplusplus
93 if( n *
sizeof(
double ) > (size_t) nAllocatedBytes ) {
95 smr_setMessageError( smr, smrUser, __FILE__, __LINE__, 1,
"allocated memory = %lld to small, need %lld", nAllocatedBytes, n );
98 p = (
double *) xDT->
data;
99 for( i = 0; i < n; i++, d++, p++ ) *d = *
p;
113 p = (
double *) xDT->
data;
115 if( ( data = (
double*)
xData_malloc2( smr, n *
sizeof(
double ), 0,
"data" ) ) == NULL )
return( NULL );
116 for( i = 0; i <
n; i++, p++ ) data[i] = *p;
143 if( ( xDT->
data =
xData_malloc2( smr, n *
sizeof(
double ), 0,
"1d.x-toData" ) ) == NULL )
return( 1 );
144 for( i = 0, s = text, p = (
double *) xDT->
data; i < n; i++, p++, s = e ) {
148 while( isspace( *e ) ) e++;
150 smr_setMessageError( smr, smrUser, __FILE__, __LINE__, 1,
"xData.1d.x contains extra data = %s", e );
154 if( status != 0 ) release( smr, xDT );
165 double *
data = (
double *) xDT->
data;
169 if( ( str = (
char *) malloc( ( n + 1 ) * 17 ) ) == NULL )
return( NULL );
170 for( i = 0, p = str; i <
n; i++, p += 17, data++ ) {
171 sprintf( p,
" %15.7e\n", *data );
185 #if defined __cplusplus