diff options
Diffstat (limited to 'src/starter/keywords.c')
-rw-r--r-- | src/starter/keywords.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/starter/keywords.c b/src/starter/keywords.c index a8f50169a..f4da67e8a 100644 --- a/src/starter/keywords.c +++ b/src/starter/keywords.c @@ -1,4 +1,4 @@ -/* C code produced by gperf version 3.0.4 */ +/* ANSI-C code produced by gperf version 3.1 */ /* Command-line: /usr/bin/gperf -m 10 -C -G -D -t */ /* Computed positions: -k'2-3,6,$' */ @@ -26,7 +26,7 @@ && ('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 @@ -70,9 +70,7 @@ inline #endif #endif static unsigned int -hash (str, len) - register const char *str; - register unsigned int len; +hash (register const char *str, register size_t len) { static const unsigned short asso_values[] = { @@ -103,7 +101,7 @@ hash (str, len) 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258 }; - register int hval = len; + register unsigned int hval = len; switch (hval) { @@ -296,22 +294,14 @@ static const short lookup[] = 138, -1, -1, -1, -1, -1, -1, 139 }; -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif const struct kw_entry * -in_word_set (str, len) - register const char *str; - register unsigned int len; +in_word_set (register const char *str, register size_t len) { if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - register int key = hash (str, len); + register unsigned int key = hash (str, len); - if (key <= MAX_HASH_VALUE && key >= 0) + if (key <= MAX_HASH_VALUE) { register int index = lookup[key]; |