#include <precomp.h>
Go to the source code of this file.
◆ wcstoul()
Definition at line 14 of file wcstoul.c.
15{
16 const wchar_t *
s = nptr;
17 unsigned long acc;
19 unsigned long cutoff;
20 int neg = 0, any, cutlim;
21
22
23
24
25 do {
29 {
30 neg = 1;
32 }
36 c ==
L'0' && (*
s ==
L'x' || *
s ==
L'X'))
37 {
41 }
46 for (acc = 0, any = 0;;
c = *
s++)
47 {
52 else
53 break;
55 break;
56 if (any < 0 || acc > cutoff || (acc == cutoff &&
c > cutlim))
57 any = -1;
58 else {
59 any = 1;
62 }
63 }
64 if (any < 0)
65 {
67 }
68 else if (neg)
69 acc = 0-acc;
70 if (endptr != 0)
71 *endptr = any ? (
wchar_t *)((
size_t)(
s - 1)) : (
wchar_t *)((
size_t)nptr);
72 return acc;
73}
int __cdecl iswctype(wint_t wc, wctype_t wctypeFlags)