Lines Matching +full:3 +full:base +full:- +full:x

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
20 * 3. Neither the name of the University nor the names of its contributors
50 strtoimax_l(const char * __restrict nptr, char ** __restrict endptr, int base, in strtoimax_l() argument
61 * Skip white space and pick up leading +/- sign if any. in strtoimax_l()
62 * If base is 0, allow 0x for hex and 0 for octal, else in strtoimax_l()
63 * assume decimal; if base is already 16, allow 0x. in strtoimax_l()
69 if (c == '-') { in strtoimax_l()
77 if ((base == 0 || base == 16) && in strtoimax_l()
78 c == '0' && (*s == 'x' || *s == 'X') && in strtoimax_l()
84 base = 16; in strtoimax_l()
86 if ((base == 0 || base == 2) && in strtoimax_l()
91 base = 2; in strtoimax_l()
93 if (base == 0) in strtoimax_l()
94 base = c == '0' ? 8 : 10; in strtoimax_l()
96 if (base < 2 || base > 36) in strtoimax_l()
102 * base. An input number that is greater than this value, if in strtoimax_l()
107 * [-9223372036854775808..9223372036854775807] and the input base in strtoimax_l()
117 cutoff = neg ? (uintmax_t)-(INTMAX_MIN + INTMAX_MAX) + INTMAX_MAX in strtoimax_l()
119 cutlim = cutoff % base; in strtoimax_l()
120 cutoff /= base; in strtoimax_l()
123 c -= '0'; in strtoimax_l()
125 c -= 'A' - 10; in strtoimax_l()
127 c -= 'a' - 10; in strtoimax_l()
130 if (c >= base) in strtoimax_l()
133 any = -1; in strtoimax_l()
136 acc *= base; in strtoimax_l()
147 acc = -acc; in strtoimax_l()
149 *endptr = (char *)(any ? s - 1 : nptr); in strtoimax_l()
153 strtoimax(const char * __restrict nptr, char ** __restrict endptr, int base) in strtoimax() argument
155 return strtoimax_l(nptr, endptr, base, __get_locale()); in strtoimax()