summaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1992-12-07 05:28:23 +0000
committerJim Meyering <jim@meyering.net>1992-12-07 05:28:23 +0000
commit6afc161556e0e429ebc739a373fc02f33618fdb0 (patch)
tree671803c872540cc4823fdd60c23d91e1a7c4a512 /src/expr.c
parent7c4931fcee154bf117d4fe6cde9cb0f4468fcae4 (diff)
downloadcoreutils-6afc161556e0e429ebc739a373fc02f33618fdb0.tar.xz
(toarith): Change single use of isdigit to ISDIGIT.
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c8
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;