summaryrefslogtreecommitdiff
path: root/src/stroke/stroke_keywords.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stroke/stroke_keywords.c')
-rw-r--r--src/stroke/stroke_keywords.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/stroke/stroke_keywords.c b/src/stroke/stroke_keywords.c
index 17a3663fe..33d735164 100644
--- a/src/stroke/stroke_keywords.c
+++ b/src/stroke/stroke_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 -D -C -G -t */
/* Computed positions: -k'1,5,7' */
@@ -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
@@ -69,9 +69,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 char asso_values[] =
{
@@ -102,7 +100,7 @@ hash (str, len)
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60
};
- register int hval = len;
+ register unsigned int hval = len;
switch (hval)
{
@@ -175,7 +173,7 @@ static const struct stroke_token wordlist[] =
{"resetcounters", STROKE_COUNTERS_RESET}
};
-static const short lookup[] =
+static const signed char lookup[] =
{
-1, -1, -1, 0, 1, 2, -1, 3, -1, 4, -1, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
@@ -184,22 +182,14 @@ static const short lookup[] =
-1, 46, -1, 47
};
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const struct stroke_token *
-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];