diff options
author | Jim Meyering <jim@meyering.net> | 1992-12-07 05:28:23 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1992-12-07 05:28:23 +0000 |
commit | 6afc161556e0e429ebc739a373fc02f33618fdb0 (patch) | |
tree | 671803c872540cc4823fdd60c23d91e1a7c4a512 | |
parent | 7c4931fcee154bf117d4fe6cde9cb0f4468fcae4 (diff) | |
download | coreutils-6afc161556e0e429ebc739a373fc02f33618fdb0.tar.xz |
(toarith): Change single use of isdigit to ISDIGIT.
-rw-r--r-- | src/expr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index 3dd913632..e5f294122 100644 --- a/src/expr.c +++ b/src/expr.c @@ -34,6 +34,12 @@ #include <regex.h> #include "system.h" +#ifndef isascii +#define isascii(c) 1 +#endif + +#define ISDIGIT(c) (isascii (c) && isdigit (c)) + #if !__STDC__ #define const #endif @@ -236,7 +242,7 @@ toarith (v) cp++; for (; *cp; cp++) { - if (isdigit (*cp)) + if (ISDIGIT (*cp)) i = i * 10 + *cp - '0'; else return 0; |