115 const char *strstart = NULL;
116 const char * ctemp = NULL;
117 char * endptr = NULL;
126 strstart = &(
string[*nstrt-1]);
132 while ( ctemp !=
'\0' ) {
133 if (isdigit(*ctemp))
break;
137 if (*ctemp ==
'-') hasminus = 1;
143 retval = strtol( strstart, &endptr, 10 );
144 if (retval == 0.0 && endptr == strstart) {
153 while (
ISBLANK(*endptr) || isalpha(*endptr) || *endptr ==
'+' ) {
157 }
else if ( errno == ERANGE ) {
160 if ( retval < 0 || hasminus ) {
168 *nstrt = endptr -
string + 1;
171 if (*endptr ==
',') {
183 if (*jflag != 1) *ireslt = retval;
static int ISBLANK(int c)