diff options
author | Jim Meyering <jim@meyering.net> | 1992-12-08 02:13:58 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1992-12-08 02:13:58 +0000 |
commit | b55706236dfb8b5bbe845869adf7aa8eadadc3d8 (patch) | |
tree | 288e2f9346c27b13fc007ea25dc291f155cfb517 | |
parent | ffd97483cdc0d57fccc91fae0c7f4463c143c087 (diff) | |
download | coreutils-b55706236dfb8b5bbe845869adf7aa8eadadc3d8.tar.xz |
Define ISLOWER and ISUPPER independent of STDC_HEADERS.
Define ISDIGIT and use it instead of isdigit.
-rw-r--r-- | src/dd.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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++; |