1 #include <msvcrt/wchar.h>
4 long wcstol(const wchar_t* cp, wchar_t** endp, int base)
6 long result = 0, value;
19 if ((*cp == L'x') && iswxdigit(cp[1])) {
25 while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp)
26 ? towupper(*cp) : *cp)-L'A'+10) < base) {
27 result = result*base + value;
35 unsigned long wcstoul(const wchar_t* cp, wchar_t** endp, int base)
37 unsigned long result = 0, value;
44 if ((*cp == L'x') && iswxdigit(cp[1])) {
50 while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp)
51 ? towupper(*cp) : *cp)-L'A'+10) < base) {
52 result = result*base + value;