nptr++;
c = (
int)*nptr++;sign = c;
/* save sign indication */ if (c == '-' || c == '+')c = (
int)*nptr++; /* skip sign */total = 0;
while (isdigit(c)) {total = 10 * total + (c -
'0'); /* accumulate digit */ //total = 10 * total + (int)c; /* accumulate digit */c = (
int)*nptr++; /* get next char */}
if (sign == '-') return -total; else return total; /* return result, negated if necessary */