css-properties.h 11 KB

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