ReactOS 0.4.15-dev-8119-g4fb2fdb
atoi64.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/sdk/crt/string/atoi64.c
5 * PURPOSE: Unknown
6 * PROGRAMER: Unknown
7 * UPDATE HISTORY:
8 * 25/11/05: Added license header
9 */
10
11#include <precomp.h>
12
13/*
14 * @implemented
15 */
18_atoi64(const char *nptr)
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
__int64 CDECL _atoi64(const char *nptr)
Definition: atoi64.c:18
#define __int64
Definition: basetyps.h:16
#define NULL
Definition: types.h:112
#define CDECL
Definition: compat.h:29
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLdouble s
Definition: gl.h:2039