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