diff options
Diffstat (limited to 'src/expr.c')
-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; |