150 char * endptr = NULL;
162 const char * cctemp = NULL;
168 cctemp = &(
string[ipos-1]);
169 while (!isdigit(*cctemp) && (*cctemp !=
',') && (*cctemp !=
'\0')) {
170 if (*cctemp ==
'-') {
182 star_strlcpy( tempbuf, &(
string[*nstrt-1]),
sizeof(tempbuf) );
185 strlcpy( tempbuf, &(
string[*nstrt-1]),
sizeof(tempbuf) );
188 strncpy( tempbuf, &(
string[*nstrt-1]),
sizeof(tempbuf));
189 tempbuf[
sizeof(tempbuf)-1] =
'\0';
195 while (*ctemp !=
'\0') {
196 if (*ctemp ==
'd' || *ctemp ==
'D') *ctemp =
'E';
205 retval = strtod( tempbuf, &endptr );
206 if (retval == 0.0 && endptr == tempbuf) {
214 while (
ISBLANK(*endptr) || isalpha(*endptr) ) {
218 }
else if ( errno == ERANGE ) {
222 *jflag = (dreslt_sign < 0 ? -1 : 0);
224 if ( retval < 0.0 ) {
226 }
else if ( retval == 0.0 ) {
228 double test = copysign( 1.0, retval );
241 *nstrt += endptr - tempbuf;
244 if (*endptr ==
',') {
256 if (*jflag != 1) *dreslt = retval;
static int ISBLANK(int c)