Mercurial > emacs
changeset 9871:e91d69642eab
Don't include ctype.h.
(isfloat_string, read1): Don't use isdigit.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 09 Nov 1994 20:51:58 +0000 |
parents | 5b91dec229a3 |
children | 3f52395fcef9 |
files | src/lread.c |
diffstat | 1 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lread.c Wed Nov 09 20:18:34 1994 +0000 +++ b/src/lread.c Wed Nov 09 20:51:58 1994 +0000 @@ -24,7 +24,6 @@ #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 @@ 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 @@ 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 @@ 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