xkbcomp/keywords: regenerate with newer gperf Signed-off-by: Ran Benita <ran@unusedvar.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
diff --git a/src/xkbcomp/keywords.c b/src/xkbcomp/keywords.c
index 3eec5ed..c8a48f1 100644
--- a/src/xkbcomp/keywords.c
+++ b/src/xkbcomp/keywords.c
@@ -1,5 +1,5 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
-/* Command-line: gperf */
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf src/xkbcomp/keywords.gperf */
/* Computed positions: -k'1-2,5' */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -26,19 +26,19 @@
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
-#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
+#line 1 "src/xkbcomp/keywords.gperf"
+
#include "config.h"
#include "xkbcomp-priv.h"
#include "parser-priv.h"
-static unsigned int
-keyword_gperf_hash(const char *str, unsigned int len);
-
static const struct keyword_tok *
-keyword_gperf_lookup(const char *str, unsigned int len);
+keyword_gperf_lookup (register const char *str, register size_t len);
+#line 11 "src/xkbcomp/keywords.gperf"
struct keyword_tok { int name; int tok; };
#include <string.h>
/* maximum key range = 70, duplicates = 0 */
@@ -92,7 +92,7 @@ inline
#endif
#endif
static unsigned int
-keyword_gperf_hash (register const char *str, register unsigned int len)
+keyword_gperf_hash (register const char *str, register size_t len)
{
static const unsigned char asso_values[] =
{
@@ -123,7 +123,7 @@ keyword_gperf_hash (register const char *str, register unsigned int len)
73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73
};
- register int hval = len;
+ register unsigned int hval = len;
switch (hval)
{
@@ -239,14 +239,8 @@ static const struct stringpool_t stringpool_contents =
"partial"
};
#define stringpool ((const char *) &stringpool_contents)
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const struct keyword_tok *
-keyword_gperf_lookup (register const char *str, register unsigned int len)
+keyword_gperf_lookup (register const char *str, register size_t len)
{
enum
{
@@ -260,70 +254,115 @@ keyword_gperf_lookup (register const char *str, register unsigned int len)
static const struct keyword_tok wordlist[] =
{
{-1}, {-1}, {-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str3, KEY},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str4, KEYS},
+#line 37 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str3, KEY},
+#line 38 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str4, KEYS},
{-1}, {-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str7, AUGMENT},
+#line 28 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7, AUGMENT},
{-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str9, TEXT},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str10, XKB_KEYMAP},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str11, KEYPAD_KEYS},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str12, XKB_KEYCODES},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str13, XKB_GEOMETRY},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str14, XKB_TYPES},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str15, XKB_COMPATMAP},
+#line 53 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9, TEXT},
+#line 63 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, XKB_KEYMAP},
+#line 36 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, KEYPAD_KEYS},
+#line 62 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, XKB_KEYCODES},
+#line 61 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, XKB_GEOMETRY},
+#line 67 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, XKB_TYPES},
+#line 60 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, XKB_COMPATMAP},
{-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str17, REPLACE},
+#line 48 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, REPLACE},
{-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str19, XKB_COMPATMAP},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str20, XKB_LAYOUT},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str21, XKB_SYMBOLS},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str22, XKB_COMPATMAP},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str23, XKB_SEMANTICS},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str24, TYPE},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str25, ALIAS},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str26, XKB_COMPATMAP},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str27, ALPHANUMERIC_KEYS},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str28, FUNCTION_KEYS},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str29, ALTERNATE},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str30, SHAPE},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str31, ACTION_TOK},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str32, SECTION},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str33, ROW},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str34, LOGO},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str35, ALTERNATE_GROUP},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str36, HIDDEN},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str37, VIRTUAL},
+#line 59 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, XKB_COMPATMAP},
+#line 64 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, XKB_LAYOUT},
+#line 66 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, XKB_SYMBOLS},
+#line 58 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, XKB_COMPATMAP},
+#line 65 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, XKB_SEMANTICS},
+#line 54 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24, TYPE},
+#line 24 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25, ALIAS},
+#line 57 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26, XKB_COMPATMAP},
+#line 25 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str27, ALPHANUMERIC_KEYS},
+#line 30 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str28, FUNCTION_KEYS},
+#line 27 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29, ALTERNATE},
+#line 51 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30, SHAPE},
+#line 23 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31, ACTION_TOK},
+#line 50 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str32, SECTION},
+#line 49 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33, ROW},
+#line 39 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34, LOGO},
+#line 26 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35, ALTERNATE_GROUP},
+#line 32 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36, HIDDEN},
+#line 56 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str37, VIRTUAL},
{-1}, {-1}, {-1}, {-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str42, OUTLINE},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str43, DEFAULT},
+#line 44 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str42, OUTLINE},
+#line 29 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str43, DEFAULT},
{-1}, {-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str46, MODIFIER_MAP},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str47, VIRTUAL_MODS},
+#line 43 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str46, MODIFIER_MAP},
+#line 55 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str47, VIRTUAL_MODS},
{-1}, {-1}, {-1}, {-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str52, OVERLAY},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str53, OVERRIDE},
+#line 45 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str52, OVERLAY},
+#line 46 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str53, OVERRIDE},
{-1}, {-1}, {-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str57, INCLUDE},
+#line 33 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str57, INCLUDE},
{-1}, {-1}, {-1}, {-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str62, MODIFIER_MAP},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str63, MODIFIER_KEYS},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str64, INDICATOR},
+#line 41 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str62, MODIFIER_MAP},
+#line 40 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str63, MODIFIER_KEYS},
+#line 34 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str64, INDICATOR},
{-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str66, GROUP},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str67, MODIFIER_MAP},
+#line 31 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str66, GROUP},
+#line 42 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str67, MODIFIER_MAP},
{-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str69, INTERPRET},
+#line 35 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str69, INTERPRET},
{-1},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str71, SOLID},
- {(int)(long)&((struct stringpool_t *)0)->stringpool_str72, PARTIAL}
+#line 52 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str71, SOLID},
+#line 47 "src/xkbcomp/keywords.gperf"
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str72, PARTIAL}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = keyword_gperf_hash (str, len);
+ register unsigned int key = keyword_gperf_hash (str, len);
- if (key <= MAX_HASH_VALUE && key >= 0)
+ if (key <= MAX_HASH_VALUE)
{
register int o = wordlist[key].name;
if (o >= 0)
@@ -337,10 +376,11 @@ keyword_gperf_lookup (register const char *str, register unsigned int len)
}
return 0;
}
+#line 68 "src/xkbcomp/keywords.gperf"
int
-keyword_to_token(const char *string, unsigned int len)
+keyword_to_token(const char *string, size_t len)
{
const struct keyword_tok *kt = keyword_gperf_lookup(string, len);
if (!kt)
diff --git a/src/xkbcomp/keywords.gperf b/src/xkbcomp/keywords.gperf
index 5c64144..dc6a13c 100644
--- a/src/xkbcomp/keywords.gperf
+++ b/src/xkbcomp/keywords.gperf
@@ -1,12 +1,11 @@
%{
+#include "config.h"
+
#include "xkbcomp-priv.h"
#include "parser-priv.h"
-static unsigned int
-keyword_gperf_hash(const char *str, unsigned int len);
-
static const struct keyword_tok *
-keyword_gperf_lookup(const char *str, unsigned int len);
+keyword_gperf_lookup (register const char *str, register size_t len);
%}
struct keyword_tok { int name; int tok; };
@@ -69,7 +68,7 @@ xkb_types, XKB_TYPES
%%
int
-keyword_to_token(const char *string, unsigned int len)
+keyword_to_token(const char *string, size_t len)
{
const struct keyword_tok *kt = keyword_gperf_lookup(string, len);
if (!kt)
diff --git a/src/xkbcomp/parser-priv.h b/src/xkbcomp/parser-priv.h
index 76b5047..f10351a 100644
--- a/src/xkbcomp/parser-priv.h
+++ b/src/xkbcomp/parser-priv.h
@@ -39,6 +39,6 @@ XkbFile *
parse(struct xkb_context *ctx, struct scanner *scanner, const char *map);
int
-keyword_to_token(const char *string, unsigned int len);
+keyword_to_token(const char *string, size_t len);
#endif