]> diplodocus.org Git - nmh/blobdiff - sbr/m_atoi.c
Dynamically allocate space for the output of fmt_scan(), using
[nmh] / sbr / m_atoi.c
index b1b5133dfc11cac6c8473308f61cc1f21e7fe9e0..da6730df5c5447615855755b54e257b43dac9a2d 100644 (file)
@@ -4,7 +4,9 @@
  *          -- 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 <h/mh.h>
@@ -17,11 +19,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;