summaryrefslogtreecommitdiff
path: root/src/euc_jp_prop.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-09-07 13:43:11 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-09-07 13:43:11 +0200
commit66dfd6613394a8903701840bbc9d67de537e597e (patch)
tree3b0943539a09fe5322b0b984222abb7c60ddfacb /src/euc_jp_prop.c
parent6bf91b141b7b3e3524f422d4c18bccf7f87aecd1 (diff)
parent52796af94a055f1c704a604f4eac567242c845b7 (diff)
Merge branch 'release/debian/6.9.0-1'debian/6.9.0-1
Diffstat (limited to 'src/euc_jp_prop.c')
-rw-r--r--src/euc_jp_prop.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/euc_jp_prop.c b/src/euc_jp_prop.c
index 8436fa2..3f84aef 100644
--- a/src/euc_jp_prop.c
+++ b/src/euc_jp_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 euc_jp_lookup_property_name --output-file euc_jp_prop.c euc_jp_prop.gperf */
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: /usr/bin/gperf -pt -T -L ANSI-C -N onigenc_euc_jp_lookup_property_name --output-file gperf1.tmp euc_jp_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 <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 "euc_jp_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 *
-euc_jp_lookup_property_name (register const char *str, register unsigned int len)
+onigenc_euc_jp_lookup_property_name (register const char *str, register size_t len)
{
static struct PropertyNameCtype wordlist[] =
{
@@ -144,9 +138,9 @@ euc_jp_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;