Coverage Report

Created: 2025-07-23 06:37

/src/mupdf/source/html/css-properties.h
Line
Count
Source
1
/* ANSI-C code produced by gperf version 3.1 */
2
/* Command-line: gperf source/html/css-properties.gperf  */
3
/* Computed positions: -k'1-2,$' */
4
5
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
6
      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
7
      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
8
      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
9
      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
10
      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
11
      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
12
      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
13
      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
14
      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
15
      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
16
      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
17
      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
18
      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
19
      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
20
      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
21
      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
22
      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
23
      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
24
      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
25
      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
26
      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
27
      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
28
/* The character set is not based on ISO-646.  */
29
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
30
#endif
31
32
#line 1 "source/html/css-properties.gperf"
33
struct css_property_info { const char *name; int key; };
34
35
#define TOTAL_KEYWORDS 77
36
37.0k
#define MIN_WORD_LENGTH 3
37
74.0k
#define MAX_WORD_LENGTH 25
38
#define MIN_HASH_VALUE 6
39
36.9k
#define MAX_HASH_VALUE 161
40
/* maximum key range = 156, duplicates = 0 */
41
42
#ifdef __GNUC__
43
__inline
44
#else
45
#ifdef __cplusplus
46
inline
47
#endif
48
#endif
49
static unsigned int
50
css_property_hash (register const char *str, register size_t len)
51
36.9k
{
52
36.9k
  static unsigned char asso_values[] =
53
36.9k
    {
54
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
55
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
56
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
57
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
58
36.9k
      162, 162, 162, 162, 162,   5, 162, 162, 162, 162,
59
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
60
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
61
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
62
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
63
36.9k
      162, 162, 162, 162, 162, 162, 162,  25,   5,  85,
64
36.9k
        0,   5,  95,  55,  55,  75, 162, 162,   0,  25,
65
36.9k
       50,   5,   0,   0,  30,   0,   0,   0,   0,  20,
66
36.9k
      162,  50, 162, 162, 162, 162, 162, 162, 162, 162,
67
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
68
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
69
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
70
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
71
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
72
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
73
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
74
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
75
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
76
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
77
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
78
36.9k
      162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
79
36.9k
      162, 162, 162, 162, 162, 162
80
36.9k
    };
81
36.9k
  return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]];
82
36.9k
}
83
84
static struct css_property_info css_property_list[] =
85
  {
86
    {""}, {""}, {""}, {""}, {""}, {""},
87
#line 71 "source/html/css-properties.gperf"
88
    {"quotes",PRO_QUOTES},
89
    {""},
90
#line 78 "source/html/css-properties.gperf"
91
    {"top",PRO_INSET_TOP},
92
#line 49 "source/html/css-properties.gperf"
93
    {"left",PRO_INSET_LEFT},
94
    {""}, {""}, {""}, {""}, {""}, {""},
95
#line 76 "source/html/css-properties.gperf"
96
    {"text-indent",PRO_TEXT_INDENT},
97
    {""},
98
#line 62 "source/html/css-properties.gperf"
99
    {"overflow-wrap",PRO_OVERFLOW_WRAP},
100
    {""},
101
#line 29 "source/html/css-properties.gperf"
102
    {"border-top",PRO_BORDER_TOP},
103
#line 19 "source/html/css-properties.gperf"
104
    {"border-left",PRO_BORDER_LEFT},
105
#line 23 "source/html/css-properties.gperf"
106
    {"border-right",PRO_BORDER_RIGHT},
107
    {""}, {""}, {""}, {""},
108
#line 28 "source/html/css-properties.gperf"
109
    {"border-style",PRO_BORDER_STYLE},
110
    {""}, {""}, {""},
111
#line 31 "source/html/css-properties.gperf"
112
    {"border-top-style",PRO_BORDER_TOP_STYLE},
113
#line 21 "source/html/css-properties.gperf"
114
    {"border-left-style",PRO_BORDER_LEFT_STYLE},
115
#line 25 "source/html/css-properties.gperf"
116
    {"border-right-style",PRO_BORDER_RIGHT_STYLE},
117
#line 16 "source/html/css-properties.gperf"
118
    {"border-bottom-style",PRO_BORDER_BOTTOM_STYLE},
119
    {""},
120
#line 67 "source/html/css-properties.gperf"
121
    {"padding-top",PRO_PADDING_TOP},
122
#line 65 "source/html/css-properties.gperf"
123
    {"padding-left",PRO_PADDING_LEFT},
124
#line 66 "source/html/css-properties.gperf"
125
    {"padding-right",PRO_PADDING_RIGHT},
126
    {""}, {""},
127
#line 34 "source/html/css-properties.gperf"
128
    {"bottom",PRO_INSET_BOTTOM},
129
#line 61 "source/html/css-properties.gperf"
130
    {"orphans",PRO_ORPHANS},
131
    {""},
132
#line 77 "source/html/css-properties.gperf"
133
    {"text-transform",PRO_TEXT_TRANSFORM},
134
    {""},
135
#line 13 "source/html/css-properties.gperf"
136
    {"border",PRO_BORDER},
137
#line 69 "source/html/css-properties.gperf"
138
    {"page-break-before",PRO_PAGE_BREAK_BEFORE},
139
#line 14 "source/html/css-properties.gperf"
140
    {"border-bottom",PRO_BORDER_BOTTOM},
141
    {""}, {""}, {""},
142
#line 18 "source/html/css-properties.gperf"
143
    {"border-color",PRO_BORDER_COLOR},
144
    {""}, {""}, {""},
145
#line 30 "source/html/css-properties.gperf"
146
    {"border-top-color",PRO_BORDER_TOP_COLOR},
147
#line 20 "source/html/css-properties.gperf"
148
    {"border-left-color",PRO_BORDER_LEFT_COLOR},
149
#line 24 "source/html/css-properties.gperf"
150
    {"border-right-color",PRO_BORDER_RIGHT_COLOR},
151
#line 15 "source/html/css-properties.gperf"
152
    {"border-bottom-color",PRO_BORDER_BOTTOM_COLOR},
153
#line 60 "source/html/css-properties.gperf"
154
    {"margin-top",PRO_MARGIN_TOP},
155
#line 58 "source/html/css-properties.gperf"
156
    {"margin-left",PRO_MARGIN_LEFT},
157
#line 59 "source/html/css-properties.gperf"
158
    {"margin-right",PRO_MARGIN_RIGHT},
159
#line 70 "source/html/css-properties.gperf"
160
    {"position",PRO_POSITION},
161
#line 64 "source/html/css-properties.gperf"
162
    {"padding-bottom",PRO_PADDING_BOTTOM},
163
#line 74 "source/html/css-properties.gperf"
164
    {"text-align",PRO_TEXT_ALIGN},
165
#line 47 "source/html/css-properties.gperf"
166
    {"height",PRO_HEIGHT},
167
    {""}, {""},
168
#line 79 "source/html/css-properties.gperf"
169
    {"vertical-align",PRO_VERTICAL_ALIGN},
170
#line 75 "source/html/css-properties.gperf"
171
    {"text-decoration",PRO_TEXT_DECORATION},
172
#line 68 "source/html/css-properties.gperf"
173
    {"page-break-after",PRO_PAGE_BREAK_AFTER},
174
    {""}, {""},
175
#line 50 "source/html/css-properties.gperf"
176
    {"letter-spacing",PRO_LETTER_SPACING},
177
    {""},
178
#line 12 "source/html/css-properties.gperf"
179
    {"background-color",PRO_BACKGROUND_COLOR},
180
#line 33 "source/html/css-properties.gperf"
181
    {"border-width",PRO_BORDER_WIDTH},
182
#line 9 "source/html/css-properties.gperf"
183
    {"-webkit-text-fill-color",PRO_TEXT_FILL_COLOR},
184
#line 27 "source/html/css-properties.gperf"
185
    {"border-spacing",PRO_BORDER_SPACING},
186
#line 10 "source/html/css-properties.gperf"
187
    {"-webkit-text-stroke-color",PRO_TEXT_STROKE_COLOR},
188
#line 32 "source/html/css-properties.gperf"
189
    {"border-top-width",PRO_BORDER_TOP_WIDTH},
190
#line 22 "source/html/css-properties.gperf"
191
    {"border-left-width",PRO_BORDER_LEFT_WIDTH},
192
#line 26 "source/html/css-properties.gperf"
193
    {"border-right-width",PRO_BORDER_RIGHT_WIDTH},
194
#line 17 "source/html/css-properties.gperf"
195
    {"border-bottom-width",PRO_BORDER_BOTTOM_WIDTH},
196
    {""},
197
#line 51 "source/html/css-properties.gperf"
198
    {"line-height",PRO_LINE_HEIGHT},
199
#line 63 "source/html/css-properties.gperf"
200
    {"padding",PRO_PADDING},
201
#line 57 "source/html/css-properties.gperf"
202
    {"margin-bottom",PRO_MARGIN_BOTTOM},
203
    {""},
204
#line 52 "source/html/css-properties.gperf"
205
    {"list-style",PRO_LIST_STYLE},
206
#line 81 "source/html/css-properties.gperf"
207
    {"white-space",PRO_WHITE_SPACE},
208
#line 84 "source/html/css-properties.gperf"
209
    {"word-spacing",PRO_WORD_SPACING},
210
    {""}, {""},
211
#line 55 "source/html/css-properties.gperf"
212
    {"list-style-type",PRO_LIST_STYLE_TYPE},
213
#line 53 "source/html/css-properties.gperf"
214
    {"list-style-image",PRO_LIST_STYLE_IMAGE},
215
#line 37 "source/html/css-properties.gperf"
216
    {"columns",PRO_COLUMNS},
217
    {""},
218
#line 8 "source/html/css-properties.gperf"
219
    {"-mupdf-leading",PRO_LEADING},
220
#line 40 "source/html/css-properties.gperf"
221
    {"float",PRO_FLOAT},
222
#line 82 "source/html/css-properties.gperf"
223
    {"widows",PRO_WIDOWS},
224
    {""}, {""},
225
#line 41 "source/html/css-properties.gperf"
226
    {"font",PRO_FONT},
227
#line 11 "source/html/css-properties.gperf"
228
    {"-webkit-text-stroke-width",PRO_TEXT_STROKE_WIDTH},
229
#line 56 "source/html/css-properties.gperf"
230
    {"margin",PRO_MARGIN},
231
    {""}, {""}, {""},
232
#line 72 "source/html/css-properties.gperf"
233
    {"right",PRO_INSET_RIGHT},
234
#line 46 "source/html/css-properties.gperf"
235
    {"font-weight",PRO_FONT_WEIGHT},
236
#line 45 "source/html/css-properties.gperf"
237
    {"font-variant",PRO_FONT_VARIANT},
238
    {""},
239
#line 43 "source/html/css-properties.gperf"
240
    {"font-size",PRO_FONT_SIZE},
241
#line 44 "source/html/css-properties.gperf"
242
    {"font-style",PRO_FONT_STYLE},
243
    {""}, {""},
244
#line 73 "source/html/css-properties.gperf"
245
    {"src",PRO_SRC},
246
    {""},
247
#line 35 "source/html/css-properties.gperf"
248
    {"clear",PRO_CLEAR},
249
    {""}, {""}, {""}, {""},
250
#line 36 "source/html/css-properties.gperf"
251
    {"color",PRO_COLOR},
252
    {""}, {""}, {""}, {""},
253
#line 48 "source/html/css-properties.gperf"
254
    {"inset",PRO_INSET},
255
    {""},
256
#line 39 "source/html/css-properties.gperf"
257
    {"display",PRO_DISPLAY},
258
    {""},
259
#line 38 "source/html/css-properties.gperf"
260
    {"direction",PRO_DIRECTION},
261
#line 80 "source/html/css-properties.gperf"
262
    {"visibility",PRO_VISIBILITY},
263
    {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
264
#line 54 "source/html/css-properties.gperf"
265
    {"list-style-position",PRO_LIST_STYLE_POSITION},
266
    {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
267
    {""},
268
#line 83 "source/html/css-properties.gperf"
269
    {"width",PRO_WIDTH},
270
    {""}, {""}, {""}, {""}, {""},
271
#line 42 "source/html/css-properties.gperf"
272
    {"font-family",PRO_FONT_FAMILY}
273
  };
274
275
struct css_property_info *
276
css_property_lookup (register const char *str, register size_t len)
277
37.0k
{
278
37.0k
  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
279
36.9k
    {
280
36.9k
      register unsigned int key = css_property_hash (str, len);
281
282
36.9k
      if (key <= MAX_HASH_VALUE)
283
36.7k
        {
284
36.7k
          register const char *s = css_property_list[key].name;
285
286
36.7k
          if (*str == *s && !strcmp (str + 1, s + 1))
287
36.4k
            return &css_property_list[key];
288
36.7k
        }
289
36.9k
    }
290
603
  return 0;
291
37.0k
}