iconv_open-zos.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. /* ANSI-C code produced by gperf version 3.1 */
  2. /* Command-line: gperf -m 10 ./iconv_open-zos.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-zos.gperf"
  31. struct mapping { int standard_name; const char vendor_name[10 + 1]; };
  32. #define TOTAL_KEYWORDS 49
  33. #define MIN_WORD_LENGTH 3
  34. #define MAX_WORD_LENGTH 11
  35. #define MIN_HASH_VALUE 3
  36. #define MAX_HASH_VALUE 64
  37. /* maximum key range = 62, 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. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  51. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  52. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  53. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  54. 65, 65, 65, 65, 65, 65, 65, 65, 16, 38,
  55. 14, 1, 32, 22, 29, 3, 0, 7, 40, 2,
  56. 5, 18, 23, 65, 65, 65, 65, 65, 65, 65,
  57. 65, 65, 65, 0, 65, 0, 65, 65, 65, 0,
  58. 43, 65, 1, 65, 65, 8, 65, 65, 65, 65,
  59. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  60. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  61. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  62. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  63. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  64. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  65. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  66. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  67. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  68. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  69. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  70. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  71. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  72. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  73. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  74. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  75. 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
  76. 65, 65
  77. };
  78. register unsigned int hval = len;
  79. switch (hval)
  80. {
  81. default:
  82. hval += asso_values[(unsigned char)str[3]+6];
  83. /*FALLTHROUGH*/
  84. case 3:
  85. break;
  86. }
  87. return hval + asso_values[(unsigned char)str[len - 1]];
  88. }
  89. struct stringpool_t
  90. {
  91. char stringpool_str3[sizeof("GBK")];
  92. char stringpool_str5[sizeof("ASCII")];
  93. char stringpool_str7[sizeof("CP1253")];
  94. char stringpool_str8[sizeof("EUC-KR")];
  95. char stringpool_str9[sizeof("CP1257")];
  96. char stringpool_str10[sizeof("CP857")];
  97. char stringpool_str11[sizeof("ISO-8859-8")];
  98. char stringpool_str12[sizeof("ISO-8859-3")];
  99. char stringpool_str13[sizeof("ISO-8859-13")];
  100. char stringpool_str14[sizeof("ISO-8859-7")];
  101. char stringpool_str15[sizeof("CP437")];
  102. char stringpool_str16[sizeof("CP1129")];
  103. char stringpool_str17[sizeof("CP869")];
  104. char stringpool_str18[sizeof("ISO-8859-9")];
  105. char stringpool_str19[sizeof("CP922")];
  106. char stringpool_str20[sizeof("CP1252")];
  107. char stringpool_str21[sizeof("CP852")];
  108. char stringpool_str22[sizeof("CP1250")];
  109. char stringpool_str23[sizeof("CP850")];
  110. char stringpool_str24[sizeof("CP862")];
  111. char stringpool_str25[sizeof("ISO-8859-2")];
  112. char stringpool_str26[sizeof("CP932")];
  113. char stringpool_str27[sizeof("GB2312")];
  114. char stringpool_str28[sizeof("CP1255")];
  115. char stringpool_str29[sizeof("CP855")];
  116. char stringpool_str30[sizeof("KOI8-R")];
  117. char stringpool_str31[sizeof("CP1125")];
  118. char stringpool_str32[sizeof("CP865")];
  119. char stringpool_str33[sizeof("ISO-8859-5")];
  120. char stringpool_str34[sizeof("ISO-8859-15")];
  121. char stringpool_str35[sizeof("CP1256")];
  122. char stringpool_str36[sizeof("CP856")];
  123. char stringpool_str37[sizeof("KOI8-U")];
  124. char stringpool_str38[sizeof("CP1254")];
  125. char stringpool_str39[sizeof("CP866")];
  126. char stringpool_str40[sizeof("ISO-8859-6")];
  127. char stringpool_str41[sizeof("CP1124")];
  128. char stringpool_str42[sizeof("CP864")];
  129. char stringpool_str43[sizeof("ISO-8859-4")];
  130. char stringpool_str44[sizeof("CP1251")];
  131. char stringpool_str45[sizeof("CP775")];
  132. char stringpool_str46[sizeof("CP943")];
  133. char stringpool_str47[sizeof("CP1131")];
  134. char stringpool_str48[sizeof("CP861")];
  135. char stringpool_str49[sizeof("ISO-8859-1")];
  136. char stringpool_str50[sizeof("EUC-JP")];
  137. char stringpool_str52[sizeof("CP949")];
  138. char stringpool_str55[sizeof("CP874")];
  139. char stringpool_str64[sizeof("CP1046")];
  140. };
  141. static const struct stringpool_t stringpool_contents =
  142. {
  143. "GBK",
  144. "ASCII",
  145. "CP1253",
  146. "EUC-KR",
  147. "CP1257",
  148. "CP857",
  149. "ISO-8859-8",
  150. "ISO-8859-3",
  151. "ISO-8859-13",
  152. "ISO-8859-7",
  153. "CP437",
  154. "CP1129",
  155. "CP869",
  156. "ISO-8859-9",
  157. "CP922",
  158. "CP1252",
  159. "CP852",
  160. "CP1250",
  161. "CP850",
  162. "CP862",
  163. "ISO-8859-2",
  164. "CP932",
  165. "GB2312",
  166. "CP1255",
  167. "CP855",
  168. "KOI8-R",
  169. "CP1125",
  170. "CP865",
  171. "ISO-8859-5",
  172. "ISO-8859-15",
  173. "CP1256",
  174. "CP856",
  175. "KOI8-U",
  176. "CP1254",
  177. "CP866",
  178. "ISO-8859-6",
  179. "CP1124",
  180. "CP864",
  181. "ISO-8859-4",
  182. "CP1251",
  183. "CP775",
  184. "CP943",
  185. "CP1131",
  186. "CP861",
  187. "ISO-8859-1",
  188. "EUC-JP",
  189. "CP949",
  190. "CP874",
  191. "CP1046"
  192. };
  193. #define stringpool ((const char *) &stringpool_contents)
  194. static const struct mapping mappings[] =
  195. {
  196. {-1}, {-1}, {-1},
  197. #line 76 "./iconv_open-zos.gperf"
  198. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str3, "IBM-1386"},
  199. {-1},
  200. #line 28 "./iconv_open-zos.gperf"
  201. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str5, "00367"},
  202. {-1},
  203. #line 68 "./iconv_open-zos.gperf"
  204. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7, "IBM-5349"},
  205. #line 75 "./iconv_open-zos.gperf"
  206. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8, "IBM-eucKR"},
  207. #line 72 "./iconv_open-zos.gperf"
  208. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9, "09449"},
  209. #line 48 "./iconv_open-zos.gperf"
  210. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, "00857"},
  211. #line 36 "./iconv_open-zos.gperf"
  212. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, "05012"},
  213. #line 31 "./iconv_open-zos.gperf"
  214. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, "00913"},
  215. #line 38 "./iconv_open-zos.gperf"
  216. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, "ISO8859-13"},
  217. #line 35 "./iconv_open-zos.gperf"
  218. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, "ISO8859-7"},
  219. #line 42 "./iconv_open-zos.gperf"
  220. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, "IBM-437"},
  221. #line 63 "./iconv_open-zos.gperf"
  222. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, "01129"},
  223. #line 54 "./iconv_open-zos.gperf"
  224. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, "IBM-869"},
  225. #line 37 "./iconv_open-zos.gperf"
  226. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, "ISO8859-9"},
  227. #line 56 "./iconv_open-zos.gperf"
  228. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, "IBM-922"},
  229. #line 67 "./iconv_open-zos.gperf"
  230. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, "IBM-5348"},
  231. #line 45 "./iconv_open-zos.gperf"
  232. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, "IBM-852"},
  233. #line 65 "./iconv_open-zos.gperf"
  234. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, "IBM-5346"},
  235. #line 44 "./iconv_open-zos.gperf"
  236. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, "09042"},
  237. #line 50 "./iconv_open-zos.gperf"
  238. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24, "IBM-862"},
  239. #line 30 "./iconv_open-zos.gperf"
  240. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25, "ISO8859-2"},
  241. #line 57 "./iconv_open-zos.gperf"
  242. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26, "IBM-943"},
  243. #line 73 "./iconv_open-zos.gperf"
  244. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str27, "IBM-eucCN"},
  245. #line 70 "./iconv_open-zos.gperf"
  246. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str28, "09447"},
  247. #line 46 "./iconv_open-zos.gperf"
  248. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29, "13143"},
  249. #line 40 "./iconv_open-zos.gperf"
  250. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30, "00878"},
  251. #line 62 "./iconv_open-zos.gperf"
  252. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31, "IBM-1125"},
  253. #line 52 "./iconv_open-zos.gperf"
  254. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str32, "00865"},
  255. #line 33 "./iconv_open-zos.gperf"
  256. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33, "ISO8859-5"},
  257. #line 39 "./iconv_open-zos.gperf"
  258. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34, "ISO8859-15"},
  259. #line 71 "./iconv_open-zos.gperf"
  260. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35, "09448"},
  261. #line 47 "./iconv_open-zos.gperf"
  262. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36, "IBM-856"},
  263. #line 41 "./iconv_open-zos.gperf"
  264. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str37, "01168"},
  265. #line 69 "./iconv_open-zos.gperf"
  266. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38, "IBM-5350"},
  267. #line 53 "./iconv_open-zos.gperf"
  268. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str39, "04962"},
  269. #line 34 "./iconv_open-zos.gperf"
  270. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str40, "ISO8859-6"},
  271. #line 61 "./iconv_open-zos.gperf"
  272. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str41, "IBM-1124"},
  273. #line 51 "./iconv_open-zos.gperf"
  274. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str42, "IBM-864"},
  275. #line 32 "./iconv_open-zos.gperf"
  276. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str43, "ISO8859-4"},
  277. #line 66 "./iconv_open-zos.gperf"
  278. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str44, "IBM-5347"},
  279. #line 43 "./iconv_open-zos.gperf"
  280. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str45, "00775"},
  281. #line 58 "./iconv_open-zos.gperf"
  282. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str46, "IBM-943"},
  283. #line 64 "./iconv_open-zos.gperf"
  284. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str47, "01131"},
  285. #line 49 "./iconv_open-zos.gperf"
  286. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str48, "IBM-861"},
  287. #line 29 "./iconv_open-zos.gperf"
  288. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str49, "ISO8859-1"},
  289. #line 74 "./iconv_open-zos.gperf"
  290. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str50, "01350"},
  291. {-1},
  292. #line 59 "./iconv_open-zos.gperf"
  293. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str52, "IBM-1363"},
  294. {-1}, {-1},
  295. #line 55 "./iconv_open-zos.gperf"
  296. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str55, "TIS-620"},
  297. {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
  298. #line 60 "./iconv_open-zos.gperf"
  299. {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str64, "IBM-1046"}
  300. };
  301. const struct mapping *
  302. mapping_lookup (register const char *str, register size_t len)
  303. {
  304. if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
  305. {
  306. register unsigned int key = mapping_hash (str, len);
  307. if (key <= MAX_HASH_VALUE)
  308. {
  309. register int o = mappings[key].standard_name;
  310. if (o >= 0)
  311. {
  312. register const char *s = o + stringpool;
  313. if (*str == *s && !strcmp (str + 1, s + 1))
  314. return &mappings[key];
  315. }
  316. }
  317. }
  318. return 0;
  319. }