Coverage Report

Created: 2024-09-19 07:08

/src/fluent-bit/lib/onigmo/enc/jis/props.h
Line
Count
Source (jump to first uncovered line)
1
/* ANSI-C code produced by gperf version 3.1 */
2
/* Command-line: gperf -k1,3 -7 -c -j1 -i1 -t -C -P -t --ignore-case -H onig_jis_property_hash -Q onig_jis_property_pool -N onig_jis_property enc/jis/props.kwd  */
3
4
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
5
      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
6
      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
7
      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
8
      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
9
      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
10
      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
11
      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
12
      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
13
      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
14
      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
15
      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
16
      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
17
      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
18
      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
19
      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
20
      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
21
      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
22
      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
23
      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
24
      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
25
      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
26
      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
27
/* The character set is not based on ISO-646.  */
28
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
29
#endif
30
31
#line 1 "enc/jis/props.kwd"
32
/* -*- c -*- */
33
#define GPERF_DOWNCASE 1
34
#define GPERF_CASE_STRNCMP 1
35
36
static inline int
37
gperf_case_strncmp(const char *s1, const char *s2, unsigned int n)
38
0
{
39
0
    const UChar *str = (const UChar *)s1;
40
0
    const UChar *s = (const UChar *)s2;
41
0
    return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, n);
42
0
}
Unexecuted instantiation: euc_jp.c:gperf_case_strncmp
Unexecuted instantiation: shift_jis.c:gperf_case_strncmp
43
44
enum onigenc_jis_ctype {
45
    onigenc_jis_min = ONIGENC_MAX_STD_CTYPE,
46
    onigenc_jis_hiragana,
47
    onigenc_jis_katakana,
48
    onigenc_jis_han,
49
    onigenc_jis_latin,
50
    onigenc_jis_greek,
51
    onigenc_jis_cyrillic,
52
    onigenc_jis_max
53
};
54
55
enum {PropertyListNum = onigenc_jis_max - onigenc_jis_min - 1};
56
57
static const OnigCodePoint* const PropertyList[PropertyListNum] = {
58
    CR_Hiragana,
59
    CR_Katakana,
60
    CR_Han,
61
    CR_Latin,
62
    CR_Greek,
63
    CR_Cyrillic,
64
};
65
66
struct enc_property {
67
    signed char name;
68
    unsigned char ctype;
69
};
70
71
static const struct enc_property *onig_jis_property(const char *str, size_t len);
72
#line 43 "enc/jis/props.kwd"
73
struct enc_property;
74
75
#define TOTAL_KEYWORDS 6
76
0
#define MIN_WORD_LENGTH 3
77
0
#define MAX_WORD_LENGTH 8
78
#define MIN_HASH_VALUE 5
79
0
#define MAX_HASH_VALUE 12
80
/* maximum key range = 8, duplicates = 0 */
81
82
#ifndef GPERF_DOWNCASE
83
#define GPERF_DOWNCASE 1
84
static unsigned char gperf_downcase[256] =
85
  {
86
      0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,
87
     15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,
88
     30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,
89
     45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,
90
     60,  61,  62,  63,  64,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106,
91
    107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
92
    122,  91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103, 104,
93
    105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
94
    120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
95
    135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
96
    150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
97
    165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
98
    180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
99
    195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
100
    210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
101
    225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
102
    240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
103
    255
104
  };
105
#endif
106
107
#ifndef GPERF_CASE_STRNCMP
108
#define GPERF_CASE_STRNCMP 1
109
static int
110
gperf_case_strncmp (register const char *s1, register const char *s2, register size_t n)
111
{
112
  for (; n > 0;)
113
    {
114
      unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
115
      unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
116
      if (c1 != 0 && c1 == c2)
117
        {
118
          n--;
119
          continue;
120
        }
121
      return (int)c1 - (int)c2;
122
    }
123
  return 0;
124
}
125
#endif
126
127
#ifdef __GNUC__
128
__inline
129
#else
130
#ifdef __cplusplus
131
inline
132
#endif
133
#endif
134
static unsigned int
135
onig_jis_property_hash (register const char *str, register size_t len)
136
0
{
137
0
  static const unsigned char asso_values[] =
138
0
    {
139
0
      13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
140
0
      13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
141
0
      13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
142
0
      13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
143
0
      13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
144
0
      13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
145
0
      13, 13, 13, 13, 13, 13, 13,  3, 13,  2,
146
0
      13,  1,  1, 13, 13,  2,  1, 13,  1, 13,
147
0
      13, 13,  1, 13,  1, 13, 13, 13, 13, 13,
148
0
      13, 13, 13, 13, 13, 13, 13, 13, 13,  3,
149
0
      13,  2, 13,  1,  1, 13, 13,  2,  1, 13,
150
0
       1, 13, 13, 13,  1, 13,  1, 13, 13, 13,
151
0
      13, 13, 13, 13, 13, 13, 13, 13
152
0
    };
153
0
  return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]];
154
0
}
Unexecuted instantiation: euc_jp.c:onig_jis_property_hash
Unexecuted instantiation: shift_jis.c:onig_jis_property_hash
155
156
struct onig_jis_property_pool_t
157
  {
158
    char onig_jis_property_pool_str5[sizeof("han")];
159
    char onig_jis_property_pool_str7[sizeof("latin")];
160
    char onig_jis_property_pool_str8[sizeof("greek")];
161
    char onig_jis_property_pool_str10[sizeof("hiragana")];
162
    char onig_jis_property_pool_str11[sizeof("katakana")];
163
    char onig_jis_property_pool_str12[sizeof("cyrillic")];
164
  };
165
static const struct onig_jis_property_pool_t onig_jis_property_pool_contents =
166
  {
167
    "han",
168
    "latin",
169
    "greek",
170
    "hiragana",
171
    "katakana",
172
    "cyrillic"
173
  };
174
0
#define onig_jis_property_pool ((const char *) &onig_jis_property_pool_contents)
175
const struct enc_property *
176
onig_jis_property (register const char *str, register size_t len)
177
0
{
178
0
  static const struct enc_property wordlist[] =
179
0
    {
180
0
      {-1}, {-1}, {-1}, {-1}, {-1},
181
0
#line 48 "enc/jis/props.kwd"
182
0
      {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str5),      onigenc_jis_han},
183
0
      {-1},
184
0
#line 49 "enc/jis/props.kwd"
185
0
      {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str7),    onigenc_jis_latin},
186
0
#line 50 "enc/jis/props.kwd"
187
0
      {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str8),    onigenc_jis_greek},
188
0
      {-1},
189
0
#line 46 "enc/jis/props.kwd"
190
0
      {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str10), onigenc_jis_hiragana},
191
0
#line 47 "enc/jis/props.kwd"
192
0
      {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str11), onigenc_jis_katakana},
193
0
#line 51 "enc/jis/props.kwd"
194
0
      {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str12), onigenc_jis_cyrillic}
195
0
    };
196
197
0
  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
198
0
    {
199
0
      register unsigned int key = onig_jis_property_hash (str, len);
200
201
0
      if (key <= MAX_HASH_VALUE)
202
0
        {
203
0
          register int o = wordlist[key].name;
204
0
          if (o >= 0)
205
0
            {
206
0
              register const char *s = o + onig_jis_property_pool;
207
208
0
              if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strncmp (str, s, len) && s[len] == '\0')
209
0
                return &wordlist[key];
210
0
            }
211
0
        }
212
0
    }
213
0
  return 0;
214
0
}
Unexecuted instantiation: euc_jp.c:onig_jis_property
Unexecuted instantiation: shift_jis.c:onig_jis_property
215
#line 52 "enc/jis/props.kwd"
216