]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - lib/sh/strtod.c
Imported from ../bash-2.05a.tar.gz.
[thirdparty/bash.git] / lib / sh / strtod.c
index fe0f09dcd74ede1abee5e11b7f64c7516bfb0b3f..cc3bec9663789d6425081377e07787ee88eb15ef 100644 (file)
@@ -25,7 +25,7 @@
 extern int errno;
 #endif
 
-#include <ctype.h>
+#include <chartypes.h>
 #include <math.h>
 
 #if HAVE_FLOAT_H
@@ -73,7 +73,7 @@ strtod (nptr, endptr)
   s = nptr;
 
   /* Eat whitespace.  */
-  while (isspace (*s))
+  while (ISSPACE ((unsigned char)*s))
     ++s;
 
   /* Get the sign.  */
@@ -87,7 +87,7 @@ strtod (nptr, endptr)
   exponent = 0;
   for (;; ++s)
     {
-      if (isdigit (*s))
+      if (DIGIT (*s))
        {
          got_digit = 1;
 
@@ -120,7 +120,7 @@ strtod (nptr, endptr)
   if (!got_digit)
     goto noconv;
 
-  if (tolower (*s) == 'e')
+  if (TOLOWER ((unsigned char)*s) == 'e')
     {
       /* Get the exponent specified after the `e' or `E'.  */
       int save = errno;