aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-11-09 20:51:58 +0000
committerRichard M. Stallman <[email protected]>1994-11-09 20:51:58 +0000
commit075027b1957d83a708095ba2d984133fb998a8dc (patch)
tree2081c99f47957a35f46aacb70d88f0eb7cfc16ed
parentb7a1e68a4e8de82fc8095f0958b96c1aaf37d177 (diff)
Don't include ctype.h.
(isfloat_string, read1): Don't use isdigit.
-rw-r--r--src/lread.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/lread.c b/src/lread.c
index 434a0f4693..da12f26718 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