aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-11-09 20:51:58 +0000
committerRichard M. Stallman1994-11-09 20:51:58 +0000
commit075027b1957d83a708095ba2d984133fb998a8dc (patch)
tree2081c99f47957a35f46aacb70d88f0eb7cfc16ed /src
parentb7a1e68a4e8de82fc8095f0958b96c1aaf37d177 (diff)
downloademacs-075027b1957d83a708095ba2d984133fb998a8dc.tar.gz
emacs-075027b1957d83a708095ba2d984133fb998a8dc.zip
Don't include ctype.h.
(isfloat_string, read1): Don't use isdigit.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c17
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. */
24#include <sys/types.h> 24#include <sys/types.h>
25#include <sys/stat.h> 25#include <sys/stat.h>
26#include <sys/file.h> 26#include <sys/file.h>
27#include <ctype.h>
28#include <errno.h> 27#include <errno.h>
29#include "lisp.h" 28#include "lisp.h"
30 29
@@ -1266,7 +1265,7 @@ read1 (readcharfun, pch)
1266 int next_char = READCHAR; 1265 int next_char = READCHAR;
1267 UNREAD (next_char); 1266 UNREAD (next_char);
1268 1267
1269 if (! isdigit (next_char)) 1268 if (! (next_char >= '0' && next_char <= '9'))
1270#endif 1269#endif
1271 { 1270 {
1272 *pch = c; 1271 *pch = c;
@@ -1379,21 +1378,21 @@ isfloat_string (cp)
1379 if (*cp == '+' || *cp == '-') 1378 if (*cp == '+' || *cp == '-')
1380 cp++; 1379 cp++;
1381 1380
1382 if (isdigit(*cp)) 1381 if (*cp >= '0' && *cp <= '9')
1383 { 1382 {
1384 state |= LEAD_INT; 1383 state |= LEAD_INT;
1385 while (isdigit (*cp)) 1384 while (*cp >= '0' && *cp <= '9')
1386 cp ++; 1385 cp++;
1387 } 1386 }
1388 if (*cp == '.') 1387 if (*cp == '.')
1389 { 1388 {
1390 state |= DOT_CHAR; 1389 state |= DOT_CHAR;
1391 cp++; 1390 cp++;
1392 } 1391 }
1393 if (isdigit(*cp)) 1392 if (*cp >= '0' && *cp <= '9')
1394 { 1393 {
1395 state |= TRAIL_INT; 1394 state |= TRAIL_INT;
1396 while (isdigit (*cp)) 1395 while (*cp >= '0' && *cp <= '9')
1397 cp++; 1396 cp++;
1398 } 1397 }
1399 if (*cp == 'e') 1398 if (*cp == 'e')
@@ -1404,10 +1403,10 @@ isfloat_string (cp)
1404 if ((*cp == '+') || (*cp == '-')) 1403 if ((*cp == '+') || (*cp == '-'))
1405 cp++; 1404 cp++;
1406 1405
1407 if (isdigit (*cp)) 1406 if (*cp >= '0' && *cp <= '9')
1408 { 1407 {
1409 state |= EXP_INT; 1408 state |= EXP_INT;
1410 while (isdigit (*cp)) 1409 while (*cp >= '0' && *cp <= '9')
1411 cp++; 1410 cp++;
1412 } 1411 }
1413 return (*cp == 0 1412 return (*cp == 0