diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-11-09 20:51:58 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-11-09 20:51:58 +0000 |
commit | c56501369d0acbfbf50251e1b31902da61e8861d (patch) | |
tree | 5358e6bdd8211b66156cc8900a231954efe8beb8 /src/lread.c | |
parent | 9978864f0a57a4c0488c45d8a67a441d9e825a80 (diff) | |
download | emacs-c56501369d0acbfbf50251e1b31902da61e8861d.tar.gz |
Don't include ctype.h.
(isfloat_string, read1): Don't use isdigit.
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/lread.c b/src/lread.c index 434a0f4693e..da12f267189 100644 --- a/src/lread.c +++ b/src/lread.c @@ -24,7 +24,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <sys/types.h> #include <sys/stat.h> #include <sys/file.h> -#include <ctype.h> #include <errno.h> #include "lisp.h" @@ -1266,7 +1265,7 @@ read1 (readcharfun, pch) int next_char = READCHAR; UNREAD (next_char); - if (! isdigit (next_char)) + if (! (next_char >= '0' && next_char <= '9')) #endif { *pch = c; @@ -1379,21 +1378,21 @@ isfloat_string (cp) if (*cp == '+' || *cp == '-') cp++; - if (isdigit(*cp)) + if (*cp >= '0' && *cp <= '9') { state |= LEAD_INT; - while (isdigit (*cp)) - cp ++; + while (*cp >= '0' && *cp <= '9') + cp++; } if (*cp == '.') { state |= DOT_CHAR; cp++; } - if (isdigit(*cp)) + if (*cp >= '0' && *cp <= '9') { state |= TRAIL_INT; - while (isdigit (*cp)) + while (*cp >= '0' && *cp <= '9') cp++; } if (*cp == 'e') @@ -1404,10 +1403,10 @@ isfloat_string (cp) if ((*cp == '+') || (*cp == '-')) cp++; - if (isdigit (*cp)) + if (*cp >= '0' && *cp <= '9') { state |= EXP_INT; - while (isdigit (*cp)) + while (*cp >= '0' && *cp <= '9') cp++; } return (*cp == 0 |