X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fm_atoi.c;h=21606c40114d9b5c048e7063bde5b57767d8169e;hb=b067ff5c465a5d243ce5a19e562085a9a1a97215;hp=dffc799be2c543b7b652b64f446bd996083e1f2f;hpb=13f84dd50ca5754391dbd3296a5c7425f9363600;p=mmh diff --git a/sbr/m_atoi.c b/sbr/m_atoi.c index dffc799..21606c4 100644 --- a/sbr/m_atoi.c +++ b/sbr/m_atoi.c @@ -1,11 +1,8 @@ - /* * m_atoi.c -- Parse a string representation of a message number, and * -- return the numeric value of the message. If the string * -- contains any non-digit characters, then return 0. * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -17,20 +14,20 @@ int m_atoi (char *str) { - int i; - unsigned char *cp; + int i; + unsigned char *cp; - for (i = 0, cp = str; *cp; cp++) { + for (i = 0, cp = str; *cp; cp++) { #ifdef LOCALE - if (!isdigit(*cp)) + if (!isdigit(*cp)) #else - if (*cp < '0' || *cp > '9') + if (*cp < '0' || *cp > '9') #endif - return 0; + return 0; - i *= 10; - i += (*cp - '0'); - } + i *= 10; + i += (*cp - '0'); + } - return i; + return i; }