Lines Matching full:cp
68 static unsigned int simple_guess_base(const char *cp) in simple_guess_base() argument
70 if (cp[0] == '0') { in simple_guess_base()
71 if (TOLOWER(cp[1]) == 'x' && isxdigit(cp[2])) in simple_guess_base()
82 * @cp: The start of the string
87 unsigned long long simple_strtoull(const char *cp, char **endp, in simple_strtoull() argument
93 base = simple_guess_base(cp); in simple_strtoull()
95 if (base == 16 && cp[0] == '0' && TOLOWER(cp[1]) == 'x') in simple_strtoull()
96 cp += 2; in simple_strtoull()
98 while (isxdigit(*cp)) { in simple_strtoull()
101 value = isdigit(*cp) ? *cp - '0' : TOLOWER(*cp) - 'a' + 10; in simple_strtoull()
105 cp++; in simple_strtoull()
108 *endp = (char *)cp; in simple_strtoull()
113 long simple_strtol(const char *cp, char **endp, unsigned int base) in simple_strtol() argument
115 if (*cp == '-') in simple_strtol()
116 return -simple_strtoull(cp + 1, endp, base); in simple_strtol()
118 return simple_strtoull(cp, endp, base); in simple_strtol()