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 strtol_l(const char * __restrict nptr, char ** __restrict endptr, int base, in strtol_l() argument
61 * Skip white space and pick up leading +/- sign if any. in strtol_l()
62 * If base is 0, allow 0x for hex and 0 for octal, else in strtol_l()
63 * assume decimal; if base is already 16, allow 0x. in strtol_l()
69 if (c == '-') { in strtol_l()
77 if ((base == 0 || base == 16) && in strtol_l()
78 c == '0' && (*s == 'x' || *s == 'X') && in strtol_l()
84 base = 16; in strtol_l()
86 if ((base == 0 || base == 2) && in strtol_l()
91 base = 2; in strtol_l()
93 if (base == 0) in strtol_l()
94 base = c == '0' ? 8 : 10; in strtol_l()
96 if (base < 2 || base > 36) in strtol_l()
102 * base. An input number that is greater than this value, if in strtol_l()
107 * [-2147483648..2147483647] and the input base is 10, in strtol_l()
116 cutoff = neg ? (unsigned long)-(LONG_MIN + LONG_MAX) + LONG_MAX in strtol_l()
118 cutlim = cutoff % base; in strtol_l()
119 cutoff /= base; in strtol_l()
122 c -= '0'; in strtol_l()
124 c -= 'A' - 10; in strtol_l()
126 c -= 'a' - 10; in strtol_l()
129 if (c >= base) in strtol_l()
132 any = -1; in strtol_l()
135 acc *= base; in strtol_l()
146 acc = -acc; in strtol_l()
148 *endptr = (char *)(any ? s - 1 : nptr); in strtol_l()
152 strtol(const char * __restrict nptr, char ** __restrict endptr, int base) in strtol() argument
154 return strtol_l(nptr, endptr, base, __get_locale()); in strtol()