ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

atoi64.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 doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.