Lines Matching full:cp
51 static unsigned int simple_guess_base(const char *cp) in simple_guess_base() argument
53 if (cp[0] == '0') { in simple_guess_base()
54 if (TOLOWER(cp[1]) == 'x' && isxdigit(cp[2])) in simple_guess_base()
65 * @cp: The start of the string
70 unsigned long long simple_strtoull(const char *cp, char **endp, in simple_strtoull() argument
76 base = simple_guess_base(cp); in simple_strtoull()
78 if (base == 16 && cp[0] == '0' && TOLOWER(cp[1]) == 'x') in simple_strtoull()
79 cp += 2; in simple_strtoull()
81 while (isxdigit(*cp)) { in simple_strtoull()
84 value = isdigit(*cp) ? *cp - '0' : TOLOWER(*cp) - 'a' + 10; in simple_strtoull()
88 cp++; in simple_strtoull()
91 *endp = (char *)cp; in simple_strtoull()
96 long simple_strtol(const char *cp, char **endp, unsigned int base) in simple_strtol() argument
98 if (*cp == '-') in simple_strtol()
99 return -simple_strtoull(cp + 1, endp, base); in simple_strtol()
101 return simple_strtoull(cp, endp, base); in simple_strtol()