mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 10:33:15 +00:00
36 lines
518 B
C
36 lines
518 B
C
#include <string.h>
|
|
#include <ctype.h>
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
__int64
|
|
_atoi64 (const char *nptr)
|
|
{
|
|
int c;
|
|
__int64 value;
|
|
int sign;
|
|
|
|
while (isspace((int)*nptr))
|
|
++nptr;
|
|
|
|
c = (int)*nptr++;
|
|
sign = c;
|
|
if (c == '-' || c == '+')
|
|
c = (int)*nptr++;
|
|
|
|
value = 0;
|
|
|
|
while (isdigit(c))
|
|
{
|
|
value = 10 * value + (c - '0');
|
|
c = (int)*nptr++;
|
|
}
|
|
|
|
if (sign == '-')
|
|
return -value;
|
|
else
|
|
return value;
|
|
}
|
|
|
|
/* EOF */
|