ReactOS 0.4.15-dev-7098-ge0c17c3
atoi64.c File Reference
#include <precomp.h>
Include dependency graph for atoi64.c:

Go to the source code of this file.

Functions

__int64 CDECL _atoi64 (const char *nptr)
 

Function Documentation

◆ _atoi64()

__int64 CDECL _atoi64 ( const char nptr)

Definition at line 18 of file atoi64.c.

19{
20 char *s = (char *)nptr;
21 __int64 acc = 0;
22 int neg = 0;
23
24 if (nptr == NULL)
25 return 0;
26
27 while(isspace((int)*s))
28 s++;
29 if (*s == '-')
30 {
31 neg = 1;
32 s++;
33 }
34 else if (*s == '+')
35 s++;
36
37 while (isdigit((int)*s))
38 {
39 acc = 10 * acc + ((int)*s - '0');
40 s++;
41 }
42
43 if (neg)
44 acc *= -1;
45 return acc;
46}
#define isspace(c)
Definition: acclib.h:69
#define isdigit(c)
Definition: acclib.h:68
#define __int64
Definition: basetyps.h:16
#define NULL
Definition: types.h:112
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLdouble s
Definition: gl.h:2039

Referenced by atol(), atoll(), CommandDumpSector(), IopStartRamdisk(), main(), and RamDiskInitialize().