diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2001-12-16 13:58:07 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2001-12-16 13:58:07 +0000 |
commit | faf318664d85a4bfcf278a4475904ec850b4efb7 (patch) | |
tree | 98edefa5013064e1fe081d29fa44021bb5888015 /gcc/real.c | |
parent | 15bc166fa03cdd7ab76c21ed2165b1f024042322 (diff) | |
download | gcc-faf318664d85a4bfcf278a4475904ec850b4efb7.zip gcc-faf318664d85a4bfcf278a4475904ec850b4efb7.tar.gz gcc-faf318664d85a4bfcf278a4475904ec850b4efb7.tar.bz2 |
c-lex.c (lex_number): Use ISXDIGIT/hex_value.
* c-lex.c (lex_number): Use ISXDIGIT/hex_value.
* vax/xm-vms.h (FILE_NAME_NONDIRECTORY): Use ISUPPER/TOLOWER.
* fold-const.c (real_hex_to_f): Use hex_value.
* real.c (asctoeg): Use hex_value & ISXDIGIT.
* toplev.c (toplev_main): Call hex_init.
* tradcpp.c (main): Call hex_init.
From-SVN: r48068
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -5190,12 +5190,7 @@ asctoeg (ss, y, oprec) trail = 0; nxtcom: - if (ISDIGIT (*s)) - k = *s - '0'; - else if (*s >= 'a' && *s <= 'f') - k = 10 + *s - 'a'; - else - k = 10 + *s - 'A'; + k = hex_value(*s); if ((k >= 0) && (k < base)) { /* Ignore leading zeros */ @@ -5205,9 +5200,7 @@ asctoeg (ss, y, oprec) if ((trail == 0) && (decflg != 0)) { sp = s; - while (ISDIGIT (*sp) - || (base == 16 && ((*sp >= 'a' && *sp <= 'f') - || (*sp >= 'A' && *sp <= 'F')))) + while (ISDIGIT (*sp) || (base == 16 && ISXDIGIT (*sp))) ++sp; /* Check for syntax error */ c = *sp & CHARMASK; |