1 #include <msvcrt/wchar.h>
7 long wcstol(const wchar_t* cp, wchar_t** endp, int base)
9 long result = 0, value;
22 if ((*cp == L'x') && iswxdigit(cp[1])) {
28 while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp)
29 ? towupper(*cp) : *cp)-L'A'+10) < base) {
30 result = result*base + value;
41 unsigned long wcstoul(const wchar_t* cp, wchar_t** endp, int base)
43 unsigned long result = 0, value;
50 if ((*cp == L'x') && iswxdigit(cp[1])) {
56 while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp)
57 ? towupper(*cp) : *cp)-L'A'+10) < base) {
58 result = result*base + value;