/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 65 |
36 | 6.49k | #define MIN_WORD_LENGTH 3 |
37 | 12.9k | #define MAX_WORD_LENGTH 19 |
38 | | #define MIN_HASH_VALUE 10 |
39 | 6.49k | #define MAX_HASH_VALUE 140 |
40 | | /* maximum key range = 131, 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 | 6.49k | { |
52 | 6.49k | static unsigned char asso_values[] = |
53 | 6.49k | { |
54 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
55 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
56 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
57 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
58 | 6.49k | 141, 141, 141, 141, 141, 0, 141, 141, 141, 141, |
59 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
60 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
61 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
62 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
63 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 35, 5, 5, |
64 | 6.49k | 5, 10, 65, 85, 55, 75, 141, 141, 0, 20, |
65 | 6.49k | 5, 0, 0, 0, 0, 35, 20, 0, 0, 5, |
66 | 6.49k | 141, 35, 141, 141, 141, 141, 141, 141, 141, 141, |
67 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
68 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
69 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
70 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
71 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
72 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
73 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
74 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
75 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
76 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
77 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
78 | 6.49k | 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, |
79 | 6.49k | 141, 141, 141, 141, 141, 141 |
80 | 6.49k | }; |
81 | 6.49k | return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; |
82 | 6.49k | } |
83 | | |
84 | | static struct css_property_info css_property_list[] = |
85 | | { |
86 | | {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, |
87 | | {""}, |
88 | | #line 31 "source/html/css-properties.gperf" |
89 | | {"color",PRO_COLOR}, |
90 | | #line 10 "source/html/css-properties.gperf" |
91 | | {"border",PRO_BORDER}, |
92 | | {""}, |
93 | | #line 53 "source/html/css-properties.gperf" |
94 | | {"overflow-wrap",PRO_OVERFLOW_WRAP}, |
95 | | {""}, |
96 | | #line 26 "source/html/css-properties.gperf" |
97 | | {"border-top",PRO_BORDER_TOP}, |
98 | | {""}, |
99 | | #line 15 "source/html/css-properties.gperf" |
100 | | {"border-color",PRO_BORDER_COLOR}, |
101 | | {""}, {""}, {""}, |
102 | | #line 27 "source/html/css-properties.gperf" |
103 | | {"border-top-color",PRO_BORDER_TOP_COLOR}, |
104 | | #line 17 "source/html/css-properties.gperf" |
105 | | {"border-left-color",PRO_BORDER_LEFT_COLOR}, |
106 | | #line 21 "source/html/css-properties.gperf" |
107 | | {"border-right-color",PRO_BORDER_RIGHT_COLOR}, |
108 | | #line 12 "source/html/css-properties.gperf" |
109 | | {"border-bottom-color",PRO_BORDER_BOTTOM_COLOR}, |
110 | | {""}, {""}, |
111 | | #line 25 "source/html/css-properties.gperf" |
112 | | {"border-style",PRO_BORDER_STYLE}, |
113 | | {""}, |
114 | | #line 67 "source/html/css-properties.gperf" |
115 | | {"vertical-align",PRO_VERTICAL_ALIGN}, |
116 | | {""}, |
117 | | #line 28 "source/html/css-properties.gperf" |
118 | | {"border-top-style",PRO_BORDER_TOP_STYLE}, |
119 | | #line 18 "source/html/css-properties.gperf" |
120 | | {"border-left-style",PRO_BORDER_LEFT_STYLE}, |
121 | | #line 22 "source/html/css-properties.gperf" |
122 | | {"border-right-style",PRO_BORDER_RIGHT_STYLE}, |
123 | | #line 13 "source/html/css-properties.gperf" |
124 | | {"border-bottom-style",PRO_BORDER_BOTTOM_STYLE}, |
125 | | {""}, |
126 | | #line 16 "source/html/css-properties.gperf" |
127 | | {"border-left",PRO_BORDER_LEFT}, |
128 | | #line 20 "source/html/css-properties.gperf" |
129 | | {"border-right",PRO_BORDER_RIGHT}, |
130 | | #line 11 "source/html/css-properties.gperf" |
131 | | {"border-bottom",PRO_BORDER_BOTTOM}, |
132 | | {""}, {""}, |
133 | | #line 61 "source/html/css-properties.gperf" |
134 | | {"quotes",PRO_QUOTES}, |
135 | | #line 52 "source/html/css-properties.gperf" |
136 | | {"orphans",PRO_ORPHANS}, |
137 | | #line 62 "source/html/css-properties.gperf" |
138 | | {"src",PRO_SRC}, |
139 | | {""}, |
140 | | #line 63 "source/html/css-properties.gperf" |
141 | | {"text-align",PRO_TEXT_ALIGN}, |
142 | | #line 58 "source/html/css-properties.gperf" |
143 | | {"padding-top",PRO_PADDING_TOP}, |
144 | | {""}, {""}, {""}, |
145 | | #line 64 "source/html/css-properties.gperf" |
146 | | {"text-decoration",PRO_TEXT_DECORATION}, |
147 | | #line 59 "source/html/css-properties.gperf" |
148 | | {"page-break-after",PRO_PAGE_BREAK_AFTER}, |
149 | | {""}, {""}, {""}, {""}, |
150 | | #line 9 "source/html/css-properties.gperf" |
151 | | {"background-color",PRO_BACKGROUND_COLOR}, |
152 | | {""}, {""}, {""}, {""}, |
153 | | #line 65 "source/html/css-properties.gperf" |
154 | | {"text-indent",PRO_TEXT_INDENT}, |
155 | | #line 60 "source/html/css-properties.gperf" |
156 | | {"page-break-before",PRO_PAGE_BREAK_BEFORE}, |
157 | | {""}, |
158 | | #line 66 "source/html/css-properties.gperf" |
159 | | {"text-transform",PRO_TEXT_TRANSFORM}, |
160 | | #line 51 "source/html/css-properties.gperf" |
161 | | {"margin-top",PRO_MARGIN_TOP}, |
162 | | #line 47 "source/html/css-properties.gperf" |
163 | | {"margin",PRO_MARGIN}, |
164 | | #line 56 "source/html/css-properties.gperf" |
165 | | {"padding-left",PRO_PADDING_LEFT}, |
166 | | #line 57 "source/html/css-properties.gperf" |
167 | | {"padding-right",PRO_PADDING_RIGHT}, |
168 | | #line 55 "source/html/css-properties.gperf" |
169 | | {"padding-bottom",PRO_PADDING_BOTTOM}, |
170 | | {""}, {""}, |
171 | | #line 30 "source/html/css-properties.gperf" |
172 | | {"border-width",PRO_BORDER_WIDTH}, |
173 | | {""}, {""}, {""}, |
174 | | #line 29 "source/html/css-properties.gperf" |
175 | | {"border-top-width",PRO_BORDER_TOP_WIDTH}, |
176 | | #line 19 "source/html/css-properties.gperf" |
177 | | {"border-left-width",PRO_BORDER_LEFT_WIDTH}, |
178 | | #line 23 "source/html/css-properties.gperf" |
179 | | {"border-right-width",PRO_BORDER_RIGHT_WIDTH}, |
180 | | #line 14 "source/html/css-properties.gperf" |
181 | | {"border-bottom-width",PRO_BORDER_BOTTOM_WIDTH}, |
182 | | {""}, |
183 | | #line 69 "source/html/css-properties.gperf" |
184 | | {"white-space",PRO_WHITE_SPACE}, |
185 | | {""}, {""}, |
186 | | #line 36 "source/html/css-properties.gperf" |
187 | | {"font-size",PRO_FONT_SIZE}, |
188 | | #line 37 "source/html/css-properties.gperf" |
189 | | {"font-style",PRO_FONT_STYLE}, |
190 | | #line 49 "source/html/css-properties.gperf" |
191 | | {"margin-left",PRO_MARGIN_LEFT}, |
192 | | #line 50 "source/html/css-properties.gperf" |
193 | | {"margin-right",PRO_MARGIN_RIGHT}, |
194 | | #line 48 "source/html/css-properties.gperf" |
195 | | {"margin-bottom",PRO_MARGIN_BOTTOM}, |
196 | | #line 34 "source/html/css-properties.gperf" |
197 | | {"font",PRO_FONT}, |
198 | | {""}, |
199 | | #line 40 "source/html/css-properties.gperf" |
200 | | {"height",PRO_HEIGHT}, |
201 | | {""}, {""}, |
202 | | #line 32 "source/html/css-properties.gperf" |
203 | | {"direction",PRO_DIRECTION}, |
204 | | #line 43 "source/html/css-properties.gperf" |
205 | | {"list-style",PRO_LIST_STYLE}, |
206 | | #line 39 "source/html/css-properties.gperf" |
207 | | {"font-weight",PRO_FONT_WEIGHT}, |
208 | | #line 38 "source/html/css-properties.gperf" |
209 | | {"font-variant",PRO_FONT_VARIANT}, |
210 | | {""}, |
211 | | #line 45 "source/html/css-properties.gperf" |
212 | | {"list-style-position",PRO_LIST_STYLE_POSITION}, |
213 | | #line 46 "source/html/css-properties.gperf" |
214 | | {"list-style-type",PRO_LIST_STYLE_TYPE}, |
215 | | #line 44 "source/html/css-properties.gperf" |
216 | | {"list-style-image",PRO_LIST_STYLE_IMAGE}, |
217 | | #line 72 "source/html/css-properties.gperf" |
218 | | {"word-spacing",PRO_WORD_SPACING}, |
219 | | {""}, |
220 | | #line 24 "source/html/css-properties.gperf" |
221 | | {"border-spacing",PRO_BORDER_SPACING}, |
222 | | {""}, |
223 | | #line 42 "source/html/css-properties.gperf" |
224 | | {"line-height",PRO_LINE_HEIGHT}, |
225 | | {""}, {""}, |
226 | | #line 41 "source/html/css-properties.gperf" |
227 | | {"letter-spacing",PRO_LETTER_SPACING}, |
228 | | {""}, |
229 | | #line 35 "source/html/css-properties.gperf" |
230 | | {"font-family",PRO_FONT_FAMILY}, |
231 | | {""}, {""}, {""}, {""}, {""}, {""}, {""}, |
232 | | #line 8 "source/html/css-properties.gperf" |
233 | | {"-mupdf-leading",PRO_LEADING}, |
234 | | #line 68 "source/html/css-properties.gperf" |
235 | | {"visibility",PRO_VISIBILITY}, |
236 | | #line 70 "source/html/css-properties.gperf" |
237 | | {"widows",PRO_WIDOWS}, |
238 | | #line 33 "source/html/css-properties.gperf" |
239 | | {"display",PRO_DISPLAY}, |
240 | | {""}, {""}, {""}, {""}, |
241 | | #line 54 "source/html/css-properties.gperf" |
242 | | {"padding",PRO_PADDING}, |
243 | | {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, |
244 | | {""}, {""}, {""}, |
245 | | #line 71 "source/html/css-properties.gperf" |
246 | | {"width",PRO_WIDTH} |
247 | | }; |
248 | | |
249 | | struct css_property_info * |
250 | | css_property_lookup (register const char *str, register size_t len) |
251 | 6.49k | { |
252 | 6.49k | if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) |
253 | 6.49k | { |
254 | 6.49k | register unsigned int key = css_property_hash (str, len); |
255 | | |
256 | 6.49k | if (key <= MAX_HASH_VALUE) |
257 | 6.49k | { |
258 | 6.49k | register const char *s = css_property_list[key].name; |
259 | | |
260 | 6.49k | if (*str == *s && !strcmp (str + 1, s + 1)) |
261 | 6.37k | return &css_property_list[key]; |
262 | 6.49k | } |
263 | 6.49k | } |
264 | 123 | return 0; |
265 | 6.49k | } |