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/f/lex.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/f/lex.c')
-rw-r--r-- | gcc/f/lex.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gcc/f/lex.c b/gcc/f/lex.c index d0aa829..6169656 100644 --- a/gcc/f/lex.c +++ b/gcc/f/lex.c @@ -396,13 +396,7 @@ ffelex_backslash_ (int c, ffewhereColumnNumber col) case 2: if (ISXDIGIT (c)) { - code *= 16; - if (c >= 'a' && c <= 'f') - code += c - 'a' + 10; - if (c >= 'A' && c <= 'F') - code += c - 'A' + 10; - if (ISDIGIT (c)) - code += c - '0'; + code = (code * 16) + hex_value (c); if (code != 0 || count != 0) { if (count == 0) @@ -603,13 +597,7 @@ ffelex_cfebackslash_ (int *use_d, int *d, FILE *finput) *d = c; break; } - code *= 16; - if (c >= 'a' && c <= 'f') - code += c - 'a' + 10; - if (c >= 'A' && c <= 'F') - code += c - 'A' + 10; - if (ISDIGIT (c)) - code += c - '0'; + code = (code * 16) + hex_value (c); if (code != 0 || count != 0) { if (count == 0) |