1 #include <crtdll/string.h>
2 #include <crtdll/ctype.h>
4 unsigned long strtoul(const char *cp,char **endp,unsigned int base)
6 unsigned long result = 0,value;
13 if ((*cp == 'x') && isxdigit(cp[1])) {
19 while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
20 ? toupper(*cp) : *cp)-'A'+10) < base) {
21 result = result*base + value;