X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1691e80890e5d8ba258c51c214a3e91880e1db2b..39ecf70bb:/sbr/m_atoi.c?ds=inline diff --git a/sbr/m_atoi.c b/sbr/m_atoi.c index b1b5133d..87a78283 100644 --- a/sbr/m_atoi.c +++ b/sbr/m_atoi.c @@ -1,10 +1,10 @@ - -/* - * m_atoi.c -- Parse a string representation of a message number, and +/* 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. */ #include @@ -17,11 +17,7 @@ m_atoi (char *str) char *cp; for (i = 0, cp = str; *cp; cp++) { -#ifdef LOCALE - if (!isdigit(*cp)) -#else - if (*cp < '0' || *cp > '9') -#endif + if (!isdigit((unsigned char) *cp)) return 0; i *= 10;