summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1992-12-08 02:13:58 +0000
committerJim Meyering <jim@meyering.net>1992-12-08 02:13:58 +0000
commitb55706236dfb8b5bbe845869adf7aa8eadadc3d8 (patch)
tree288e2f9346c27b13fc007ea25dc291f155cfb517
parentffd97483cdc0d57fccc91fae0c7f4463c143c087 (diff)
downloadcoreutils-b55706236dfb8b5bbe845869adf7aa8eadadc3d8.tar.xz
Define ISLOWER and ISUPPER independent of STDC_HEADERS.
Define ISDIGIT and use it instead of isdigit.
-rw-r--r--src/dd.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/dd.c b/src/dd.c
index 01f9009fd..ba8d15e57 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -55,13 +55,15 @@
#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++;