Lines Matching refs:ptr
46 char *ptr, *nptr; in bc_str2num() local
53 ptr = str; in bc_str2num()
57 if ( (*ptr == '+') || (*ptr == '-')) ptr++; /* Sign */ in bc_str2num()
58 while (*ptr == '0') ptr++; /* Skip leading zeros. */ in bc_str2num()
59 while (*ptr >= '0' && *ptr <= '9') ptr++, digits++; /* digits */ in bc_str2num()
60 if (*ptr == '.') ptr++; /* decimal point */ in bc_str2num()
61 while (*ptr >= '0' && *ptr <= '9') ptr++, strscale++; /* digits */ in bc_str2num()
62 if ((*ptr != '\0') || (digits+strscale == 0)) in bc_str2num()
65 return *ptr == '\0'; in bc_str2num()
78 ptr = str; in bc_str2num()
79 if (*ptr == '-') in bc_str2num()
82 ptr++; in bc_str2num()
87 if (*ptr == '+') ptr++; in bc_str2num()
89 while (*ptr == '0') ptr++; /* Skip leading zeros. */ in bc_str2num()
97 *nptr++ = CH_VAL(*ptr++); in bc_str2num()
103 ptr++; /* skip the decimal point! */ in bc_str2num()
105 *nptr++ = CH_VAL(*ptr++); in bc_str2num()