Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenatoi64.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS system libraries 00004 * FILE: lib/crt/?????? 00005 * PURPOSE: Unknown 00006 * PROGRAMER: Unknown 00007 * UPDATE HISTORY: 00008 * 25/11/05: Added license header 00009 */ 00010 00011 #include <precomp.h> 00012 00013 /* 00014 * @implemented 00015 */ 00016 __int64 00017 _atoi64(const char *nptr) 00018 { 00019 char *s = (char *)nptr; 00020 __int64 acc = 0; 00021 int neg = 0; 00022 00023 if (nptr == NULL) 00024 return 0; 00025 00026 while(isspace((int)*s)) 00027 s++; 00028 if (*s == '-') 00029 { 00030 neg = 1; 00031 s++; 00032 } 00033 else if (*s == '+') 00034 s++; 00035 00036 while (isdigit((int)*s)) 00037 { 00038 acc = 10 * acc + ((int)*s - '0'); 00039 s++; 00040 } 00041 00042 if (neg) 00043 acc *= -1; 00044 return acc; 00045 } Generated on Sat May 26 2012 04:35:35 for ReactOS by
1.7.6.1
|