36 #if (SIZEOF_CURL_OFF_T > SIZEOF_LONG) 38 # define strtooff strtoll 40 # if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_INTEGRAL_MAX_BITS >= 64) 41 # if defined(_SAL_VERSION) 42 _Check_return_ _CRTIMP __int64
__cdecl _strtoi64(
43 _In_z_
const char *_String,
44 _Out_opt_ _Deref_post_z_
char **_EndPtr, _In_
int _Radix);
46 _CRTIMP __int64
__cdecl _strtoi64(
const char *_String,
47 char **_EndPtr,
int _Radix);
49 # define strtooff _strtoi64 51 # define PRIVATE_STRTOOFF 1 55 # define strtooff strtol 58 #ifdef PRIVATE_STRTOOFF 63 #if('9' - '0') != 9 || ('Z' - 'A') != 25 || ('z' - 'a') != 25 67 static const char valchars[] =
68 "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
71 static int get_char(
char c,
int base);
97 else if(end[0] ==
'+') {
100 else if(end[0] ==
'\0') {
109 if(end[0] ==
'0' && end[1] ==
'x') {
110 if(base == 16 || base == 0) {
115 else if(end[0] ==
'0') {
116 if(base == 8 || base == 0) {
132 for(i = get_char(end[0], base);
134 end++, i = get_char(end[0], base)) {
135 newval = base * value +
i;
176 static int get_char(
char c,
int base)
178 #ifndef NO_RANGE_TEST 180 if(c <= '9' && c >=
'0') {
183 else if(c <= 'Z' && c >=
'A') {
184 value = c -
'A' + 10;
186 else if(c <= 'z' && c >=
'a') {
187 value = c -
'a' + 10;
193 cp = memchr(valchars, c, 10 + 26 + 26);
198 value = cp - valchars;
222 while(str && *str &&
ISSPACE(*str))
CURLofft curlx_strtoofft(const char *str, char **endp, int base, curl_off_t *num)
CURL_TYPEOF_CURL_OFF_T curl_off_t
UNITTEST_START int * value