From: K.Kosako Date: Tue, 21 Aug 2018 09:30:10 +0000 (+0900) Subject: update generated source files by gperf 3.1 X-Git-Tag: v6.9.0~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b8462501c09a0858ef3eabc24250c9e32152046;p=onig update generated source files by gperf 3.1 --- diff --git a/src/unicode_fold1_key.c b/src/unicode_fold1_key.c index ffaa661..7e47c2a 100644 --- a/src/unicode_fold1_key.c +++ b/src/unicode_fold1_key.c @@ -1,7 +1,7 @@ /* This file was converted by gperf_fold_key_conv.py from gperf output file. */ -/* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N unicode_fold1_key unicode_fold1_key.gperf */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: /usr/bin/gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N unicode_fold1_key unicode_fold1_key.gperf */ /* Computed positions: -k'1-3' */ @@ -60,12 +60,6 @@ hash(OnigCodePoint codes[]) return asso_values[(unsigned char)onig_codes_byte_at(codes, 2)+3] + asso_values[(unsigned char)onig_codes_byte_at(codes, 1)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 0)]; } -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif int unicode_fold1_key(OnigCodePoint codes[]) { @@ -2540,7 +2534,7 @@ unicode_fold1_key(OnigCodePoint codes[]) { int key = hash(codes); - if (key <= MAX_HASH_VALUE && key >= 0) + if (key <= MAX_HASH_VALUE) { int index = wordlist[key]; diff --git a/src/unicode_fold2_key.c b/src/unicode_fold2_key.c index 8a45c9d..391a371 100644 --- a/src/unicode_fold2_key.c +++ b/src/unicode_fold2_key.c @@ -1,7 +1,7 @@ /* This file was converted by gperf_fold_key_conv.py from gperf output file. */ -/* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N unicode_fold2_key unicode_fold2_key.gperf */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: /usr/bin/gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N unicode_fold2_key unicode_fold2_key.gperf */ /* Computed positions: -k'3,6' */ @@ -60,12 +60,6 @@ hash(OnigCodePoint codes[]) return asso_values[(unsigned char)onig_codes_byte_at(codes, 5)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 2)]; } -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif int unicode_fold2_key(OnigCodePoint codes[]) { @@ -195,7 +189,7 @@ unicode_fold2_key(OnigCodePoint codes[]) { int key = hash(codes); - if (key <= MAX_HASH_VALUE && key >= 0) + if (key <= MAX_HASH_VALUE) { int index = wordlist[key]; diff --git a/src/unicode_fold3_key.c b/src/unicode_fold3_key.c index deb9d22..d593cd5 100644 --- a/src/unicode_fold3_key.c +++ b/src/unicode_fold3_key.c @@ -1,7 +1,7 @@ /* This file was converted by gperf_fold_key_conv.py from gperf output file. */ -/* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N unicode_fold3_key unicode_fold3_key.gperf */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: /usr/bin/gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N unicode_fold3_key unicode_fold3_key.gperf */ /* Computed positions: -k'3,6,9' */ @@ -60,12 +60,6 @@ hash(OnigCodePoint codes[]) return asso_values[(unsigned char)onig_codes_byte_at(codes, 8)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 5)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 2)]; } -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif int unicode_fold3_key(OnigCodePoint codes[]) { @@ -105,7 +99,7 @@ unicode_fold3_key(OnigCodePoint codes[]) { int key = hash(codes); - if (key <= MAX_HASH_VALUE && key >= 0) + if (key <= MAX_HASH_VALUE) { int index = wordlist[key]; diff --git a/src/unicode_property_data.c b/src/unicode_property_data.c index b25392b..0fb2df1 100644 --- a/src/unicode_property_data.c +++ b/src/unicode_property_data.c @@ -1,5 +1,5 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf -T -C -c -t -j1 -L ANSI-C --ignore-case --pic -Q unicode_prop_name_pool -N unicode_lookup_property_name --output-file gperf.tmp unicode_property_data.gperf */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: /usr/bin/gperf -T -C -c -t -j1 -L ANSI-C --ignore-case --pic -Q unicode_prop_name_pool -N unicode_lookup_property_name --output-file gperf1.tmp unicode_property_data.gperf */ /* Computed positions: -k'1-3,5-6,12,16,$' */ #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 @@ -22947,7 +22947,7 @@ static unsigned char gperf_downcase[256] = #ifndef GPERF_CASE_STRNCMP #define GPERF_CASE_STRNCMP 1 static int -gperf_case_strncmp (register const char *s1, register const char *s2, register unsigned int n) +gperf_case_strncmp (register const char *s1, register const char *s2, register size_t n) { for (; n > 0;) { @@ -22972,7 +22972,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 const unsigned short asso_values[] = { @@ -23003,7 +23003,7 @@ hash (register const char *str, register unsigned int len) 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163 }; - register int hval = len; + register unsigned int hval = len; switch (hval) { @@ -24470,14 +24470,8 @@ static const struct unicode_prop_name_pool_t unicode_prop_name_pool_contents = "graphemelink" }; #define unicode_prop_name_pool ((const char *) &unicode_prop_name_pool_contents) -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif const struct PoolPropertyNameCtype * -unicode_lookup_property_name (register const char *str, register unsigned int len) +unicode_lookup_property_name (register const char *str, register size_t len) { static const struct PoolPropertyNameCtype wordlist[] = { @@ -26723,9 +26717,9 @@ unicode_lookup_property_name (register const char *str, register unsigned int le 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 o = wordlist[key].name; if (o >= 0) diff --git a/src/unicode_property_data_posix.c b/src/unicode_property_data_posix.c index fffe2ef..2b98bfb 100644 --- a/src/unicode_property_data_posix.c +++ b/src/unicode_property_data_posix.c @@ -1,5 +1,5 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf -T -C -c -t -j1 -L ANSI-C --ignore-case --pic -Q unicode_prop_name_pool -N unicode_lookup_property_name --output-file gperf.tmp unicode_property_data_posix.gperf */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: /usr/bin/gperf -T -C -c -t -j1 -L ANSI-C --ignore-case --pic -Q unicode_prop_name_pool -N unicode_lookup_property_name --output-file gperf2.tmp unicode_property_data_posix.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 @@ -4823,7 +4823,7 @@ static unsigned char gperf_downcase[256] = #ifndef GPERF_CASE_STRNCMP #define GPERF_CASE_STRNCMP 1 static int -gperf_case_strncmp (register const char *s1, register const char *s2, register unsigned int n) +gperf_case_strncmp (register const char *s1, register const char *s2, register size_t n) { for (; n > 0;) { @@ -4848,7 +4848,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 const unsigned char asso_values[] = { @@ -4919,14 +4919,8 @@ static const struct unicode_prop_name_pool_t unicode_prop_name_pool_contents = "blank" }; #define unicode_prop_name_pool ((const char *) &unicode_prop_name_pool_contents) -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif const struct PoolPropertyNameCtype * -unicode_lookup_property_name (register const char *str, register unsigned int len) +unicode_lookup_property_name (register const char *str, register size_t len) { static const struct PoolPropertyNameCtype wordlist[] = { @@ -4965,9 +4959,9 @@ unicode_lookup_property_name (register const char *str, register unsigned int le 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 o = wordlist[key].name; if (o >= 0) diff --git a/src/unicode_unfold_key.c b/src/unicode_unfold_key.c index 15302ca..fccc06b 100644 --- a/src/unicode_unfold_key.c +++ b/src/unicode_unfold_key.c @@ -1,7 +1,7 @@ /* This file was converted by gperf_unfold_key_conv.py from gperf output file. */ -/* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1,0 -N unicode_unfold_key unicode_unfold_key.gperf */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: /usr/bin/gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1,0 -N unicode_unfold_key unicode_unfold_key.gperf */ /* Computed positions: -k'1-3' */ @@ -64,12 +64,6 @@ hash(OnigCodePoint codes[]) return asso_values[(unsigned char)onig_codes_byte_at(codes, 2)+35] + asso_values[(unsigned char)onig_codes_byte_at(codes, 1)+1] + asso_values[(unsigned char)onig_codes_byte_at(codes, 0)]; } -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif const struct ByUnfoldKey * unicode_unfold_key(OnigCodePoint code) { @@ -2846,7 +2840,7 @@ unicode_unfold_key(OnigCodePoint code) { int key = hash(&code); - if (key <= MAX_HASH_VALUE && key >= 0) + if (key <= MAX_HASH_VALUE) { OnigCodePoint gcode = wordlist[key].code;