]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Define ISLOWER and ISUPPER independent of STDC_HEADERS.
authorJim Meyering <jim@meyering.net>
Tue, 8 Dec 1992 02:13:58 +0000 (02:13 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 8 Dec 1992 02:13:58 +0000 (02:13 +0000)
Define ISDIGIT and use it instead of isdigit.

src/dd.c

index 01f9009fd24b91507bb1e66988f98ed7ac7da574..ba8d15e571ae820e94ac307fed3aa83dfbd8357d 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
 
 #include <stdio.h>
 #include <ctype.h>
-#ifdef STDC_HEADERS
-#define ISLOWER islower
-#define ISUPPER isupper
-#else
-#define ISLOWER(c) (isascii ((c)) && islower ((c)))
-#define ISUPPER(c) (isascii ((c)) && isupper ((c)))
+
+#ifndef isascii
+#define isascii(c) 1
 #endif
+
+#define ISLOWER(c) (isascii (c) && islower (c))
+#define ISUPPER(c) (isascii (c) && isupper (c))
+#define ISDIGIT(c) (isascii (c) && isdigit (c))
+
 #include <sys/types.h>
 #include <signal.h>
 #include "system.h"
@@ -839,7 +841,7 @@ parse_integer (str)
   register int temp;
   register char *p = str;
 
-  while (isdigit (*p))
+  while (ISDIGIT (*p))
     {
       n = n * 10 + *p - '0';
       p++;