iconv_open-hpux.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. /* ANSI-C code produced by gperf version 3.1 */
  2. /* Command-line: gperf -m 10 ./iconv_open-hpux.gperf */
  3. /* Computed positions: -k'4,$' */
  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 17 "./iconv_open-hpux.gperf"
  31. struct mapping { int standard_name; const char vendor_name[9 + 1]; };
  32. #define TOTAL_KEYWORDS 44
  33. #define MIN_WORD_LENGTH 4
  34. #define MAX_WORD_LENGTH 11
  35. #define MIN_HASH_VALUE 6
  36. #define MAX_HASH_VALUE 49
  37. /* maximum key range = 44, duplicates = 0 */
  38. #ifdef __GNUC__
  39. __inline
  40. #else
  41. #ifdef __cplusplus
  42. inline
  43. #endif
  44. #endif
  45. static unsigned int
  46. mapping_hash (register const char *str, register size_t len)
  47. {
  48. static const unsigned char asso_values[] =
  49. {
  50. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  51. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  52. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  53. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  54. 50, 50, 50, 50, 50, 50, 50, 50, 1, 2,
  55. 24, 43, 5, 10, 0, 13, 32, 3, 19, 18,
  56. 50, 50, 50, 50, 50, 50, 50, 50, 50, 5,
  57. 50, 50, 50, 50, 14, 5, 0, 50, 50, 0,
  58. 27, 50, 12, 14, 50, 50, 0, 5, 2, 50,
  59. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  60. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  61. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  62. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  63. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  64. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  65. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  66. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  67. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  68. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  69. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  70. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  71. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  72. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  73. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  74. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
  75. 50, 50, 50, 50, 50, 50, 50, 50, 50, 50
  76. };
  77. return len + asso_values[(unsigned char)str[3]+4] + asso_values[(unsigned char)str[len - 1]];
  78. }
  79. struct stringpool_t
  80. {
  81. char stringpool_str6[sizeof("CP1256")];
  82. char stringpool_str7[sizeof("CP1250")];
  83. char stringpool_str8[sizeof("CP1251")];
  84. char stringpool_str9[sizeof("CP850")];
  85. char stringpool_str10[sizeof("TIS-620")];
  86. char stringpool_str11[sizeof("CP1254")];
  87. char stringpool_str12[sizeof("ISO-8859-6")];
  88. char stringpool_str13[sizeof("EUC-TW")];
  89. char stringpool_str14[sizeof("ISO-8859-1")];
  90. char stringpool_str15[sizeof("ISO-8859-9")];
  91. char stringpool_str16[sizeof("CP1255")];
  92. char stringpool_str17[sizeof("BIG5")];
  93. char stringpool_str18[sizeof("CP855")];
  94. char stringpool_str19[sizeof("CP1257")];
  95. char stringpool_str20[sizeof("EUC-KR")];
  96. char stringpool_str21[sizeof("CP857")];
  97. char stringpool_str22[sizeof("ISO-8859-5")];
  98. char stringpool_str23[sizeof("ISO-8859-15")];
  99. char stringpool_str24[sizeof("CP866")];
  100. char stringpool_str25[sizeof("ISO-8859-7")];
  101. char stringpool_str26[sizeof("CP861")];
  102. char stringpool_str27[sizeof("CP869")];
  103. char stringpool_str28[sizeof("CP874")];
  104. char stringpool_str29[sizeof("CP864")];
  105. char stringpool_str30[sizeof("CP1252")];
  106. char stringpool_str31[sizeof("CP437")];
  107. char stringpool_str32[sizeof("CP852")];
  108. char stringpool_str33[sizeof("CP775")];
  109. char stringpool_str34[sizeof("CP865")];
  110. char stringpool_str35[sizeof("EUC-JP")];
  111. char stringpool_str36[sizeof("ISO-8859-2")];
  112. char stringpool_str37[sizeof("SHIFT_JIS")];
  113. char stringpool_str38[sizeof("CP1258")];
  114. char stringpool_str39[sizeof("UTF-8")];
  115. char stringpool_str40[sizeof("HP-KANA8")];
  116. char stringpool_str41[sizeof("HP-ROMAN8")];
  117. char stringpool_str42[sizeof("HP-HEBREW8")];
  118. char stringpool_str43[sizeof("GB2312")];
  119. char stringpool_str44[sizeof("ISO-8859-8")];
  120. char stringpool_str45[sizeof("HP-TURKISH8")];
  121. char stringpool_str46[sizeof("HP-GREEK8")];
  122. char stringpool_str47[sizeof("HP-ARABIC8")];
  123. char stringpool_str48[sizeof("CP862")];
  124. char stringpool_str49[sizeof("CP1253")];
  125. };
  126. static const struct stringpool_t stringpool_contents =
  127. {
  128. "CP1256",
  129. "CP1250",
  130. "CP1251",
  131. "CP850",
  132. "TIS-620",
  133. "CP1254",
  134. "ISO-8859-6",
  135. "EUC-TW",
  136. "ISO-8859-1",
  137. "ISO-8859-9",
  138. "CP1255",
  139. "BIG5",
  140. "CP855",
  141. "CP1257",
  142. "EUC-KR",
  143. "CP857",
  144. "ISO-8859-5",
  145. "ISO-8859-15",
  146. "CP866",
  147. "ISO-8859-7",
  148. "CP861",
  149. "CP869",
  150. "CP874",
  151. "CP864",
  152. "CP1252",
  153. "CP437",
  154. "CP852",
  155. "CP775",
  156. "CP865",
  157. "EUC-JP",
  158. "ISO-8859-2",
  159. "SHIFT_JIS",
  160. "CP1258",
  161. "UTF-8",
  162. "HP-KANA8",
  163. "HP-ROMAN8",
  164. "HP-HEBREW8",
  165. "GB2312",
  166. "ISO-8859-8",
  167. "HP-TURKISH8",
  168. "HP-GREEK8",
  169. "HP-ARABIC8",
  170. "CP862",
  171. "CP1253"
  172. };
  173. #define stringpool ((const char *) &stringpool_contents)
  174. static const struct mapping mappings[] =
  175. {
  176. {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
  177. #line 56 "./iconv_open-hpux.gperf"
  178. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str6, "cp1256"},
  179. #line 50 "./iconv_open-hpux.gperf"
  180. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7, "cp1250"},
  181. #line 51 "./iconv_open-hpux.gperf"
  182. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8, "cp1251"},
  183. #line 39 "./iconv_open-hpux.gperf"
  184. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9, "cp850"},
  185. #line 65 "./iconv_open-hpux.gperf"
  186. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, "tis620"},
  187. #line 54 "./iconv_open-hpux.gperf"
  188. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, "cp1254"},
  189. #line 32 "./iconv_open-hpux.gperf"
  190. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, "iso88596"},
  191. #line 69 "./iconv_open-hpux.gperf"
  192. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, "eucTW"},
  193. #line 29 "./iconv_open-hpux.gperf"
  194. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, "iso88591"},
  195. #line 35 "./iconv_open-hpux.gperf"
  196. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, "iso88599"},
  197. #line 55 "./iconv_open-hpux.gperf"
  198. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, "cp1255"},
  199. #line 70 "./iconv_open-hpux.gperf"
  200. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, "big5"},
  201. #line 41 "./iconv_open-hpux.gperf"
  202. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, "cp855"},
  203. #line 57 "./iconv_open-hpux.gperf"
  204. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, "cp1257"},
  205. #line 68 "./iconv_open-hpux.gperf"
  206. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, "eucKR"},
  207. #line 42 "./iconv_open-hpux.gperf"
  208. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, "cp857"},
  209. #line 31 "./iconv_open-hpux.gperf"
  210. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, "iso88595"},
  211. #line 36 "./iconv_open-hpux.gperf"
  212. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, "iso885915"},
  213. #line 47 "./iconv_open-hpux.gperf"
  214. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24, "cp866"},
  215. #line 33 "./iconv_open-hpux.gperf"
  216. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25, "iso88597"},
  217. #line 43 "./iconv_open-hpux.gperf"
  218. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26, "cp861"},
  219. #line 48 "./iconv_open-hpux.gperf"
  220. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str27, "cp869"},
  221. #line 49 "./iconv_open-hpux.gperf"
  222. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str28, "cp874"},
  223. #line 45 "./iconv_open-hpux.gperf"
  224. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29, "cp864"},
  225. #line 52 "./iconv_open-hpux.gperf"
  226. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30, "cp1252"},
  227. #line 37 "./iconv_open-hpux.gperf"
  228. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31, "cp437"},
  229. #line 40 "./iconv_open-hpux.gperf"
  230. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str32, "cp852"},
  231. #line 38 "./iconv_open-hpux.gperf"
  232. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33, "cp775"},
  233. #line 46 "./iconv_open-hpux.gperf"
  234. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34, "cp865"},
  235. #line 67 "./iconv_open-hpux.gperf"
  236. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35, "eucJP"},
  237. #line 30 "./iconv_open-hpux.gperf"
  238. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36, "iso88592"},
  239. #line 71 "./iconv_open-hpux.gperf"
  240. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str37, "sjis"},
  241. #line 58 "./iconv_open-hpux.gperf"
  242. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38, "cp1258"},
  243. #line 72 "./iconv_open-hpux.gperf"
  244. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str39, "utf8"},
  245. #line 64 "./iconv_open-hpux.gperf"
  246. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str40, "kana8"},
  247. #line 59 "./iconv_open-hpux.gperf"
  248. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str41, "roman8"},
  249. #line 62 "./iconv_open-hpux.gperf"
  250. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str42, "hebrew8"},
  251. #line 66 "./iconv_open-hpux.gperf"
  252. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str43, "hp15CN"},
  253. #line 34 "./iconv_open-hpux.gperf"
  254. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str44, "iso88598"},
  255. #line 63 "./iconv_open-hpux.gperf"
  256. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str45, "turkish8"},
  257. #line 61 "./iconv_open-hpux.gperf"
  258. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str46, "greek8"},
  259. #line 60 "./iconv_open-hpux.gperf"
  260. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str47, "arabic8"},
  261. #line 44 "./iconv_open-hpux.gperf"
  262. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str48, "cp862"},
  263. #line 53 "./iconv_open-hpux.gperf"
  264. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str49, "cp1253"}
  265. };
  266. const struct mapping *
  267. mapping_lookup (register const char *str, register size_t len)
  268. {
  269. if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
  270. {
  271. register unsigned int key = mapping_hash (str, len);
  272. if (key <= MAX_HASH_VALUE)
  273. {
  274. register int o = mappings[key].standard_name;
  275. if (o >= 0)
  276. {
  277. register const char *s = o + stringpool;
  278. if (*str == *s && !strcmp (str + 1, s + 1))
  279. return &mappings[key];
  280. }
  281. }
  282. }
  283. return 0;
  284. }