#include <limits.h>
#include <errno.h>
#include <ctype.h>
#include <stdlib.h>
Go to the source code of this file.
|
unsigned long long | strtoull (const char *__restrict nptr, char **__restrict endptr, int base) |
|
#define ULLONG_MAX 0xFFFFFFFFFFFFFFFFULL |
unsigned long long strtoull |
( |
const char *__restrict |
nptr, |
|
|
char **__restrict |
endptr, |
|
|
int |
base |
|
) |
| |
Definition at line 46 of file strtoull.c.
49 unsigned long long acc;
51 unsigned long long cutoff;
60 }
while (isspace((
unsigned char)c));
70 c ==
'0' && (*s ==
'x' || *s ==
'X') &&
71 ((s[1] >=
'0' && s[1] <=
'9') ||
72 (s[1] >=
'A' && s[1] <=
'F') ||
73 (s[1] >=
'a' && s[1] <=
'f'))) {
79 base = c ==
'0' ? 8 : 10;
81 if (base < 2 || base > 36)
87 if (c >=
'0' && c <=
'9')
89 else if (c >=
'A' && c <=
'Z')
91 else if (c >=
'a' && c <=
'z')
97 if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
114 *endptr = (
char *)(any ? s - 1 : nptr);