#include <precomp.h>
Go to the source code of this file.
◆ strtoull()
Definition at line 5 of file strtoull.c.
6{
8 unsigned long long acc;
10 unsigned long long cutoff;
11 int neg = 0, any, cutlim;
12
13
14
15
16 do {
20 {
21 neg = 1;
23 }
27 c ==
'0' && (*
s ==
'x' || *
s ==
'X'))
28 {
32 }
34 base =
c ==
'0' ? 8 : 10;
37 for (acc = 0, any = 0;;
c = *
s++)
38 {
43 else
44 break;
46 break;
47 if (any < 0 || acc > cutoff || (acc == cutoff &&
c > cutlim))
48 any = -1;
49 else {
50 any = 1;
53 }
54 }
55 if (any < 0)
56 {
58#ifndef _LIBCNT_
60#endif
61 }
62 else if (neg)
63 acc = 0-acc;
64 if (endptr != 0)
65 *endptr = any ? (
char *)((
size_t)(
s - 1)) : (
char *)((
size_t)nptr);
66 return acc;
67}
errno_t __cdecl _set_errno(_In_ int _Value)