hkscs2001.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. /*
  2. * Copyright (C) 1999-2006 Free Software Foundation, Inc.
  3. * This file is part of the GNU LIBICONV Library.
  4. *
  5. * The GNU LIBICONV Library is free software; you can redistribute it
  6. * and/or modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either version 2
  8. * of the License, or (at your option) any later version.
  9. *
  10. * The GNU LIBICONV Library is distributed in the hope that it will be
  11. * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public
  16. * License along with the GNU LIBICONV Library; see the file COPYING.LIB.
  17. * If not, write to the Free Software Foundation, Inc., 51 Franklin Street,
  18. * Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. /*
  21. * HKSCS:2001
  22. */
  23. static const unsigned short hkscs2001_2uni_page8c[123] = {
  24. /* 0x8c */
  25. 0x0a3b, 0x1cfe, 0x5273, 0x37a6, 0x02c9, 0x2d8f, 0x414e, 0x1d77,
  26. 0x12f5, 0x0620, 0x45cd, 0x0059, 0x4830, 0x1622, 0x4f32, 0x30a7,
  27. 0x31f6, 0x1e91, 0x1819, 0x20ba, 0x3e81, 0x5307, 0x018b, 0x3a80,
  28. 0x0610, 0x24e4, 0x2102, 0x0bae, 0x4d0f, 0x0409, 0x1a63, 0x54ba,
  29. 0x0523, 0x2c0f, 0x38fd, 0x252a, 0x5147, 0x4fea, 0x3455, 0x1d4d,
  30. 0x0c24, 0x3c7e, 0x33f4, 0x22d9, 0x4ee3, 0x37a7, 0x23dd, 0x08a3,
  31. 0x09f0, 0x0abc, 0x082f, 0x0917, 0x37a8, 0x0d34, 0x288b, 0x0f92,
  32. 0x0fd0, 0x3bb6, 0x1492, 0x1499, 0x15c2, 0x3d12, 0x178b, 0x3ff9,
  33. 0x1919, 0x1a43, 0x4063, 0x1bff, 0x38fd, 0x1f00, 0x4205, 0x208c,
  34. 0x03db, 0x4413, 0x1115, 0x21b9, 0x2e83, 0x47a4, 0x4695, 0x2593,
  35. 0x26ec, 0x27c3, 0x296c, 0x2af8, 0x2b97, 0x37a9, 0x2d90, 0x37aa,
  36. 0x2fb9, 0x37ab, 0x30cf, 0x2b5f, 0x36e0, 0x3221, 0x37ac, 0x50b9,
  37. 0x393f, 0x0471, 0x05a2, 0x101a, 0x38fd, 0x38fd, 0x38fd, 0x3568,
  38. 0x186b, 0x0576, 0x0e3d, 0x38fd, 0x2bd6, 0x437b, 0x2abf, 0x4c0d,
  39. 0x0781, 0x4a74, 0x137b, 0x4915, 0x4bbe, 0x37ad, 0x37ae, 0x1196,
  40. 0x37af, 0x38fd, 0x295b,
  41. };
  42. static const ucs4_t hkscs2001_2uni_upages[85] = {
  43. 0x03500, 0x03c00, 0x03d00, 0x03e00, 0x04000, 0x04200, 0x04b00, 0x04c00,
  44. 0x04e00, 0x04f00, 0x05000, 0x05100, 0x05300, 0x05400, 0x05700, 0x05800,
  45. 0x05a00, 0x05b00, 0x05c00, 0x05d00, 0x05e00, 0x05f00, 0x06100, 0x06500,
  46. 0x06700, 0x06900, 0x06a00, 0x06c00, 0x06d00, 0x07000, 0x07100, 0x07200,
  47. 0x07300, 0x07400, 0x07600, 0x07700, 0x07800, 0x07a00, 0x07b00, 0x07c00,
  48. 0x07d00, 0x07e00, 0x08200, 0x08500, 0x08600, 0x08800, 0x08b00, 0x08e00,
  49. 0x08f00, 0x09100, 0x09200, 0x09300, 0x09700, 0x09800, 0x09900, 0x09f00,
  50. 0x0ff00, 0x21400, 0x21900, 0x21d00, 0x22000, 0x22700, 0x23200, 0x23300,
  51. 0x23c00, 0x24100, 0x24500, 0x24900, 0x24a00, 0x25100, 0x25600, 0x25c00,
  52. 0x25d00, 0x26b00, 0x26d00, 0x26f00, 0x27100, 0x28700, 0x28900, 0x28a00,
  53. 0x28d00, 0x29900, 0x29c00, 0x2a100, 0x2a200,
  54. };
  55. static int
  56. hkscs2001_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
  57. {
  58. unsigned char c1 = s[0];
  59. if ((c1 == 0x8c)) {
  60. if (n >= 2) {
  61. unsigned char c2 = s[1];
  62. if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
  63. unsigned int i = 157 * (c1 - 0x80) + (c2 - (c2 >= 0xa1 ? 0x62 : 0x40));
  64. ucs4_t wc = 0xfffd;
  65. unsigned short swc;
  66. {
  67. if (i < 2007)
  68. swc = hkscs2001_2uni_page8c[i-1884],
  69. wc = hkscs2001_2uni_upages[swc>>8] | (swc & 0xff);
  70. }
  71. if (wc != 0xfffd) {
  72. *pwc = wc;
  73. return 2;
  74. }
  75. }
  76. return RET_ILSEQ;
  77. }
  78. return RET_TOOFEW(0);
  79. }
  80. return RET_ILSEQ;
  81. }
  82. static const unsigned short hkscs2001_2charset[116] = {
  83. 0x8c4b, 0x8c56, 0x8c44, 0x8caa, 0x8c5d, 0x8cc3, 0x8c60, 0x8ccb,
  84. 0x8cc4, 0x8c58, 0x8c49, 0x8cd2, 0x8c72, 0x8c6f, 0x8c73, 0x8c70,
  85. 0x8c40, 0x8c71, 0x8c5b, 0x8c68, 0x8c75, 0x8ccc, 0x8c77, 0x8c78,
  86. 0x8cc5, 0x8cac, 0x8cd9, 0x8c48, 0x8cd4, 0x8c7a, 0x8c7b, 0x8c7c,
  87. 0x8c4d, 0x8c7e, 0x8c52, 0x8cca, 0x8ca2, 0x8ca3, 0x8c5e, 0x8ca5,
  88. 0x8c41, 0x8c67, 0x8c47, 0x8c51, 0x8ca7, 0x8ca9, 0x8c53, 0x8c5a,
  89. 0x8cad, 0x8c6b, 0x8c6e, 0x8c59, 0x8c63, 0x8cb1, 0x8cb2, 0x8cb3,
  90. 0x8c76, 0x8cdc, 0x8cb4, 0x8cd0, 0x8cb5, 0x8cbd, 0x8cb6, 0x8cce,
  91. 0x8c61, 0x8c45, 0x8cb8, 0x8cae, 0x8cba, 0x8c4f, 0x8cbc, 0x8c50,
  92. 0x8cbf, 0x8c6a, 0x8c66, 0x8cc9, 0x8cbe, 0x8c43, 0x8c6d, 0x8c74,
  93. 0x8cb7, 0x8cb9, 0x8cbb, 0x8cc0, 0x8cd7, 0x8cd8, 0x8cda, 0x8cc2,
  94. 0x8c57, 0x8c79, 0x8c69, 0x8c7d, 0x8c54, 0x8ca1, 0x8ca4, 0x8c46,
  95. 0x8ca8, 0x8ccf, 0x8cab, 0x8c4a, 0x8cb0, 0x8caf, 0x8c4c, 0x8cd5,
  96. 0x8cd3, 0x8cd6, 0x8cd1, 0x8c5c, 0x8c6c, 0x8c4e, 0x8c65, 0x8cc1,
  97. 0x8c64, 0x8c42, 0x8c55, 0x8c5f,
  98. };
  99. static const Summary16 hkscs2001_uni2indx_page35[6] = {
  100. /* 0x3500 */
  101. { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 },
  102. { 0, 0x0000 }, { 0, 0x0200 },
  103. };
  104. static const Summary16 hkscs2001_uni2indx_page3c[46] = {
  105. /* 0x3c00 */
  106. { 1, 0x0000 }, { 1, 0x0000 }, { 1, 0x0000 }, { 1, 0x0000 },
  107. { 1, 0x0000 }, { 1, 0x0000 }, { 1, 0x0000 }, { 1, 0x0000 },
  108. { 1, 0x0800 }, { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 },
  109. { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 },
  110. /* 0x3d00 */
  111. { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 },
  112. { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 },
  113. { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 }, { 2, 0x0000 },
  114. { 2, 0x0200 }, { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 },
  115. /* 0x3e00 */
  116. { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 },
  117. { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 },
  118. { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 }, { 3, 0x0000 },
  119. { 3, 0x0000 }, { 3, 0x0800 },
  120. };
  121. static const Summary16 hkscs2001_uni2indx_page40[8] = {
  122. /* 0x4000 */
  123. { 4, 0x0200 }, { 5, 0x0000 }, { 5, 0x0000 }, { 5, 0x0000 },
  124. { 5, 0x0000 }, { 5, 0x0000 }, { 5, 0x0000 }, { 5, 0x0002 },
  125. };
  126. static const Summary16 hkscs2001_uni2indx_page42[11] = {
  127. /* 0x4200 */
  128. { 6, 0x0000 }, { 6, 0x0000 }, { 6, 0x0008 }, { 7, 0x0000 },
  129. { 7, 0x0000 }, { 7, 0x0000 }, { 7, 0x0000 }, { 7, 0x0040 },
  130. { 8, 0x0000 }, { 8, 0x0000 }, { 8, 0x0004 },
  131. };
  132. static const Summary16 hkscs2001_uni2indx_page4b[25] = {
  133. /* 0x4b00 */
  134. { 9, 0x0000 }, { 9, 0x0001 }, { 10, 0x0001 }, { 11, 0x0000 },
  135. { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 },
  136. { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 },
  137. { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 },
  138. /* 0x4c00 */
  139. { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 },
  140. { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 }, { 11, 0x0000 },
  141. { 11, 0x0002 },
  142. };
  143. static const Summary16 hkscs2001_uni2indx_page4e[59] = {
  144. /* 0x4e00 */
  145. { 12, 0x0000 }, { 12, 0x0000 }, { 12, 0x8000 }, { 13, 0x0000 },
  146. { 13, 0x0000 }, { 13, 0x0000 }, { 13, 0x0000 }, { 13, 0x0000 },
  147. { 13, 0x0000 }, { 13, 0x0000 }, { 13, 0x0008 }, { 14, 0x0000 },
  148. { 14, 0x0000 }, { 14, 0x0000 }, { 14, 0x0000 }, { 14, 0x0000 },
  149. /* 0x4f00 */
  150. { 14, 0x0000 }, { 14, 0x0080 }, { 15, 0x0000 }, { 15, 0x0000 },
  151. { 15, 0x0000 }, { 15, 0x0000 }, { 15, 0x0000 }, { 15, 0x0000 },
  152. { 15, 0x0000 }, { 15, 0x0000 }, { 15, 0x0000 }, { 15, 0x0000 },
  153. { 15, 0x0000 }, { 15, 0x0000 }, { 15, 0x0000 }, { 15, 0x0001 },
  154. /* 0x5000 */
  155. { 16, 0x0000 }, { 16, 0x0000 }, { 16, 0x0000 }, { 16, 0x0800 },
  156. { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x0000 },
  157. { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x0000 }, { 17, 0x1000 },
  158. { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x0000 },
  159. /* 0x5100 */
  160. { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x0000 },
  161. { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x0000 },
  162. { 18, 0x0000 }, { 18, 0x0000 }, { 18, 0x4000 },
  163. };
  164. static const Summary16 hkscs2001_uni2indx_page53[20] = {
  165. /* 0x5300 */
  166. { 19, 0x0000 }, { 19, 0x0000 }, { 19, 0x0010 }, { 20, 0x0000 },
  167. { 20, 0x0000 }, { 20, 0x0000 }, { 20, 0x0000 }, { 20, 0x0000 },
  168. { 20, 0x0000 }, { 20, 0x0000 }, { 20, 0x0000 }, { 20, 0x0000 },
  169. { 20, 0x0000 }, { 20, 0x0000 }, { 20, 0x0000 }, { 20, 0x0000 },
  170. /* 0x5400 */
  171. { 20, 0x0000 }, { 20, 0x0000 }, { 20, 0x0000 }, { 20, 0x0010 },
  172. };
  173. static const Summary16 hkscs2001_uni2indx_page57[30] = {
  174. /* 0x5700 */
  175. { 21, 0x0000 }, { 21, 0x0000 }, { 21, 0x0000 }, { 21, 0x2000 },
  176. { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 },
  177. { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 },
  178. { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 },
  179. /* 0x5800 */
  180. { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 },
  181. { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 }, { 22, 0x0000 },
  182. { 22, 0x0000 }, { 22, 0x0004 }, { 23, 0x0000 }, { 23, 0x0000 },
  183. { 23, 0x0000 }, { 23, 0x0001 },
  184. };
  185. static const Summary16 hkscs2001_uni2indx_page5a[93] = {
  186. /* 0x5a00 */
  187. { 24, 0x0000 }, { 24, 0x0400 }, { 25, 0x0000 }, { 25, 0x0000 },
  188. { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 },
  189. { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 },
  190. { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 },
  191. /* 0x5b00 */
  192. { 25, 0x0000 }, { 25, 0x0020 }, { 26, 0x0000 }, { 26, 0x0000 },
  193. { 26, 0x0000 }, { 26, 0x0000 }, { 26, 0x0000 }, { 26, 0x0000 },
  194. { 26, 0x0000 }, { 26, 0x0040 }, { 27, 0x0000 }, { 27, 0x0000 },
  195. { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0000 },
  196. /* 0x5c00 */
  197. { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0000 },
  198. { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0000 },
  199. { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0000 },
  200. { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0000 }, { 27, 0x0020 },
  201. /* 0x5d00 */
  202. { 28, 0x0000 }, { 28, 0x0000 }, { 28, 0x0000 }, { 28, 0x0000 },
  203. { 28, 0x0000 }, { 28, 0x0000 }, { 28, 0x0000 }, { 28, 0x0800 },
  204. { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 },
  205. { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 },
  206. /* 0x5e00 */
  207. { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 },
  208. { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 }, { 29, 0x0000 },
  209. { 29, 0x0000 }, { 29, 0x0204 }, { 31, 0x0000 }, { 31, 0x0000 },
  210. { 31, 0x0000 }, { 31, 0x0000 }, { 31, 0x0000 }, { 31, 0x0000 },
  211. /* 0x5f00 */
  212. { 31, 0x0000 }, { 31, 0x0000 }, { 31, 0x0000 }, { 31, 0x0000 },
  213. { 31, 0x0000 }, { 31, 0x0000 }, { 31, 0x0000 }, { 31, 0x0000 },
  214. { 31, 0x0000 }, { 31, 0x0000 }, { 31, 0x0000 }, { 31, 0x0000 },
  215. { 31, 0x0004 },
  216. };
  217. static const Summary16 hkscs2001_uni2indx_page61[3] = {
  218. /* 0x6100 */
  219. { 32, 0x0000 }, { 32, 0x0000 }, { 32, 0x0004 },
  220. };
  221. static const Summary16 hkscs2001_uni2indx_page65[9] = {
  222. /* 0x6500 */
  223. { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 },
  224. { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 },
  225. { 33, 0x0800 },
  226. };
  227. static const Summary16 hkscs2001_uni2indx_page67[7] = {
  228. /* 0x6700 */
  229. { 34, 0x0000 }, { 34, 0x0200 }, { 35, 0x0000 }, { 35, 0x0000 },
  230. { 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0800 },
  231. };
  232. static const Summary16 hkscs2001_uni2indx_page69[23] = {
  233. /* 0x6900 */
  234. { 36, 0x0000 }, { 36, 0x0200 }, { 37, 0x0000 }, { 37, 0x0000 },
  235. { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 },
  236. { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 },
  237. { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 },
  238. /* 0x6a00 */
  239. { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 }, { 37, 0x0000 },
  240. { 37, 0x0008 }, { 38, 0x0000 }, { 38, 0x0008 },
  241. };
  242. static const Summary16 hkscs2001_uni2indx_page6c[32] = {
  243. /* 0x6c00 */
  244. { 39, 0x0000 }, { 39, 0x0000 }, { 39, 0x0000 }, { 39, 0x0000 },
  245. { 39, 0x0000 }, { 39, 0x0000 }, { 39, 0x0000 }, { 39, 0x0000 },
  246. { 39, 0x0000 }, { 39, 0x0000 }, { 39, 0x0000 }, { 39, 0x0000 },
  247. { 39, 0x0000 }, { 39, 0x0000 }, { 39, 0x0000 }, { 39, 0x8000 },
  248. /* 0x6d00 */
  249. { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x0000 },
  250. { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x0000 },
  251. { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x0000 },
  252. { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x0000 }, { 40, 0x4000 },
  253. };
  254. static const Summary16 hkscs2001_uni2indx_page70[76] = {
  255. /* 0x7000 */
  256. { 41, 0x0000 }, { 41, 0x0000 }, { 41, 0x0000 }, { 41, 0x0000 },
  257. { 41, 0x2000 }, { 42, 0x0000 }, { 42, 0x0000 }, { 42, 0x0080 },
  258. { 43, 0x0000 }, { 43, 0x0000 }, { 43, 0x0000 }, { 43, 0x0000 },
  259. { 43, 0x0000 }, { 43, 0x0000 }, { 43, 0x0000 }, { 43, 0x0000 },
  260. /* 0x7100 */
  261. { 43, 0x0000 }, { 43, 0x0000 }, { 43, 0x0000 }, { 43, 0x0000 },
  262. { 43, 0x0000 }, { 43, 0x0000 }, { 43, 0x0000 }, { 43, 0x0000 },
  263. { 43, 0x0000 }, { 43, 0x0002 }, { 44, 0x0000 }, { 44, 0x0000 },
  264. { 44, 0x0000 }, { 44, 0x0000 }, { 44, 0x0000 }, { 44, 0x0000 },
  265. /* 0x7200 */
  266. { 44, 0x0001 }, { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 },
  267. { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 },
  268. { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 },
  269. { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 },
  270. /* 0x7300 */
  271. { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 },
  272. { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 }, { 45, 0x0000 },
  273. { 45, 0x1000 }, { 46, 0x0000 }, { 46, 0x0000 }, { 46, 0x0400 },
  274. { 47, 0x0000 }, { 47, 0x0000 }, { 47, 0x0000 }, { 47, 0x0000 },
  275. /* 0x7400 */
  276. { 47, 0x0004 }, { 48, 0x0000 }, { 48, 0x0000 }, { 48, 0x0000 },
  277. { 48, 0x0000 }, { 48, 0x0000 }, { 48, 0x0000 }, { 48, 0x0000 },
  278. { 48, 0x0000 }, { 48, 0x0000 }, { 48, 0x0000 }, { 48, 0x0200 },
  279. };
  280. static const Summary16 hkscs2001_uni2indx_page76[47] = {
  281. /* 0x7600 */
  282. { 49, 0x0000 }, { 49, 0x0000 }, { 49, 0x0000 }, { 49, 0x0000 },
  283. { 49, 0x0000 }, { 49, 0x0000 }, { 49, 0x0000 }, { 49, 0x0000 },
  284. { 49, 0x0000 }, { 49, 0x0000 }, { 49, 0x0000 }, { 49, 0x0000 },
  285. { 49, 0x0000 }, { 49, 0x0200 }, { 50, 0x0000 }, { 50, 0x0000 },
  286. /* 0x7700 */
  287. { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 },
  288. { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 },
  289. { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 }, { 50, 0x0000 },
  290. { 50, 0x0000 }, { 50, 0x2000 }, { 51, 0x0000 }, { 51, 0x0000 },
  291. /* 0x7800 */
  292. { 51, 0x0000 }, { 51, 0x0000 }, { 51, 0x0000 }, { 51, 0x0000 },
  293. { 51, 0x0000 }, { 51, 0x0000 }, { 51, 0x0000 }, { 51, 0x0000 },
  294. { 51, 0x0000 }, { 51, 0x0000 }, { 51, 0x0000 }, { 51, 0x0000 },
  295. { 51, 0x0000 }, { 51, 0x0000 }, { 51, 0x0010 },
  296. };
  297. static const Summary16 hkscs2001_uni2indx_page7a[71] = {
  298. /* 0x7a00 */
  299. { 52, 0x0000 }, { 52, 0x0000 }, { 52, 0x0400 }, { 53, 0x0000 },
  300. { 53, 0x0000 }, { 53, 0x0000 }, { 53, 0x0000 }, { 53, 0x0000 },
  301. { 53, 0x0000 }, { 53, 0x0008 }, { 54, 0x0000 }, { 54, 0x0000 },
  302. { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 },
  303. /* 0x7b00 */
  304. { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 },
  305. { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 },
  306. { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x0000 },
  307. { 54, 0x0000 }, { 54, 0x0000 }, { 54, 0x1000 }, { 55, 0x0000 },
  308. /* 0x7c00 */
  309. { 55, 0x0000 }, { 55, 0x0000 }, { 55, 0x0000 }, { 55, 0x0000 },
  310. { 55, 0x0000 }, { 55, 0x0000 }, { 55, 0x0000 }, { 55, 0x0000 },
  311. { 55, 0x0000 }, { 55, 0x0000 }, { 55, 0x0000 }, { 55, 0x0000 },
  312. { 55, 0x0008 }, { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 },
  313. /* 0x7d00 */
  314. { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 },
  315. { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 }, { 56, 0x0000 },
  316. { 56, 0x0800 }, { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 },
  317. { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 },
  318. /* 0x7e00 */
  319. { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 }, { 57, 0x0000 },
  320. { 57, 0x0000 }, { 57, 0x0800 }, { 58, 0x1000 },
  321. };
  322. static const Summary16 hkscs2001_uni2indx_page82[16] = {
  323. /* 0x8200 */
  324. { 59, 0x0000 }, { 59, 0x0000 }, { 59, 0x0000 }, { 59, 0x0000 },
  325. { 59, 0x0000 }, { 59, 0x0000 }, { 59, 0x0000 }, { 59, 0x0000 },
  326. { 59, 0x0000 }, { 59, 0x0000 }, { 59, 0x0000 }, { 59, 0x8000 },
  327. { 60, 0x0000 }, { 60, 0x0000 }, { 60, 0x0000 }, { 60, 0x0100 },
  328. };
  329. static const Summary16 hkscs2001_uni2indx_page85[17] = {
  330. /* 0x8500 */
  331. { 61, 0x0000 }, { 61, 0x0000 }, { 61, 0x0000 }, { 61, 0x0000 },
  332. { 61, 0x0000 }, { 61, 0x8000 }, { 62, 0x0000 }, { 62, 0x0000 },
  333. { 62, 0x0000 }, { 62, 0x0080 }, { 63, 0x0000 }, { 63, 0x0000 },
  334. { 63, 0x0000 }, { 63, 0x0040 }, { 64, 0x0000 }, { 64, 0x0000 },
  335. /* 0x8600 */
  336. { 64, 0x8000 },
  337. };
  338. static const Summary16 hkscs2001_uni2indx_page88[10] = {
  339. /* 0x8800 */
  340. { 65, 0x0000 }, { 65, 0x0000 }, { 65, 0x0000 }, { 65, 0x0000 },
  341. { 65, 0x0000 }, { 65, 0x0000 }, { 65, 0x0000 }, { 65, 0x0000 },
  342. { 65, 0x8000 }, { 66, 0x0001 },
  343. };
  344. static const Summary16 hkscs2001_uni2indx_page8b[9] = {
  345. /* 0x8b00 */
  346. { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 },
  347. { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 }, { 67, 0x0000 },
  348. { 67, 0x0008 },
  349. };
  350. static const Summary16 hkscs2001_uni2indx_page8e[29] = {
  351. /* 0x8e00 */
  352. { 68, 0x0000 }, { 68, 0x0000 }, { 68, 0x0000 }, { 68, 0x0000 },
  353. { 68, 0x0000 }, { 68, 0x0000 }, { 68, 0x0000 }, { 68, 0x0000 },
  354. { 68, 0x0000 }, { 68, 0x0000 }, { 68, 0x0000 }, { 68, 0x0200 },
  355. { 69, 0x0000 }, { 69, 0x0000 }, { 69, 0x0000 }, { 69, 0x0000 },
  356. /* 0x8f00 */
  357. { 69, 0x0000 }, { 69, 0x0000 }, { 69, 0x0000 }, { 69, 0x0000 },
  358. { 69, 0x0000 }, { 69, 0x0000 }, { 69, 0x0000 }, { 69, 0x0000 },
  359. { 69, 0x0000 }, { 69, 0x0000 }, { 69, 0x0080 }, { 70, 0x0000 },
  360. { 70, 0x8000 },
  361. };
  362. static const Summary16 hkscs2001_uni2indx_page91[48] = {
  363. /* 0x9100 */
  364. { 71, 0x0000 }, { 71, 0x0000 }, { 71, 0x0000 }, { 71, 0x0000 },
  365. { 71, 0x0000 }, { 71, 0x0000 }, { 71, 0x0000 }, { 71, 0x0000 },
  366. { 71, 0x0000 }, { 71, 0x0000 }, { 71, 0x0000 }, { 71, 0x0000 },
  367. { 71, 0x0000 }, { 71, 0x0000 }, { 71, 0x0000 }, { 71, 0x0040 },
  368. /* 0x9200 */
  369. { 72, 0x0000 }, { 72, 0x0000 }, { 72, 0x0002 }, { 73, 0x0000 },
  370. { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 },
  371. { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 },
  372. { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 },
  373. /* 0x9300 */
  374. { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 },
  375. { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 },
  376. { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 },
  377. { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0000 }, { 73, 0x0010 },
  378. };
  379. static const Summary16 hkscs2001_uni2indx_page97[47] = {
  380. /* 0x9700 */
  381. { 74, 0x0000 }, { 74, 0x0000 }, { 74, 0x0000 }, { 74, 0x0000 },
  382. { 74, 0x0000 }, { 74, 0x0020 }, { 75, 0x0000 }, { 75, 0x0000 },
  383. { 75, 0x0000 }, { 75, 0x0000 }, { 75, 0x0000 }, { 75, 0x0000 },
  384. { 75, 0x0000 }, { 75, 0x0000 }, { 75, 0x0000 }, { 75, 0x0000 },
  385. /* 0x9800 */
  386. { 75, 0x0000 }, { 75, 0x0000 }, { 75, 0x0000 }, { 75, 0x0000 },
  387. { 75, 0x0000 }, { 75, 0x0000 }, { 75, 0x0100 }, { 76, 0x0000 },
  388. { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 },
  389. { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 },
  390. /* 0x9900 */
  391. { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 },
  392. { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 },
  393. { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0000 },
  394. { 76, 0x0000 }, { 76, 0x0000 }, { 76, 0x0001 },
  395. };
  396. static const Summary16 hkscs2001_uni2indx_page9f[11] = {
  397. /* 0x9f00 */
  398. { 77, 0x0000 }, { 77, 0x0000 }, { 77, 0x0000 }, { 77, 0x0000 },
  399. { 77, 0x0000 }, { 77, 0x0000 }, { 77, 0x0000 }, { 77, 0x0000 },
  400. { 77, 0x0000 }, { 77, 0x0000 }, { 77, 0xffc0 },
  401. };
  402. static const Summary16 hkscs2001_uni2indx_page214[4] = {
  403. /* 0x21400 */
  404. { 87, 0x0000 }, { 87, 0x0000 }, { 87, 0x0000 }, { 87, 0x8000 },
  405. };
  406. static const Summary16 hkscs2001_uni2indx_page219[9] = {
  407. /* 0x21900 */
  408. { 88, 0x0000 }, { 88, 0x0000 }, { 88, 0x0000 }, { 88, 0x0000 },
  409. { 88, 0x0000 }, { 88, 0x0000 }, { 88, 0x0000 }, { 88, 0x0000 },
  410. { 88, 0x0001 },
  411. };
  412. static const Summary16 hkscs2001_uni2indx_page21d[12] = {
  413. /* 0x21d00 */
  414. { 89, 0x0000 }, { 89, 0x0000 }, { 89, 0x0000 }, { 89, 0x0000 },
  415. { 89, 0x0000 }, { 89, 0x0000 }, { 89, 0x0000 }, { 89, 0x0000 },
  416. { 89, 0x0000 }, { 89, 0x0000 }, { 89, 0x0000 }, { 89, 0x0040 },
  417. };
  418. static const Summary16 hkscs2001_uni2indx_page220[8] = {
  419. /* 0x22000 */
  420. { 90, 0x0000 }, { 90, 0x0000 }, { 90, 0x0000 }, { 90, 0x0000 },
  421. { 90, 0x0000 }, { 90, 0x0000 }, { 90, 0x0000 }, { 90, 0x4000 },
  422. };
  423. static const Summary16 hkscs2001_uni2indx_page227[2] = {
  424. /* 0x22700 */
  425. { 91, 0x0000 }, { 91, 0x0004 },
  426. };
  427. static const Summary16 hkscs2001_uni2indx_page232[32] = {
  428. /* 0x23200 */
  429. { 92, 0x0000 }, { 92, 0x0000 }, { 92, 0x0000 }, { 92, 0x0000 },
  430. { 92, 0x0000 }, { 92, 0x0000 }, { 92, 0x0000 }, { 92, 0x0000 },
  431. { 92, 0x0002 }, { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 },
  432. { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 },
  433. /* 0x23300 */
  434. { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 },
  435. { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 },
  436. { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 },
  437. { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0000 }, { 93, 0x0200 },
  438. };
  439. static const Summary16 hkscs2001_uni2indx_page23c[7] = {
  440. /* 0x23c00 */
  441. { 94, 0x0000 }, { 94, 0x0000 }, { 94, 0x0000 }, { 94, 0x0000 },
  442. { 94, 0x0000 }, { 94, 0x0000 }, { 94, 0x0008 },
  443. };
  444. static const Summary16 hkscs2001_uni2indx_page241[5] = {
  445. /* 0x24100 */
  446. { 95, 0x0000 }, { 95, 0x0000 }, { 95, 0x0000 }, { 95, 0x0000 },
  447. { 95, 0x4000 },
  448. };
  449. static const Summary16 hkscs2001_uni2indx_page245[1] = {
  450. /* 0x24500 */
  451. { 96, 0x0020 },
  452. };
  453. static const Summary16 hkscs2001_uni2indx_page249[18] = {
  454. /* 0x24900 */
  455. { 97, 0x0000 }, { 97, 0x0000 }, { 97, 0x0000 }, { 97, 0x0000 },
  456. { 97, 0x0000 }, { 97, 0x0000 }, { 97, 0x0000 }, { 97, 0x0800 },
  457. { 98, 0x0000 }, { 98, 0x0000 }, { 98, 0x0000 }, { 98, 0x0000 },
  458. { 98, 0x0000 }, { 98, 0x0000 }, { 98, 0x0000 }, { 98, 0x0000 },
  459. /* 0x24a00 */
  460. { 98, 0x0000 }, { 98, 0x0008 },
  461. };
  462. static const Summary16 hkscs2001_uni2indx_page251[13] = {
  463. /* 0x25100 */
  464. { 99, 0x0000 }, { 99, 0x0000 }, { 99, 0x0000 }, { 99, 0x0000 },
  465. { 99, 0x0000 }, { 99, 0x0000 }, { 99, 0x0000 }, { 99, 0x0000 },
  466. { 99, 0x0000 }, { 99, 0x0000 }, { 99, 0x0000 }, { 99, 0x0000 },
  467. { 99, 0x2000 },
  468. };
  469. static const Summary16 hkscs2001_uni2indx_page256[10] = {
  470. /* 0x25600 */
  471. { 100, 0x0000 }, { 100, 0x0000 }, { 100, 0x0000 }, { 100, 0x0000 },
  472. { 100, 0x0000 }, { 100, 0x0000 }, { 100, 0x0000 }, { 100, 0x0000 },
  473. { 100, 0x0000 }, { 100, 0x0020 },
  474. };
  475. static const Summary16 hkscs2001_uni2indx_page25c[20] = {
  476. /* 0x25c00 */
  477. { 101, 0x0000 }, { 101, 0x0000 }, { 101, 0x0000 }, { 101, 0x0000 },
  478. { 101, 0x0000 }, { 101, 0x0000 }, { 101, 0x0000 }, { 101, 0x0000 },
  479. { 101, 0x0000 }, { 101, 0x0000 }, { 101, 0x0010 }, { 102, 0x0000 },
  480. { 102, 0x0000 }, { 102, 0x0000 }, { 102, 0x0000 }, { 102, 0x0000 },
  481. /* 0x25d00 */
  482. { 102, 0x0000 }, { 102, 0x0000 }, { 102, 0x0000 }, { 102, 0x0001 },
  483. };
  484. static const Summary16 hkscs2001_uni2indx_page26b[2] = {
  485. /* 0x26b00 */
  486. { 103, 0x0000 }, { 103, 0x0020 },
  487. };
  488. static const Summary16 hkscs2001_uni2indx_page26d[8] = {
  489. /* 0x26d00 */
  490. { 104, 0x0000 }, { 104, 0x0000 }, { 104, 0x0000 }, { 104, 0x0000 },
  491. { 104, 0x0000 }, { 104, 0x0000 }, { 104, 0x0000 }, { 104, 0x0010 },
  492. };
  493. static const Summary16 hkscs2001_uni2indx_page26f[12] = {
  494. /* 0x26f00 */
  495. { 105, 0x0000 }, { 105, 0x0000 }, { 105, 0x0000 }, { 105, 0x0000 },
  496. { 105, 0x0000 }, { 105, 0x0000 }, { 105, 0x0000 }, { 105, 0x0000 },
  497. { 105, 0x0000 }, { 105, 0x0000 }, { 105, 0x0000 }, { 105, 0x4000 },
  498. };
  499. static const Summary16 hkscs2001_uni2indx_page271[1] = {
  500. /* 0x27100 */
  501. { 106, 0x2000 },
  502. };
  503. static const Summary16 hkscs2001_uni2indx_page287[1] = {
  504. /* 0x28700 */
  505. { 107, 0x8000 },
  506. };
  507. static const Summary16 hkscs2001_uni2indx_page289[31] = {
  508. /* 0x28900 */
  509. { 108, 0x0000 }, { 108, 0x0000 }, { 108, 0x0000 }, { 108, 0x0000 },
  510. { 108, 0x0000 }, { 108, 0x0000 }, { 108, 0x0000 }, { 108, 0x0000 },
  511. { 108, 0x0000 }, { 108, 0x0000 }, { 108, 0x0000 }, { 108, 0x0000 },
  512. { 108, 0x0000 }, { 108, 0x0000 }, { 108, 0x0008 }, { 109, 0x0000 },
  513. /* 0x28a00 */
  514. { 109, 0x0000 }, { 109, 0x0000 }, { 109, 0x0000 }, { 109, 0x0004 },
  515. { 110, 0x0000 }, { 110, 0x0000 }, { 110, 0x0000 }, { 110, 0x0000 },
  516. { 110, 0x0000 }, { 110, 0x0000 }, { 110, 0x0000 }, { 110, 0x0000 },
  517. { 110, 0x0000 }, { 110, 0x0000 }, { 110, 0x0400 },
  518. };
  519. static const Summary16 hkscs2001_uni2indx_page28d[12] = {
  520. /* 0x28d00 */
  521. { 111, 0x0000 }, { 111, 0x0000 }, { 111, 0x0000 }, { 111, 0x0000 },
  522. { 111, 0x0000 }, { 111, 0x0000 }, { 111, 0x0000 }, { 111, 0x0000 },
  523. { 111, 0x0000 }, { 111, 0x0000 }, { 111, 0x0000 }, { 111, 0x0200 },
  524. };
  525. static const Summary16 hkscs2001_uni2indx_page299[5] = {
  526. /* 0x29900 */
  527. { 112, 0x0000 }, { 112, 0x0000 }, { 112, 0x0000 }, { 112, 0x0000 },
  528. { 112, 0x0080 },
  529. };
  530. static const Summary16 hkscs2001_uni2indx_page29c[8] = {
  531. /* 0x29c00 */
  532. { 113, 0x0000 }, { 113, 0x0000 }, { 113, 0x0000 }, { 113, 0x0000 },
  533. { 113, 0x0000 }, { 113, 0x0000 }, { 113, 0x0000 }, { 113, 0x0008 },
  534. };
  535. static const Summary16 hkscs2001_uni2indx_page2a1[28] = {
  536. /* 0x2a100 */
  537. { 114, 0x0080 }, { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 },
  538. { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 },
  539. { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 },
  540. { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 },
  541. /* 0x2a200 */
  542. { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 },
  543. { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 },
  544. { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0000 }, { 115, 0x0400 },
  545. };
  546. static int
  547. hkscs2001_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
  548. {
  549. if (n >= 2) {
  550. const Summary16 *summary = NULL;
  551. if (wc < 0x9f00) {
  552. if (wc < 0x6900) {
  553. if (wc >= 0x3500 && wc < 0x3560)
  554. summary = &hkscs2001_uni2indx_page35[(wc>>4)-0x350];
  555. else if (wc >= 0x3c00 && wc < 0x3ee0)
  556. summary = &hkscs2001_uni2indx_page3c[(wc>>4)-0x3c0];
  557. else if (wc >= 0x4000 && wc < 0x4080)
  558. summary = &hkscs2001_uni2indx_page40[(wc>>4)-0x400];
  559. else if (wc >= 0x4200 && wc < 0x42b0)
  560. summary = &hkscs2001_uni2indx_page42[(wc>>4)-0x420];
  561. else if (wc >= 0x4b00 && wc < 0x4c90)
  562. summary = &hkscs2001_uni2indx_page4b[(wc>>4)-0x4b0];
  563. else if (wc >= 0x4e00 && wc < 0x51b0)
  564. summary = &hkscs2001_uni2indx_page4e[(wc>>4)-0x4e0];
  565. else if (wc >= 0x5300 && wc < 0x5440)
  566. summary = &hkscs2001_uni2indx_page53[(wc>>4)-0x530];
  567. else if (wc >= 0x5700 && wc < 0x58e0)
  568. summary = &hkscs2001_uni2indx_page57[(wc>>4)-0x570];
  569. else if (wc >= 0x5a00 && wc < 0x5fd0)
  570. summary = &hkscs2001_uni2indx_page5a[(wc>>4)-0x5a0];
  571. else if (wc >= 0x6100 && wc < 0x6130)
  572. summary = &hkscs2001_uni2indx_page61[(wc>>4)-0x610];
  573. else if (wc >= 0x6500 && wc < 0x6590)
  574. summary = &hkscs2001_uni2indx_page65[(wc>>4)-0x650];
  575. else if (wc >= 0x6700 && wc < 0x6770)
  576. summary = &hkscs2001_uni2indx_page67[(wc>>4)-0x670];
  577. } else {
  578. if (wc >= 0x6900 && wc < 0x6a70)
  579. summary = &hkscs2001_uni2indx_page69[(wc>>4)-0x690];
  580. else if (wc >= 0x6c00 && wc < 0x6e00)
  581. summary = &hkscs2001_uni2indx_page6c[(wc>>4)-0x6c0];
  582. else if (wc >= 0x7000 && wc < 0x74c0)
  583. summary = &hkscs2001_uni2indx_page70[(wc>>4)-0x700];
  584. else if (wc >= 0x7600 && wc < 0x78f0)
  585. summary = &hkscs2001_uni2indx_page76[(wc>>4)-0x760];
  586. else if (wc >= 0x7a00 && wc < 0x7e70)
  587. summary = &hkscs2001_uni2indx_page7a[(wc>>4)-0x7a0];
  588. else if (wc >= 0x8200 && wc < 0x8300)
  589. summary = &hkscs2001_uni2indx_page82[(wc>>4)-0x820];
  590. else if (wc >= 0x8500 && wc < 0x8610)
  591. summary = &hkscs2001_uni2indx_page85[(wc>>4)-0x850];
  592. else if (wc >= 0x8800 && wc < 0x88a0)
  593. summary = &hkscs2001_uni2indx_page88[(wc>>4)-0x880];
  594. else if (wc >= 0x8b00 && wc < 0x8b90)
  595. summary = &hkscs2001_uni2indx_page8b[(wc>>4)-0x8b0];
  596. else if (wc >= 0x8e00 && wc < 0x8fd0)
  597. summary = &hkscs2001_uni2indx_page8e[(wc>>4)-0x8e0];
  598. else if (wc >= 0x9100 && wc < 0x9400)
  599. summary = &hkscs2001_uni2indx_page91[(wc>>4)-0x910];
  600. else if (wc >= 0x9700 && wc < 0x99f0)
  601. summary = &hkscs2001_uni2indx_page97[(wc>>4)-0x970];
  602. }
  603. } else {
  604. if (wc < 0x25600) {
  605. if (wc >= 0x9f00 && wc < 0x9fb0)
  606. summary = &hkscs2001_uni2indx_page9f[(wc>>4)-0x9f0];
  607. else if (wc >= 0x21400 && wc < 0x21440)
  608. summary = &hkscs2001_uni2indx_page214[(wc>>4)-0x2140];
  609. else if (wc >= 0x21900 && wc < 0x21990)
  610. summary = &hkscs2001_uni2indx_page219[(wc>>4)-0x2190];
  611. else if (wc >= 0x21d00 && wc < 0x21dc0)
  612. summary = &hkscs2001_uni2indx_page21d[(wc>>4)-0x21d0];
  613. else if (wc >= 0x22000 && wc < 0x22080)
  614. summary = &hkscs2001_uni2indx_page220[(wc>>4)-0x2200];
  615. else if (wc >= 0x22700 && wc < 0x22720)
  616. summary = &hkscs2001_uni2indx_page227[(wc>>4)-0x2270];
  617. else if (wc >= 0x23200 && wc < 0x23400)
  618. summary = &hkscs2001_uni2indx_page232[(wc>>4)-0x2320];
  619. else if (wc >= 0x23c00 && wc < 0x23c70)
  620. summary = &hkscs2001_uni2indx_page23c[(wc>>4)-0x23c0];
  621. else if (wc >= 0x24100 && wc < 0x24150)
  622. summary = &hkscs2001_uni2indx_page241[(wc>>4)-0x2410];
  623. else if (wc >= 0x24500 && wc < 0x24510)
  624. summary = &hkscs2001_uni2indx_page245[(wc>>4)-0x2450];
  625. else if (wc >= 0x24900 && wc < 0x24a20)
  626. summary = &hkscs2001_uni2indx_page249[(wc>>4)-0x2490];
  627. else if (wc >= 0x25100 && wc < 0x251d0)
  628. summary = &hkscs2001_uni2indx_page251[(wc>>4)-0x2510];
  629. } else {
  630. if (wc >= 0x25600 && wc < 0x256a0)
  631. summary = &hkscs2001_uni2indx_page256[(wc>>4)-0x2560];
  632. else if (wc >= 0x25c00 && wc < 0x25d40)
  633. summary = &hkscs2001_uni2indx_page25c[(wc>>4)-0x25c0];
  634. else if (wc >= 0x26b00 && wc < 0x26b20)
  635. summary = &hkscs2001_uni2indx_page26b[(wc>>4)-0x26b0];
  636. else if (wc >= 0x26d00 && wc < 0x26d80)
  637. summary = &hkscs2001_uni2indx_page26d[(wc>>4)-0x26d0];
  638. else if (wc >= 0x26f00 && wc < 0x26fc0)
  639. summary = &hkscs2001_uni2indx_page26f[(wc>>4)-0x26f0];
  640. else if (wc >= 0x27100 && wc < 0x27110)
  641. summary = &hkscs2001_uni2indx_page271[(wc>>4)-0x2710];
  642. else if (wc >= 0x28700 && wc < 0x28710)
  643. summary = &hkscs2001_uni2indx_page287[(wc>>4)-0x2870];
  644. else if (wc >= 0x28900 && wc < 0x28af0)
  645. summary = &hkscs2001_uni2indx_page289[(wc>>4)-0x2890];
  646. else if (wc >= 0x28d00 && wc < 0x28dc0)
  647. summary = &hkscs2001_uni2indx_page28d[(wc>>4)-0x28d0];
  648. else if (wc >= 0x29900 && wc < 0x29950)
  649. summary = &hkscs2001_uni2indx_page299[(wc>>4)-0x2990];
  650. else if (wc >= 0x29c00 && wc < 0x29c80)
  651. summary = &hkscs2001_uni2indx_page29c[(wc>>4)-0x29c0];
  652. else if (wc >= 0x2a100 && wc < 0x2a2c0)
  653. summary = &hkscs2001_uni2indx_page2a1[(wc>>4)-0x2a10];
  654. }
  655. }
  656. if (summary) {
  657. unsigned short used = summary->used;
  658. unsigned int i = wc & 0x0f;
  659. if (used & ((unsigned short) 1 << i)) {
  660. unsigned short c;
  661. /* Keep in `used' only the bits 0..i-1. */
  662. used &= ((unsigned short) 1 << i) - 1;
  663. /* Add `summary->indx' and the number of bits set in `used'. */
  664. used = (used & 0x5555) + ((used & 0xaaaa) >> 1);
  665. used = (used & 0x3333) + ((used & 0xcccc) >> 2);
  666. used = (used & 0x0f0f) + ((used & 0xf0f0) >> 4);
  667. used = (used & 0x00ff) + (used >> 8);
  668. c = hkscs2001_2charset[summary->indx + used];
  669. r[0] = (c >> 8); r[1] = (c & 0xff);
  670. return 2;
  671. }
  672. }
  673. return RET_ILUNI;
  674. }
  675. return RET_TOOSMALL;
  676. }