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