Lines Matching defs:base
73 static int get_char(char c, int base);
79 static curl_off_t strtooff(const char *nptr, char **endptr, int base)
112 if(base == 16 || base == 0) {
114 base = 16;
118 if(base == 8 || base == 0) {
120 base = 8;
124 /* Matching strtol, if the base is 0 and it doesn't look like
125 * the number is octal or hex, we assume it's base 10.
127 if(base == 0) {
128 base = 10;
134 for(i = get_char(end[0], base);
136 end++, i = get_char(end[0], base)) {
137 newval = base * value + i;
169 * Returns the value of c in the given base, or -1 if c cannot
170 * be interpreted properly in that base (i.e., is out of range,
173 * @param c the character to interpret according to base
174 * @param base the base in which to interpret c
176 * @return the value of c in base, or -1 if c isn't in range
178 static int get_char(char c, int base)
206 if(value >= base) {
217 CURLofft curlx_strtoofft(const char *str, char **endp, int base,
224 DEBUGASSERT(base); /* starting now, avoid base zero */
233 number = strtooff(str, &end, base);