Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 09604e7

Browse files
committed
Reflects gperf version upgrade (3.1 -> 3.2.1)
1 parent 0dba0a5 commit 09604e7

File tree

8 files changed

+77
-15
lines changed

8 files changed

+77
-15
lines changed

src/euc_jp_prop.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* ANSI-C code produced by gperf version 3.1 */
1+
/* ANSI-C code produced by gperf version 3.2.1 */
22
/* Command-line: gperf -pt -T -L ANSI-C -N onigenc_euc_jp_lookup_property_name --output-file gperf1.tmp euc_jp_prop.gperf */
33
/* Computed positions: -k'1,3' */
44

@@ -85,6 +85,10 @@ hash (register const char *str, register size_t len)
8585
struct PropertyNameCtype *
8686
onigenc_euc_jp_lookup_property_name (register const char *str, register size_t len)
8787
{
88+
#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
89+
#pragma GCC diagnostic push
90+
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
91+
#endif
8892
static struct PropertyNameCtype wordlist[] =
8993
{
9094
{""}, {""}, {""}, {""},
@@ -134,6 +138,9 @@ onigenc_euc_jp_lookup_property_name (register const char *str, register size_t l
134138
#line 14 "euc_jp_prop.gperf"
135139
{"Digit", 4}
136140
};
141+
#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
142+
#pragma GCC diagnostic pop
143+
#endif
137144

138145
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
139146
{
@@ -147,5 +154,5 @@ onigenc_euc_jp_lookup_property_name (register const char *str, register size_t l
147154
return &wordlist[key];
148155
}
149156
}
150-
return 0;
157+
return (struct PropertyNameCtype *) 0;
151158
}

src/sjis_prop.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* ANSI-C code produced by gperf version 3.1 */
1+
/* ANSI-C code produced by gperf version 3.2.1 */
22
/* Command-line: gperf -pt -T -L ANSI-C -N onigenc_sjis_lookup_property_name --output-file gperf2.tmp sjis_prop.gperf */
33
/* Computed positions: -k'1,3' */
44

@@ -85,6 +85,10 @@ hash (register const char *str, register size_t len)
8585
struct PropertyNameCtype *
8686
onigenc_sjis_lookup_property_name (register const char *str, register size_t len)
8787
{
88+
#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
89+
#pragma GCC diagnostic push
90+
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
91+
#endif
8892
static struct PropertyNameCtype wordlist[] =
8993
{
9094
{""}, {""}, {""}, {""},
@@ -134,6 +138,9 @@ onigenc_sjis_lookup_property_name (register const char *str, register size_t len
134138
#line 14 "sjis_prop.gperf"
135139
{"Digit", 4}
136140
};
141+
#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
142+
#pragma GCC diagnostic pop
143+
#endif
137144

138145
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
139146
{
@@ -147,5 +154,5 @@ onigenc_sjis_lookup_property_name (register const char *str, register size_t len
147154
return &wordlist[key];
148155
}
149156
}
150-
return 0;
157+
return (struct PropertyNameCtype *) 0;
151158
}

src/unicode_fold1_key.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* This file was converted by gperf_fold_key_conv.py
22
from gperf output file. */
3-
/* ANSI-C code produced by gperf version 3.1 */
3+
/* ANSI-C code produced by gperf version 3.2.1 */
44
/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold1_key unicode_fold1_key.gperf */
55
/* Computed positions: -k'1-3' */
66

@@ -82,6 +82,7 @@ hash(OnigCodePoint codes[])
8282
350, 1045, 333, 1359, 812, 354, 270, 407, 801, 99,
8383
565, 555, 1104, 128, 1097, 31, 1419, 130, 1414
8484
};
85+
8586
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)];
8687
}
8788

src/unicode_fold2_key.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* This file was converted by gperf_fold_key_conv.py
22
from gperf output file. */
3-
/* ANSI-C code produced by gperf version 3.1 */
3+
/* ANSI-C code produced by gperf version 3.2.1 */
44
/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold2_key unicode_fold2_key.gperf */
55
/* Computed positions: -k'3,6' */
66

@@ -82,6 +82,7 @@ hash(OnigCodePoint codes[])
8282
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
8383
59, 59, 59, 59, 59, 59
8484
};
85+
8586
return asso_values[(unsigned char)onig_codes_byte_at(codes, 5)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 2)];
8687
}
8788

src/unicode_fold3_key.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* This file was converted by gperf_fold_key_conv.py
22
from gperf output file. */
3-
/* ANSI-C code produced by gperf version 3.1 */
3+
/* ANSI-C code produced by gperf version 3.2.1 */
44
/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold3_key unicode_fold3_key.gperf */
55
/* Computed positions: -k'3,6,9' */
66

@@ -82,6 +82,7 @@ hash(OnigCodePoint codes[])
8282
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
8383
14, 14, 14, 14, 14, 14
8484
};
85+
8586
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)];
8687
}
8788

src/unicode_property_data.c

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* ANSI-C code produced by gperf version 3.1 */
1+
/* ANSI-C code produced by gperf version 3.2.1 */
22
/* 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 gperf1.tmp unicode_property_data.gperf */
33
/* Computed positions: -k'1-3,5-6,12,16,$' */
44

@@ -28260,7 +28260,7 @@ const CodeRanges[] = {
2826028260

2826128261
#ifndef GPERF_DOWNCASE
2826228262
#define GPERF_DOWNCASE 1
28263-
static unsigned char gperf_downcase[256] =
28263+
static const unsigned char gperf_downcase[256] =
2826428264
{
2826528265
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2826628266
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
@@ -28348,12 +28348,22 @@ hash (register const char *str, register size_t len)
2834828348
{
2834928349
default:
2835028350
hval += asso_values[(unsigned char)str[15]];
28351+
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
28352+
[[fallthrough]];
28353+
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
28354+
__attribute__ ((__fallthrough__));
28355+
#endif
2835128356
/*FALLTHROUGH*/
2835228357
case 15:
2835328358
case 14:
2835428359
case 13:
2835528360
case 12:
2835628361
hval += asso_values[(unsigned char)str[11]];
28362+
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
28363+
[[fallthrough]];
28364+
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
28365+
__attribute__ ((__fallthrough__));
28366+
#endif
2835728367
/*FALLTHROUGH*/
2835828368
case 11:
2835928369
case 10:
@@ -28362,16 +28372,36 @@ hash (register const char *str, register size_t len)
2836228372
case 7:
2836328373
case 6:
2836428374
hval += asso_values[(unsigned char)str[5]];
28375+
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
28376+
[[fallthrough]];
28377+
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
28378+
__attribute__ ((__fallthrough__));
28379+
#endif
2836528380
/*FALLTHROUGH*/
2836628381
case 5:
2836728382
hval += asso_values[(unsigned char)str[4]];
28383+
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
28384+
[[fallthrough]];
28385+
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
28386+
__attribute__ ((__fallthrough__));
28387+
#endif
2836828388
/*FALLTHROUGH*/
2836928389
case 4:
2837028390
case 3:
2837128391
hval += asso_values[(unsigned char)str[2]];
28392+
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
28393+
[[fallthrough]];
28394+
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
28395+
__attribute__ ((__fallthrough__));
28396+
#endif
2837228397
/*FALLTHROUGH*/
2837328398
case 2:
2837428399
hval += asso_values[(unsigned char)str[1]];
28400+
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
28401+
[[fallthrough]];
28402+
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
28403+
__attribute__ ((__fallthrough__));
28404+
#endif
2837528405
/*FALLTHROUGH*/
2837628406
case 1:
2837728407
hval += asso_values[(unsigned char)str[0]+2];
@@ -30162,6 +30192,10 @@ static const struct unicode_prop_name_pool_t unicode_prop_name_pool_contents =
3016230192
static const struct PoolPropertyNameCtype *
3016330193
unicode_lookup_property_name (register const char *str, register size_t len)
3016430194
{
30195+
#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
30196+
#pragma GCC diagnostic push
30197+
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
30198+
#endif
3016530199
static const struct PoolPropertyNameCtype wordlist[] =
3016630200
{
3016730201
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
@@ -33014,6 +33048,9 @@ unicode_lookup_property_name (register const char *str, register size_t len)
3301433048

3301533049
{pool_offset(6900), 101}
3301633050
};
33051+
#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
33052+
#pragma GCC diagnostic pop
33053+
#endif
3301733054

3301833055
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
3301933056
{
@@ -33031,7 +33068,7 @@ unicode_lookup_property_name (register const char *str, register size_t len)
3303133068
}
3303233069
}
3303333070
}
33034-
return 0;
33071+
return (struct PoolPropertyNameCtype *) 0;
3303533072
}
3303633073

3303733074

src/unicode_property_data_posix.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* ANSI-C code produced by gperf version 3.1 */
1+
/* ANSI-C code produced by gperf version 3.2.1 */
22
/* 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 gperf2.tmp unicode_property_data_posix.gperf */
33
/* Computed positions: -k'1,3' */
44

@@ -5767,7 +5767,7 @@ const CodeRanges[] = {
57675767

57685768
#ifndef GPERF_DOWNCASE
57695769
#define GPERF_DOWNCASE 1
5770-
static unsigned char gperf_downcase[256] =
5770+
static const unsigned char gperf_downcase[256] =
57715771
{
57725772
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
57735773
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
@@ -5892,6 +5892,10 @@ static const struct unicode_prop_name_pool_t unicode_prop_name_pool_contents =
58925892
static const struct PoolPropertyNameCtype *
58935893
unicode_lookup_property_name (register const char *str, register size_t len)
58945894
{
5895+
#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
5896+
#pragma GCC diagnostic push
5897+
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
5898+
#endif
58955899
static const struct PoolPropertyNameCtype wordlist[] =
58965900
{
58975901
{-1}, {-1}, {-1}, {-1}, {-1},
@@ -5926,6 +5930,9 @@ unicode_lookup_property_name (register const char *str, register size_t len)
59265930

59275931
{pool_offset(19), 2}
59285932
};
5933+
#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
5934+
#pragma GCC diagnostic pop
5935+
#endif
59295936

59305937
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
59315938
{
@@ -5943,7 +5950,7 @@ unicode_lookup_property_name (register const char *str, register size_t len)
59435950
}
59445951
}
59455952
}
5946-
return 0;
5953+
return (struct PoolPropertyNameCtype *) 0;
59475954
}
59485955

59495956

src/unicode_unfold_key.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* This file was converted by gperf_unfold_key_conv.py
22
from gperf output file. */
3-
/* ANSI-C code produced by gperf version 3.1 */
3+
/* ANSI-C code produced by gperf version 3.2.1 */
44
/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1,0 -N onigenc_unicode_unfold_key unicode_unfold_key.gperf */
55
/* Computed positions: -k'1-3' */
66

@@ -86,6 +86,7 @@ hash(OnigCodePoint codes[])
8686
46, 1627, 44, 1621, 207, 1443, 13, 1096, 17, 427,
8787
9
8888
};
89+
8990
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)];
9091
}
9192

@@ -3493,5 +3494,5 @@ onigenc_unicode_unfold_key(OnigCodePoint code)
34933494
return &wordlist[key];
34943495
}
34953496
}
3496-
return 0;
3497+
return (struct ByUnfoldKey *) 0;
34973498
}

0 commit comments

Comments
 (0)