1 #include <crtdll/wchar.h>
4 long wcstol(const wchar_t *cp,wchar_t **endp,int base)
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;
31 *endp = (wchar_t *)cp;
36 unsigned long wcstoul(const wchar_t *cp,wchar_t **endp,int base)
38 unsigned long result = 0,value;
45 if ((*cp == L'x') && iswxdigit(cp[1])) {
51 while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp)
52 ? towupper(*cp) : *cp)-L'A'+10) < base) {
53 result = result*base + value;
57 *endp = (wchar_t *)cp;