aboutsummaryrefslogtreecommitdiffstats
path: root/src/character.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/character.h')
-rw-r--r--src/character.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/character.h b/src/character.h
index cc57a2a7d5c..230fc6eab59 100644
--- a/src/character.h
+++ b/src/character.h
@@ -704,14 +704,7 @@ char_table_translate (Lisp_Object obj, int ch)
704 return CHARACTERP (obj) ? XFIXNUM (obj) : ch; 704 return CHARACTERP (obj) ? XFIXNUM (obj) : ch;
705} 705}
706 706
707#if defined __GNUC__ && !defined __STRICT_ANSI__ 707extern signed char const hexdigit[];
708# define HEXDIGIT_CONST const
709# define HEXDIGIT_IS_CONST true
710#else
711# define HEXDIGIT_CONST
712# define HEXDIGIT_IS_CONST false
713#endif
714extern signed char HEXDIGIT_CONST hexdigit[];
715 708
716/* If C is a hexadecimal digit ('0'-'9', 'a'-'f', 'A'-'F'), return its 709/* If C is a hexadecimal digit ('0'-'9', 'a'-'f', 'A'-'F'), return its
717 value (0-15). Otherwise return -1. */ 710 value (0-15). Otherwise return -1. */
@@ -719,7 +712,7 @@ extern signed char HEXDIGIT_CONST hexdigit[];
719INLINE int 712INLINE int
720char_hexdigit (int c) 713char_hexdigit (int c)
721{ 714{
722 return 0 <= c && c <= UCHAR_MAX ? hexdigit[c] : -1; 715 return 0 <= c && c <= UCHAR_MAX ? hexdigit[c] - 1 : -1;
723} 716}
724 717
725INLINE_HEADER_END 718INLINE_HEADER_END