aboutsummaryrefslogtreecommitdiffstats
path: root/src/character.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/character.c')
-rw-r--r--src/character.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/character.c b/src/character.c
index a80e6f8de02..708eb2f7024 100644
--- a/src/character.c
+++ b/src/character.c
@@ -1082,26 +1082,21 @@ confusable_symbol_character_p (int ch)
1082 } 1082 }
1083} 1083}
1084 1084
1085signed char HEXDIGIT_CONST hexdigit[UCHAR_MAX + 1] = 1085/* hexdigit[C] is one greater than C's numeric value if C is a
1086 hexadecimal digit, zero otherwise. */
1087signed char const hexdigit[UCHAR_MAX + 1] =
1086 { 1088 {
1087#if HEXDIGIT_IS_CONST 1089 ['0'] = 1 + 0, ['1'] = 1 + 1, ['2'] = 1 + 2, ['3'] = 1 + 3, ['4'] = 1 + 4,
1088 [0 ... UCHAR_MAX] = -1, 1090 ['5'] = 1 + 5, ['6'] = 1 + 6, ['7'] = 1 + 7, ['8'] = 1 + 8, ['9'] = 1 + 9,
1089#endif 1091 ['A'] = 1 + 10, ['B'] = 1 + 11, ['C'] = 1 + 12,
1090 ['0'] = 0, ['1'] = 1, ['2'] = 2, ['3'] = 3, ['4'] = 4, 1092 ['D'] = 1 + 13, ['E'] = 1 + 14, ['F'] = 1 + 15,
1091 ['5'] = 5, ['6'] = 6, ['7'] = 7, ['8'] = 8, ['9'] = 9, 1093 ['a'] = 1 + 10, ['b'] = 1 + 11, ['c'] = 1 + 12,
1092 ['A'] = 10, ['B'] = 11, ['C'] = 12, ['D'] = 13, ['E'] = 14, ['F'] = 15, 1094 ['d'] = 1 + 13, ['e'] = 1 + 14, ['f'] = 1 + 15
1093 ['a'] = 10, ['b'] = 11, ['c'] = 12, ['d'] = 13, ['e'] = 14, ['f'] = 15
1094 }; 1095 };
1095 1096
1096void 1097void
1097syms_of_character (void) 1098syms_of_character (void)
1098{ 1099{
1099#if !HEXDIGIT_IS_CONST
1100 /* Set the non-hex digit values to -1. */
1101 for (int i = 0; i <= UCHAR_MAX; i++)
1102 hexdigit[i] -= i != '0' && !hexdigit[i];
1103#endif
1104
1105 DEFSYM (Qcharacterp, "characterp"); 1100 DEFSYM (Qcharacterp, "characterp");
1106 DEFSYM (Qauto_fill_chars, "auto-fill-chars"); 1101 DEFSYM (Qauto_fill_chars, "auto-fill-chars");
1107 1102