From c9b3c26db59d89e320a6eb86d9558051ecba0900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 5 Sep 2018 22:06:58 +0200 Subject: New upstream version 6.9.0 --- src/sjis_prop.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'src/sjis_prop.c') diff --git a/src/sjis_prop.c b/src/sjis_prop.c index 83a7b45..0d0c68f 100644 --- a/src/sjis_prop.c +++ b/src/sjis_prop.c @@ -1,5 +1,5 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf -pt -T -L ANSI-C -N sjis_lookup_property_name --output-file sjis_prop.c sjis_prop.gperf */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: /usr/bin/gperf -pt -T -L ANSI-C -N onigenc_sjis_lookup_property_name --output-file gperf2.tmp sjis_prop.gperf */ /* Computed positions: -k'1,3' */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ @@ -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 ." +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." #endif #line 1 "sjis_prop.gperf" @@ -49,7 +49,7 @@ inline #endif #endif static unsigned int -hash (register const char *str, register unsigned int len) +hash (register const char *str, register size_t len) { static unsigned char asso_values[] = { @@ -80,17 +80,11 @@ hash (register const char *str, register unsigned int len) 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56 }; - return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; + return (unsigned int )len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; } -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif struct PropertyNameCtype * -sjis_lookup_property_name (register const char *str, register unsigned int len) +onigenc_sjis_lookup_property_name (register const char *str, register size_t len) { static struct PropertyNameCtype wordlist[] = { @@ -144,9 +138,9 @@ sjis_lookup_property_name (register const char *str, register unsigned int 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 const char *s = wordlist[key].name; -- cgit v1.2.3