pango 2.2.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (530) hide show
  1. checksums.yaml +7 -0
  2. data/README +33 -0
  3. data/Rakefile +65 -0
  4. data/ext/pango/depend +12 -0
  5. data/ext/pango/extconf.rb +90 -0
  6. data/ext/pango/pango.def +18 -0
  7. data/ext/pango/rbpango.c +318 -0
  8. data/ext/pango/rbpango.h +96 -0
  9. data/ext/pango/rbpangoanalysis.c +218 -0
  10. data/ext/pango/rbpangoattribute.c +499 -0
  11. data/ext/pango/rbpangoattriterator.c +141 -0
  12. data/ext/pango/rbpangoattrlist.c +101 -0
  13. data/ext/pango/rbpangocairo.c +122 -0
  14. data/ext/pango/rbpangocairocontext.c +131 -0
  15. data/ext/pango/rbpangocolor.c +120 -0
  16. data/ext/pango/rbpangocontext.c +309 -0
  17. data/ext/pango/rbpangoconversions.h +111 -0
  18. data/ext/pango/rbpangocoverage.c +106 -0
  19. data/ext/pango/rbpangoengine.c +73 -0
  20. data/ext/pango/rbpangofont.c +110 -0
  21. data/ext/pango/rbpangofontdescription.c +282 -0
  22. data/ext/pango/rbpangofontface.c +73 -0
  23. data/ext/pango/rbpangofontfamily.c +79 -0
  24. data/ext/pango/rbpangofontmap.c +102 -0
  25. data/ext/pango/rbpangofontmetrics.c +85 -0
  26. data/ext/pango/rbpangofontset.c +69 -0
  27. data/ext/pango/rbpangofontsetsimple.c +60 -0
  28. data/ext/pango/rbpangoglyphinfo.c +123 -0
  29. data/ext/pango/rbpangoglyphitem.c +125 -0
  30. data/ext/pango/rbpangoglyphstring.c +151 -0
  31. data/ext/pango/rbpangogravity.c +54 -0
  32. data/ext/pango/rbpangoitem.c +95 -0
  33. data/ext/pango/rbpangolanguage.c +86 -0
  34. data/ext/pango/rbpangolayout.c +572 -0
  35. data/ext/pango/rbpangolayoutiter.c +189 -0
  36. data/ext/pango/rbpangolayoutline.c +239 -0
  37. data/ext/pango/rbpangologattr.c +109 -0
  38. data/ext/pango/rbpangomatrix.c +143 -0
  39. data/ext/pango/rbpangoprivate.h +49 -0
  40. data/ext/pango/rbpangorectangle.c +170 -0
  41. data/ext/pango/rbpangorenderer.c +193 -0
  42. data/ext/pango/rbpangoscript.c +84 -0
  43. data/ext/pango/rbpangoscriptiter.c +92 -0
  44. data/ext/pango/rbpangotabarray.c +128 -0
  45. data/extconf.rb +49 -0
  46. data/lib/2.0/pango.so +0 -0
  47. data/lib/2.1/pango.so +0 -0
  48. data/lib/2.2/pango.so +0 -0
  49. data/lib/pango.rb +79 -0
  50. data/sample/attribute.rb +82 -0
  51. data/sample/break.rb +28 -0
  52. data/sample/gdk_layout.rb +27 -0
  53. data/sample/glyphstring.rb +61 -0
  54. data/sample/item.rb +37 -0
  55. data/sample/label.rb +23 -0
  56. data/sample/layout.rb +102 -0
  57. data/sample/pango_cairo.rb +66 -0
  58. data/sample/parse.rb +33 -0
  59. data/sample/sample.txt +10 -0
  60. data/sample/script.rb +23 -0
  61. data/test/pango-test-utils.rb +9 -0
  62. data/test/run-test.rb +28 -0
  63. data/test/test-analysis.rb +26 -0
  64. data/test/test-attribute.rb +19 -0
  65. data/test/test-color.rb +47 -0
  66. data/test/test-language.rb +7 -0
  67. data/test/test-layout.rb +34 -0
  68. data/test/test-log-attr.rb +26 -0
  69. data/test/test-matrix.rb +26 -0
  70. data/test/test-rectangle.rb +26 -0
  71. data/vendor/local/bin/derb.exe +0 -0
  72. data/vendor/local/bin/genbrk.exe +0 -0
  73. data/vendor/local/bin/genccode.exe +0 -0
  74. data/vendor/local/bin/gencfu.exe +0 -0
  75. data/vendor/local/bin/gencmn.exe +0 -0
  76. data/vendor/local/bin/gencnval.exe +0 -0
  77. data/vendor/local/bin/gendict.exe +0 -0
  78. data/vendor/local/bin/gennorm2.exe +0 -0
  79. data/vendor/local/bin/genrb.exe +0 -0
  80. data/vendor/local/bin/gensprep.exe +0 -0
  81. data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
  82. data/vendor/local/bin/hb-shape.exe +0 -0
  83. data/vendor/local/bin/hb-view.exe +0 -0
  84. data/vendor/local/bin/icu-config +820 -0
  85. data/vendor/local/bin/icuinfo.exe +0 -0
  86. data/vendor/local/bin/icupkg.exe +0 -0
  87. data/vendor/local/bin/libharfbuzz-0.dll +0 -0
  88. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  89. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  90. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  91. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  92. data/vendor/local/bin/makeconv.exe +0 -0
  93. data/vendor/local/bin/pango-querymodules.exe +0 -0
  94. data/vendor/local/bin/pango-view.exe +0 -0
  95. data/vendor/local/bin/pkgdata.exe +0 -0
  96. data/vendor/local/bin/uconv.exe +0 -0
  97. data/vendor/local/etc/pango/pango.modules +19 -0
  98. data/vendor/local/include/harfbuzz/hb-blob.h +126 -0
  99. data/vendor/local/include/harfbuzz/hb-buffer.h +344 -0
  100. data/vendor/local/include/harfbuzz/hb-common.h +344 -0
  101. data/vendor/local/include/harfbuzz/hb-deprecated.h +51 -0
  102. data/vendor/local/include/harfbuzz/hb-face.h +117 -0
  103. data/vendor/local/include/harfbuzz/hb-font.h +507 -0
  104. data/vendor/local/include/harfbuzz/hb-ft.h +62 -0
  105. data/vendor/local/include/harfbuzz/hb-glib.h +52 -0
  106. data/vendor/local/include/harfbuzz/hb-icu.h +52 -0
  107. data/vendor/local/include/harfbuzz/hb-ot-font.h +41 -0
  108. data/vendor/local/include/harfbuzz/hb-ot-layout.h +302 -0
  109. data/vendor/local/include/harfbuzz/hb-ot-shape.h +53 -0
  110. data/vendor/local/include/harfbuzz/hb-ot-tag.h +59 -0
  111. data/vendor/local/include/harfbuzz/hb-ot.h +43 -0
  112. data/vendor/local/include/harfbuzz/hb-set.h +154 -0
  113. data/vendor/local/include/harfbuzz/hb-shape-plan.h +89 -0
  114. data/vendor/local/include/harfbuzz/hb-shape.h +81 -0
  115. data/vendor/local/include/harfbuzz/hb-unicode.h +445 -0
  116. data/vendor/local/include/harfbuzz/hb-version.h +66 -0
  117. data/vendor/local/include/harfbuzz/hb.h +47 -0
  118. data/vendor/local/include/layout/LEFontInstance.h +550 -0
  119. data/vendor/local/include/layout/LEGlyphFilter.h +45 -0
  120. data/vendor/local/include/layout/LEGlyphStorage.h +546 -0
  121. data/vendor/local/include/layout/LEInsertionList.h +177 -0
  122. data/vendor/local/include/layout/LELanguages.h +112 -0
  123. data/vendor/local/include/layout/LEScripts.h +263 -0
  124. data/vendor/local/include/layout/LESwaps.h +100 -0
  125. data/vendor/local/include/layout/LETableReference.h +418 -0
  126. data/vendor/local/include/layout/LETypes.h +728 -0
  127. data/vendor/local/include/layout/LayoutEngine.h +518 -0
  128. data/vendor/local/include/layout/ParagraphLayout.h +747 -0
  129. data/vendor/local/include/layout/RunArrays.h +676 -0
  130. data/vendor/local/include/layout/loengine.h +225 -0
  131. data/vendor/local/include/layout/playout.h +466 -0
  132. data/vendor/local/include/layout/plruns.h +441 -0
  133. data/vendor/local/include/pango-1.0/pango/pango-attributes.h +514 -0
  134. data/vendor/local/include/pango-1.0/pango/pango-bidi-type.h +136 -0
  135. data/vendor/local/include/pango-1.0/pango/pango-break.h +173 -0
  136. data/vendor/local/include/pango-1.0/pango/pango-context.h +112 -0
  137. data/vendor/local/include/pango-1.0/pango/pango-coverage.h +79 -0
  138. data/vendor/local/include/pango-1.0/pango/pango-engine.h +429 -0
  139. data/vendor/local/include/pango-1.0/pango/pango-enum-types.h +69 -0
  140. data/vendor/local/include/pango-1.0/pango/pango-features.h +12 -0
  141. data/vendor/local/include/pango-1.0/pango/pango-font.h +622 -0
  142. data/vendor/local/include/pango-1.0/pango/pango-fontmap.h +167 -0
  143. data/vendor/local/include/pango-1.0/pango/pango-fontset.h +169 -0
  144. data/vendor/local/include/pango-1.0/pango/pango-glyph-item.h +158 -0
  145. data/vendor/local/include/pango-1.0/pango/pango-glyph.h +197 -0
  146. data/vendor/local/include/pango-1.0/pango/pango-gravity.h +128 -0
  147. data/vendor/local/include/pango-1.0/pango/pango-item.h +109 -0
  148. data/vendor/local/include/pango-1.0/pango/pango-language.h +61 -0
  149. data/vendor/local/include/pango-1.0/pango/pango-layout.h +340 -0
  150. data/vendor/local/include/pango-1.0/pango/pango-matrix.h +117 -0
  151. data/vendor/local/include/pango-1.0/pango/pango-modules.h +71 -0
  152. data/vendor/local/include/pango-1.0/pango/pango-ot.h +391 -0
  153. data/vendor/local/include/pango-1.0/pango/pango-renderer.h +260 -0
  154. data/vendor/local/include/pango-1.0/pango/pango-script.h +260 -0
  155. data/vendor/local/include/pango-1.0/pango/pango-tabs.h +87 -0
  156. data/vendor/local/include/pango-1.0/pango/pango-types.h +200 -0
  157. data/vendor/local/include/pango-1.0/pango/pango-utils.h +189 -0
  158. data/vendor/local/include/pango-1.0/pango/pango.h +48 -0
  159. data/vendor/local/include/pango-1.0/pango/pangocairo.h +169 -0
  160. data/vendor/local/include/pango-1.0/pango/pangofc-decoder.h +110 -0
  161. data/vendor/local/include/pango-1.0/pango/pangofc-font.h +153 -0
  162. data/vendor/local/include/pango-1.0/pango/pangofc-fontmap.h +289 -0
  163. data/vendor/local/include/pango-1.0/pango/pangoft2.h +133 -0
  164. data/vendor/local/include/pango-1.0/pango/pangowin32.h +128 -0
  165. data/vendor/local/include/unicode/alphaindex.h +752 -0
  166. data/vendor/local/include/unicode/appendable.h +232 -0
  167. data/vendor/local/include/unicode/basictz.h +214 -0
  168. data/vendor/local/include/unicode/brkiter.h +655 -0
  169. data/vendor/local/include/unicode/bytestream.h +257 -0
  170. data/vendor/local/include/unicode/bytestrie.h +519 -0
  171. data/vendor/local/include/unicode/bytestriebuilder.h +181 -0
  172. data/vendor/local/include/unicode/calendar.h +2519 -0
  173. data/vendor/local/include/unicode/caniter.h +208 -0
  174. data/vendor/local/include/unicode/chariter.h +722 -0
  175. data/vendor/local/include/unicode/choicfmt.h +594 -0
  176. data/vendor/local/include/unicode/coleitr.h +404 -0
  177. data/vendor/local/include/unicode/coll.h +1267 -0
  178. data/vendor/local/include/unicode/compactdecimalformat.h +330 -0
  179. data/vendor/local/include/unicode/curramt.h +130 -0
  180. data/vendor/local/include/unicode/currpinf.h +258 -0
  181. data/vendor/local/include/unicode/currunit.h +110 -0
  182. data/vendor/local/include/unicode/datefmt.h +883 -0
  183. data/vendor/local/include/unicode/dbbi.h +40 -0
  184. data/vendor/local/include/unicode/dcfmtsym.h +482 -0
  185. data/vendor/local/include/unicode/decimfmt.h +2479 -0
  186. data/vendor/local/include/unicode/docmain.h +215 -0
  187. data/vendor/local/include/unicode/dtfmtsym.h +912 -0
  188. data/vendor/local/include/unicode/dtintrv.h +158 -0
  189. data/vendor/local/include/unicode/dtitvfmt.h +985 -0
  190. data/vendor/local/include/unicode/dtitvinf.h +514 -0
  191. data/vendor/local/include/unicode/dtptngen.h +498 -0
  192. data/vendor/local/include/unicode/dtrule.h +250 -0
  193. data/vendor/local/include/unicode/enumset.h +64 -0
  194. data/vendor/local/include/unicode/errorcode.h +137 -0
  195. data/vendor/local/include/unicode/fieldpos.h +291 -0
  196. data/vendor/local/include/unicode/filteredbrk.h +131 -0
  197. data/vendor/local/include/unicode/fmtable.h +760 -0
  198. data/vendor/local/include/unicode/format.h +305 -0
  199. data/vendor/local/include/unicode/fpositer.h +117 -0
  200. data/vendor/local/include/unicode/gender.h +111 -0
  201. data/vendor/local/include/unicode/gregocal.h +777 -0
  202. data/vendor/local/include/unicode/icudataver.h +41 -0
  203. data/vendor/local/include/unicode/icuplug.h +371 -0
  204. data/vendor/local/include/unicode/idna.h +323 -0
  205. data/vendor/local/include/unicode/listformatter.h +167 -0
  206. data/vendor/local/include/unicode/localpointer.h +304 -0
  207. data/vendor/local/include/unicode/locdspnm.h +204 -0
  208. data/vendor/local/include/unicode/locid.h +815 -0
  209. data/vendor/local/include/unicode/measfmt.h +389 -0
  210. data/vendor/local/include/unicode/measunit.h +1443 -0
  211. data/vendor/local/include/unicode/measure.h +159 -0
  212. data/vendor/local/include/unicode/messagepattern.h +943 -0
  213. data/vendor/local/include/unicode/msgfmt.h +1093 -0
  214. data/vendor/local/include/unicode/normalizer2.h +658 -0
  215. data/vendor/local/include/unicode/normlzr.h +797 -0
  216. data/vendor/local/include/unicode/numfmt.h +1187 -0
  217. data/vendor/local/include/unicode/numsys.h +208 -0
  218. data/vendor/local/include/unicode/parseerr.h +92 -0
  219. data/vendor/local/include/unicode/parsepos.h +230 -0
  220. data/vendor/local/include/unicode/platform.h +751 -0
  221. data/vendor/local/include/unicode/plurfmt.h +615 -0
  222. data/vendor/local/include/unicode/plurrule.h +501 -0
  223. data/vendor/local/include/unicode/ptypes.h +126 -0
  224. data/vendor/local/include/unicode/putil.h +181 -0
  225. data/vendor/local/include/unicode/rbbi.h +782 -0
  226. data/vendor/local/include/unicode/rbnf.h +1032 -0
  227. data/vendor/local/include/unicode/rbtz.h +362 -0
  228. data/vendor/local/include/unicode/regex.h +1857 -0
  229. data/vendor/local/include/unicode/region.h +228 -0
  230. data/vendor/local/include/unicode/reldatefmt.h +498 -0
  231. data/vendor/local/include/unicode/rep.h +261 -0
  232. data/vendor/local/include/unicode/resbund.h +490 -0
  233. data/vendor/local/include/unicode/schriter.h +187 -0
  234. data/vendor/local/include/unicode/scientificformathelper.h +139 -0
  235. data/vendor/local/include/unicode/search.h +575 -0
  236. data/vendor/local/include/unicode/selfmt.h +367 -0
  237. data/vendor/local/include/unicode/simpletz.h +928 -0
  238. data/vendor/local/include/unicode/smpdtfmt.h +1592 -0
  239. data/vendor/local/include/unicode/sortkey.h +338 -0
  240. data/vendor/local/include/unicode/std_string.h +37 -0
  241. data/vendor/local/include/unicode/strenum.h +276 -0
  242. data/vendor/local/include/unicode/stringpiece.h +224 -0
  243. data/vendor/local/include/unicode/stringtriebuilder.h +402 -0
  244. data/vendor/local/include/unicode/stsearch.h +504 -0
  245. data/vendor/local/include/unicode/symtable.h +112 -0
  246. data/vendor/local/include/unicode/tblcoll.h +873 -0
  247. data/vendor/local/include/unicode/timezone.h +948 -0
  248. data/vendor/local/include/unicode/tmunit.h +129 -0
  249. data/vendor/local/include/unicode/tmutamt.h +168 -0
  250. data/vendor/local/include/unicode/tmutfmt.h +243 -0
  251. data/vendor/local/include/unicode/translit.h +1342 -0
  252. data/vendor/local/include/unicode/tzfmt.h +1098 -0
  253. data/vendor/local/include/unicode/tznames.h +404 -0
  254. data/vendor/local/include/unicode/tzrule.h +828 -0
  255. data/vendor/local/include/unicode/tztrans.h +195 -0
  256. data/vendor/local/include/unicode/ubidi.h +2186 -0
  257. data/vendor/local/include/unicode/ubrk.h +540 -0
  258. data/vendor/local/include/unicode/ucal.h +1560 -0
  259. data/vendor/local/include/unicode/ucasemap.h +423 -0
  260. data/vendor/local/include/unicode/ucat.h +158 -0
  261. data/vendor/local/include/unicode/uchar.h +3426 -0
  262. data/vendor/local/include/unicode/ucharstrie.h +576 -0
  263. data/vendor/local/include/unicode/ucharstriebuilder.h +185 -0
  264. data/vendor/local/include/unicode/uchriter.h +381 -0
  265. data/vendor/local/include/unicode/uclean.h +258 -0
  266. data/vendor/local/include/unicode/ucnv.h +2036 -0
  267. data/vendor/local/include/unicode/ucnv_cb.h +162 -0
  268. data/vendor/local/include/unicode/ucnv_err.h +463 -0
  269. data/vendor/local/include/unicode/ucnvsel.h +187 -0
  270. data/vendor/local/include/unicode/ucol.h +1474 -0
  271. data/vendor/local/include/unicode/ucoleitr.h +266 -0
  272. data/vendor/local/include/unicode/uconfig.h +430 -0
  273. data/vendor/local/include/unicode/ucsdet.h +413 -0
  274. data/vendor/local/include/unicode/ucurr.h +424 -0
  275. data/vendor/local/include/unicode/udat.h +1536 -0
  276. data/vendor/local/include/unicode/udata.h +430 -0
  277. data/vendor/local/include/unicode/udateintervalformat.h +181 -0
  278. data/vendor/local/include/unicode/udatpg.h +588 -0
  279. data/vendor/local/include/unicode/udisplaycontext.h +150 -0
  280. data/vendor/local/include/unicode/uenum.h +206 -0
  281. data/vendor/local/include/unicode/uformattable.h +280 -0
  282. data/vendor/local/include/unicode/ugender.h +82 -0
  283. data/vendor/local/include/unicode/uidna.h +762 -0
  284. data/vendor/local/include/unicode/uiter.h +707 -0
  285. data/vendor/local/include/unicode/uldnames.h +302 -0
  286. data/vendor/local/include/unicode/uloc.h +1256 -0
  287. data/vendor/local/include/unicode/ulocdata.h +277 -0
  288. data/vendor/local/include/unicode/umachine.h +356 -0
  289. data/vendor/local/include/unicode/umisc.h +60 -0
  290. data/vendor/local/include/unicode/umsg.h +623 -0
  291. data/vendor/local/include/unicode/unifilt.h +120 -0
  292. data/vendor/local/include/unicode/unifunct.h +125 -0
  293. data/vendor/local/include/unicode/unimatch.h +163 -0
  294. data/vendor/local/include/unicode/unirepl.h +97 -0
  295. data/vendor/local/include/unicode/uniset.h +1691 -0
  296. data/vendor/local/include/unicode/unistr.h +4470 -0
  297. data/vendor/local/include/unicode/unorm.h +561 -0
  298. data/vendor/local/include/unicode/unorm2.h +528 -0
  299. data/vendor/local/include/unicode/unum.h +1328 -0
  300. data/vendor/local/include/unicode/unumsys.h +170 -0
  301. data/vendor/local/include/unicode/uobject.h +320 -0
  302. data/vendor/local/include/unicode/upluralrules.h +145 -0
  303. data/vendor/local/include/unicode/uregex.h +1591 -0
  304. data/vendor/local/include/unicode/uregion.h +248 -0
  305. data/vendor/local/include/unicode/urename.h +1784 -0
  306. data/vendor/local/include/unicode/urep.h +155 -0
  307. data/vendor/local/include/unicode/ures.h +887 -0
  308. data/vendor/local/include/unicode/uscript.h +642 -0
  309. data/vendor/local/include/unicode/usearch.h +885 -0
  310. data/vendor/local/include/unicode/uset.h +1126 -0
  311. data/vendor/local/include/unicode/usetiter.h +318 -0
  312. data/vendor/local/include/unicode/ushape.h +474 -0
  313. data/vendor/local/include/unicode/uspoof.h +1064 -0
  314. data/vendor/local/include/unicode/usprep.h +269 -0
  315. data/vendor/local/include/unicode/ustdio.h +1018 -0
  316. data/vendor/local/include/unicode/ustream.h +68 -0
  317. data/vendor/local/include/unicode/ustring.h +1700 -0
  318. data/vendor/local/include/unicode/ustringtrie.h +95 -0
  319. data/vendor/local/include/unicode/utext.h +1600 -0
  320. data/vendor/local/include/unicode/utf.h +223 -0
  321. data/vendor/local/include/unicode/utf16.h +623 -0
  322. data/vendor/local/include/unicode/utf32.h +23 -0
  323. data/vendor/local/include/unicode/utf8.h +824 -0
  324. data/vendor/local/include/unicode/utf_old.h +1169 -0
  325. data/vendor/local/include/unicode/utmscale.h +481 -0
  326. data/vendor/local/include/unicode/utrace.h +359 -0
  327. data/vendor/local/include/unicode/utrans.h +658 -0
  328. data/vendor/local/include/unicode/utypes.h +723 -0
  329. data/vendor/local/include/unicode/uvernum.h +170 -0
  330. data/vendor/local/include/unicode/uversion.h +193 -0
  331. data/vendor/local/include/unicode/vtzone.h +455 -0
  332. data/vendor/local/lib/girepository-1.0/Pango-1.0.typelib +0 -0
  333. data/vendor/local/lib/girepository-1.0/PangoCairo-1.0.typelib +0 -0
  334. data/vendor/local/lib/girepository-1.0/PangoFT2-1.0.typelib +0 -0
  335. data/vendor/local/lib/icu/54.1/Makefile.inc +293 -0
  336. data/vendor/local/lib/icu/54.1/pkgdata.inc +17 -0
  337. data/vendor/local/lib/icu/Makefile.inc +293 -0
  338. data/vendor/local/lib/icu/pkgdata.inc +17 -0
  339. data/vendor/local/lib/icudt.dll +0 -0
  340. data/vendor/local/lib/icudt54.dll +0 -0
  341. data/vendor/local/lib/icuin.dll +0 -0
  342. data/vendor/local/lib/icuin54.dll +0 -0
  343. data/vendor/local/lib/icuio.dll +0 -0
  344. data/vendor/local/lib/icuio54.dll +0 -0
  345. data/vendor/local/lib/icule.dll +0 -0
  346. data/vendor/local/lib/icule54.dll +0 -0
  347. data/vendor/local/lib/iculx.dll +0 -0
  348. data/vendor/local/lib/iculx54.dll +0 -0
  349. data/vendor/local/lib/icutest.dll +0 -0
  350. data/vendor/local/lib/icutest54.dll +0 -0
  351. data/vendor/local/lib/icutu.dll +0 -0
  352. data/vendor/local/lib/icutu54.dll +0 -0
  353. data/vendor/local/lib/icuuc.dll +0 -0
  354. data/vendor/local/lib/icuuc54.dll +0 -0
  355. data/vendor/local/lib/libharfbuzz-icu.a +0 -0
  356. data/vendor/local/lib/libharfbuzz-icu.la +41 -0
  357. data/vendor/local/lib/libharfbuzz.dll.a +0 -0
  358. data/vendor/local/lib/libharfbuzz.la +41 -0
  359. data/vendor/local/lib/libicudt.dll.a +0 -0
  360. data/vendor/local/lib/libicuin.dll.a +0 -0
  361. data/vendor/local/lib/libicuio.dll.a +0 -0
  362. data/vendor/local/lib/libicule.dll.a +0 -0
  363. data/vendor/local/lib/libiculx.dll.a +0 -0
  364. data/vendor/local/lib/libicutest.dll.a +0 -0
  365. data/vendor/local/lib/libicutu.dll.a +0 -0
  366. data/vendor/local/lib/libicuuc.dll.a +0 -0
  367. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  368. data/vendor/local/lib/libpango-1.0.la +41 -0
  369. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  370. data/vendor/local/lib/libpangocairo-1.0.la +41 -0
  371. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  372. data/vendor/local/lib/libpangoft2-1.0.la +41 -0
  373. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  374. data/vendor/local/lib/libpangowin32-1.0.la +41 -0
  375. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
  376. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
  377. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +41 -0
  378. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
  379. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
  380. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +41 -0
  381. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
  382. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
  383. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +41 -0
  384. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
  385. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
  386. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +41 -0
  387. data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +13 -0
  388. data/vendor/local/lib/pkgconfig/harfbuzz.pc +11 -0
  389. data/vendor/local/lib/pkgconfig/icu-i18n.pc +38 -0
  390. data/vendor/local/lib/pkgconfig/icu-io.pc +38 -0
  391. data/vendor/local/lib/pkgconfig/icu-le.pc +38 -0
  392. data/vendor/local/lib/pkgconfig/icu-lx.pc +38 -0
  393. data/vendor/local/lib/pkgconfig/icu-uc.pc +38 -0
  394. data/vendor/local/lib/pkgconfig/pango.pc +14 -0
  395. data/vendor/local/lib/pkgconfig/pangocairo.pc +11 -0
  396. data/vendor/local/lib/pkgconfig/pangoft2.pc +12 -0
  397. data/vendor/local/lib/pkgconfig/pangowin32.pc +11 -0
  398. data/vendor/local/share/gir-1.0/Pango-1.0.gir +13329 -0
  399. data/vendor/local/share/gir-1.0/PangoCairo-1.0.gir +833 -0
  400. data/vendor/local/share/gir-1.0/PangoFT2-1.0.gir +354 -0
  401. data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +75 -0
  402. data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +1449 -0
  403. data/vendor/local/share/gtk-doc/html/harfbuzz/ch01.html +98 -0
  404. data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +46 -0
  405. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +610 -0
  406. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +1780 -0
  407. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +1337 -0
  408. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +144 -0
  409. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +99 -0
  410. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +630 -0
  411. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +2529 -0
  412. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +188 -0
  413. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +120 -0
  414. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +50 -0
  415. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +120 -0
  416. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +120 -0
  417. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +771 -0
  418. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +172 -0
  419. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +50 -0
  420. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +966 -0
  421. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +405 -0
  422. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +286 -0
  423. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +1523 -0
  424. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +100 -0
  425. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +182 -0
  426. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +50 -0
  427. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +378 -0
  428. data/vendor/local/share/gtk-doc/html/harfbuzz/home.png +0 -0
  429. data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +105 -0
  430. data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +496 -0
  431. data/vendor/local/share/gtk-doc/html/harfbuzz/left-insensitive.png +0 -0
  432. data/vendor/local/share/gtk-doc/html/harfbuzz/left.png +0 -0
  433. data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +59 -0
  434. data/vendor/local/share/gtk-doc/html/harfbuzz/right-insensitive.png +0 -0
  435. data/vendor/local/share/gtk-doc/html/harfbuzz/right.png +0 -0
  436. data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +476 -0
  437. data/vendor/local/share/gtk-doc/html/harfbuzz/up-insensitive.png +0 -0
  438. data/vendor/local/share/gtk-doc/html/harfbuzz/up.png +0 -0
  439. data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +224 -0
  440. data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +255 -0
  441. data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +246 -0
  442. data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +500 -0
  443. data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +1001 -0
  444. data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +301 -0
  445. data/vendor/local/share/gtk-doc/html/pango/PangoRenderer.html +1219 -0
  446. data/vendor/local/share/gtk-doc/html/pango/annotation-glossary.html +89 -0
  447. data/vendor/local/share/gtk-doc/html/pango/api-index-1-10.html +135 -0
  448. data/vendor/local/share/gtk-doc/html/pango/api-index-1-12.html +49 -0
  449. data/vendor/local/share/gtk-doc/html/pango/api-index-1-14.html +64 -0
  450. data/vendor/local/share/gtk-doc/html/pango/api-index-1-16.html +228 -0
  451. data/vendor/local/share/gtk-doc/html/pango/api-index-1-18.html +152 -0
  452. data/vendor/local/share/gtk-doc/html/pango/api-index-1-2.html +122 -0
  453. data/vendor/local/share/gtk-doc/html/pango/api-index-1-20.html +87 -0
  454. data/vendor/local/share/gtk-doc/html/pango/api-index-1-22.html +124 -0
  455. data/vendor/local/share/gtk-doc/html/pango/api-index-1-24.html +97 -0
  456. data/vendor/local/share/gtk-doc/html/pango/api-index-1-26.html +46 -0
  457. data/vendor/local/share/gtk-doc/html/pango/api-index-1-30.html +39 -0
  458. data/vendor/local/share/gtk-doc/html/pango/api-index-1-31-0.html +39 -0
  459. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32-4.html +53 -0
  460. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32.html +42 -0
  461. data/vendor/local/share/gtk-doc/html/pango/api-index-1-34.html +38 -0
  462. data/vendor/local/share/gtk-doc/html/pango/api-index-1-4.html +201 -0
  463. data/vendor/local/share/gtk-doc/html/pango/api-index-1-6.html +165 -0
  464. data/vendor/local/share/gtk-doc/html/pango/api-index-1-8.html +171 -0
  465. data/vendor/local/share/gtk-doc/html/pango/api-index-deprecated.html +284 -0
  466. data/vendor/local/share/gtk-doc/html/pango/api-index-full.html +2968 -0
  467. data/vendor/local/share/gtk-doc/html/pango/home.png +0 -0
  468. data/vendor/local/share/gtk-doc/html/pango/index.html +146 -0
  469. data/vendor/local/share/gtk-doc/html/pango/index.sgml +957 -0
  470. data/vendor/local/share/gtk-doc/html/pango/layout.gif +0 -0
  471. data/vendor/local/share/gtk-doc/html/pango/left-insensitive.png +0 -0
  472. data/vendor/local/share/gtk-doc/html/pango/left.png +0 -0
  473. data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +68 -0
  474. data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +514 -0
  475. data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +1632 -0
  476. data/vendor/local/share/gtk-doc/html/pango/pango-CoreText-Fonts.html +115 -0
  477. data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +508 -0
  478. data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +358 -0
  479. data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +4154 -0
  480. data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +956 -0
  481. data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +2627 -0
  482. data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +4153 -0
  483. data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +965 -0
  484. data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +331 -0
  485. data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +2202 -0
  486. data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +1430 -0
  487. data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +582 -0
  488. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +3356 -0
  489. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +2079 -0
  490. data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +325 -0
  491. data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +523 -0
  492. data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +1028 -0
  493. data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +1275 -0
  494. data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +91 -0
  495. data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +131 -0
  496. data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +786 -0
  497. data/vendor/local/share/gtk-doc/html/pango/pango.html +63 -0
  498. data/vendor/local/share/gtk-doc/html/pango/rendering.html +47 -0
  499. data/vendor/local/share/gtk-doc/html/pango/right-insensitive.png +0 -0
  500. data/vendor/local/share/gtk-doc/html/pango/right.png +0 -0
  501. data/vendor/local/share/gtk-doc/html/pango/rotated-text.png +0 -0
  502. data/vendor/local/share/gtk-doc/html/pango/style.css +476 -0
  503. data/vendor/local/share/gtk-doc/html/pango/tools.html +33 -0
  504. data/vendor/local/share/gtk-doc/html/pango/up-insensitive.png +0 -0
  505. data/vendor/local/share/gtk-doc/html/pango/up.png +0 -0
  506. data/vendor/local/share/icu/54.1/config/mh-mingw64 +158 -0
  507. data/vendor/local/share/icu/54.1/install-sh +251 -0
  508. data/vendor/local/share/icu/54.1/license.html +385 -0
  509. data/vendor/local/share/icu/54.1/mkinstalldirs +43 -0
  510. data/vendor/local/share/license/harfbuzz/AUTHORS +9 -0
  511. data/vendor/local/share/license/harfbuzz/COPYING +36 -0
  512. data/vendor/local/share/license/pango/AUTHORS +2 -0
  513. data/vendor/local/share/license/pango/COPYING +482 -0
  514. data/vendor/local/share/man/man1/derb.1 +196 -0
  515. data/vendor/local/share/man/man1/genbrk.1 +112 -0
  516. data/vendor/local/share/man/man1/gencfu.1 +91 -0
  517. data/vendor/local/share/man/man1/gencnval.1 +91 -0
  518. data/vendor/local/share/man/man1/gendict.1 +131 -0
  519. data/vendor/local/share/man/man1/genrb.1 +146 -0
  520. data/vendor/local/share/man/man1/icu-config.1 +288 -0
  521. data/vendor/local/share/man/man1/makeconv.1 +112 -0
  522. data/vendor/local/share/man/man1/pango-querymodules.1 +106 -0
  523. data/vendor/local/share/man/man1/pango-view.1 +1 -0
  524. data/vendor/local/share/man/man1/pkgdata.1 +258 -0
  525. data/vendor/local/share/man/man1/uconv.1 +443 -0
  526. data/vendor/local/share/man/man8/genccode.8 +106 -0
  527. data/vendor/local/share/man/man8/gencmn.8 +129 -0
  528. data/vendor/local/share/man/man8/gensprep.8 +102 -0
  529. data/vendor/local/share/man/man8/icupkg.8 +204 -0
  530. metadata +599 -0
@@ -0,0 +1,1474 @@
1
+ /*
2
+ *******************************************************************************
3
+ * Copyright (c) 1996-2014, International Business Machines Corporation and others.
4
+ * All Rights Reserved.
5
+ *******************************************************************************
6
+ */
7
+
8
+ #ifndef UCOL_H
9
+ #define UCOL_H
10
+
11
+ #include "unicode/utypes.h"
12
+
13
+ #if !UCONFIG_NO_COLLATION
14
+
15
+ #include "unicode/unorm.h"
16
+ #include "unicode/localpointer.h"
17
+ #include "unicode/parseerr.h"
18
+ #include "unicode/uloc.h"
19
+ #include "unicode/uset.h"
20
+ #include "unicode/uscript.h"
21
+
22
+ /**
23
+ * \file
24
+ * \brief C API: Collator
25
+ *
26
+ * <h2> Collator C API </h2>
27
+ *
28
+ * The C API for Collator performs locale-sensitive
29
+ * string comparison. You use this service to build
30
+ * searching and sorting routines for natural language text.
31
+ * <p>
32
+ * For more information about the collation service see
33
+ * <a href="http://userguide.icu-project.org/collation">the User Guide</a>.
34
+ * <p>
35
+ * Collation service provides correct sorting orders for most locales supported in ICU.
36
+ * If specific data for a locale is not available, the orders eventually falls back
37
+ * to the <a href="http://www.unicode.org/reports/tr35/tr35-collation.html#Root_Collation">CLDR root sort order</a>.
38
+ * <p>
39
+ * Sort ordering may be customized by providing your own set of rules. For more on
40
+ * this subject see the <a href="http://userguide.icu-project.org/collation/customization">
41
+ * Collation Customization</a> section of the User Guide.
42
+ * <p>
43
+ * @see UCollationResult
44
+ * @see UNormalizationMode
45
+ * @see UCollationStrength
46
+ * @see UCollationElements
47
+ */
48
+
49
+ /** A collator.
50
+ * For usage in C programs.
51
+ */
52
+ struct UCollator;
53
+ /** structure representing a collator object instance
54
+ * @stable ICU 2.0
55
+ */
56
+ typedef struct UCollator UCollator;
57
+
58
+
59
+ /**
60
+ * UCOL_LESS is returned if source string is compared to be less than target
61
+ * string in the ucol_strcoll() method.
62
+ * UCOL_EQUAL is returned if source string is compared to be equal to target
63
+ * string in the ucol_strcoll() method.
64
+ * UCOL_GREATER is returned if source string is compared to be greater than
65
+ * target string in the ucol_strcoll() method.
66
+ * @see ucol_strcoll()
67
+ * <p>
68
+ * Possible values for a comparison result
69
+ * @stable ICU 2.0
70
+ */
71
+ typedef enum {
72
+ /** string a == string b */
73
+ UCOL_EQUAL = 0,
74
+ /** string a > string b */
75
+ UCOL_GREATER = 1,
76
+ /** string a < string b */
77
+ UCOL_LESS = -1
78
+ } UCollationResult ;
79
+
80
+
81
+ /** Enum containing attribute values for controling collation behavior.
82
+ * Here are all the allowable values. Not every attribute can take every value. The only
83
+ * universal value is UCOL_DEFAULT, which resets the attribute value to the predefined
84
+ * value for that locale
85
+ * @stable ICU 2.0
86
+ */
87
+ typedef enum {
88
+ /** accepted by most attributes */
89
+ UCOL_DEFAULT = -1,
90
+
91
+ /** Primary collation strength */
92
+ UCOL_PRIMARY = 0,
93
+ /** Secondary collation strength */
94
+ UCOL_SECONDARY = 1,
95
+ /** Tertiary collation strength */
96
+ UCOL_TERTIARY = 2,
97
+ /** Default collation strength */
98
+ UCOL_DEFAULT_STRENGTH = UCOL_TERTIARY,
99
+ UCOL_CE_STRENGTH_LIMIT,
100
+ /** Quaternary collation strength */
101
+ UCOL_QUATERNARY=3,
102
+ /** Identical collation strength */
103
+ UCOL_IDENTICAL=15,
104
+ UCOL_STRENGTH_LIMIT,
105
+
106
+ /** Turn the feature off - works for UCOL_FRENCH_COLLATION,
107
+ UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MODE
108
+ & UCOL_DECOMPOSITION_MODE*/
109
+ UCOL_OFF = 16,
110
+ /** Turn the feature on - works for UCOL_FRENCH_COLLATION,
111
+ UCOL_CASE_LEVEL, UCOL_HIRAGANA_QUATERNARY_MODE
112
+ & UCOL_DECOMPOSITION_MODE*/
113
+ UCOL_ON = 17,
114
+
115
+ /** Valid for UCOL_ALTERNATE_HANDLING. Alternate handling will be shifted */
116
+ UCOL_SHIFTED = 20,
117
+ /** Valid for UCOL_ALTERNATE_HANDLING. Alternate handling will be non ignorable */
118
+ UCOL_NON_IGNORABLE = 21,
119
+
120
+ /** Valid for UCOL_CASE_FIRST -
121
+ lower case sorts before upper case */
122
+ UCOL_LOWER_FIRST = 24,
123
+ /** upper case sorts before lower case */
124
+ UCOL_UPPER_FIRST = 25,
125
+
126
+ UCOL_ATTRIBUTE_VALUE_COUNT
127
+
128
+ } UColAttributeValue;
129
+
130
+ /**
131
+ * Enum containing the codes for reordering segments of the collation table that are not script
132
+ * codes. These reordering codes are to be used in conjunction with the script codes.
133
+ * @see ucol_getReorderCodes
134
+ * @see ucol_setReorderCodes
135
+ * @see ucol_getEquivalentReorderCodes
136
+ * @see UScriptCode
137
+ * @stable ICU 4.8
138
+ */
139
+ typedef enum {
140
+ /**
141
+ * A special reordering code that is used to specify the default
142
+ * reordering codes for a locale.
143
+ * @stable ICU 4.8
144
+ */
145
+ UCOL_REORDER_CODE_DEFAULT = -1,
146
+ /**
147
+ * A special reordering code that is used to specify no reordering codes.
148
+ * @stable ICU 4.8
149
+ */
150
+ UCOL_REORDER_CODE_NONE = USCRIPT_UNKNOWN,
151
+ /**
152
+ * A special reordering code that is used to specify all other codes used for
153
+ * reordering except for the codes lised as UColReorderCode values and those
154
+ * listed explicitly in a reordering.
155
+ * @stable ICU 4.8
156
+ */
157
+ UCOL_REORDER_CODE_OTHERS = USCRIPT_UNKNOWN,
158
+ /**
159
+ * Characters with the space property.
160
+ * This is equivalent to the rule value "space".
161
+ * @stable ICU 4.8
162
+ */
163
+ UCOL_REORDER_CODE_SPACE = 0x1000,
164
+ /**
165
+ * The first entry in the enumeration of reordering groups. This is intended for use in
166
+ * range checking and enumeration of the reorder codes.
167
+ * @stable ICU 4.8
168
+ */
169
+ UCOL_REORDER_CODE_FIRST = UCOL_REORDER_CODE_SPACE,
170
+ /**
171
+ * Characters with the punctuation property.
172
+ * This is equivalent to the rule value "punct".
173
+ * @stable ICU 4.8
174
+ */
175
+ UCOL_REORDER_CODE_PUNCTUATION = 0x1001,
176
+ /**
177
+ * Characters with the symbol property.
178
+ * This is equivalent to the rule value "symbol".
179
+ * @stable ICU 4.8
180
+ */
181
+ UCOL_REORDER_CODE_SYMBOL = 0x1002,
182
+ /**
183
+ * Characters with the currency property.
184
+ * This is equivalent to the rule value "currency".
185
+ * @stable ICU 4.8
186
+ */
187
+ UCOL_REORDER_CODE_CURRENCY = 0x1003,
188
+ /**
189
+ * Characters with the digit property.
190
+ * This is equivalent to the rule value "digit".
191
+ * @stable ICU 4.8
192
+ */
193
+ UCOL_REORDER_CODE_DIGIT = 0x1004,
194
+ /**
195
+ * The limit of the reorder codes. This is intended for use in range checking
196
+ * and enumeration of the reorder codes.
197
+ * @stable ICU 4.8
198
+ */
199
+ UCOL_REORDER_CODE_LIMIT = 0x1005
200
+ } UColReorderCode;
201
+
202
+ /**
203
+ * Base letter represents a primary difference. Set comparison
204
+ * level to UCOL_PRIMARY to ignore secondary and tertiary differences.
205
+ * Use this to set the strength of a Collator object.
206
+ * Example of primary difference, "abc" &lt; "abd"
207
+ *
208
+ * Diacritical differences on the same base letter represent a secondary
209
+ * difference. Set comparison level to UCOL_SECONDARY to ignore tertiary
210
+ * differences. Use this to set the strength of a Collator object.
211
+ * Example of secondary difference, "&auml;" >> "a".
212
+ *
213
+ * Uppercase and lowercase versions of the same character represents a
214
+ * tertiary difference. Set comparison level to UCOL_TERTIARY to include
215
+ * all comparison differences. Use this to set the strength of a Collator
216
+ * object.
217
+ * Example of tertiary difference, "abc" &lt;&lt;&lt; "ABC".
218
+ *
219
+ * Two characters are considered "identical" when they have the same
220
+ * unicode spellings. UCOL_IDENTICAL.
221
+ * For example, "&auml;" == "&auml;".
222
+ *
223
+ * UCollationStrength is also used to determine the strength of sort keys
224
+ * generated from UCollator objects
225
+ * These values can be now found in the UColAttributeValue enum.
226
+ * @stable ICU 2.0
227
+ **/
228
+ typedef UColAttributeValue UCollationStrength;
229
+
230
+ /** Attributes that collation service understands. All the attributes can take UCOL_DEFAULT
231
+ * value, as well as the values specific to each one.
232
+ * @stable ICU 2.0
233
+ */
234
+ typedef enum {
235
+ /** Attribute for direction of secondary weights - used in Canadian French.
236
+ * Acceptable values are UCOL_ON, which results in secondary weights
237
+ * being considered backwards and UCOL_OFF which treats secondary
238
+ * weights in the order they appear.
239
+ * @stable ICU 2.0
240
+ */
241
+ UCOL_FRENCH_COLLATION,
242
+ /** Attribute for handling variable elements.
243
+ * Acceptable values are UCOL_NON_IGNORABLE (default)
244
+ * which treats all the codepoints with non-ignorable
245
+ * primary weights in the same way,
246
+ * and UCOL_SHIFTED which causes codepoints with primary
247
+ * weights that are equal or below the variable top value
248
+ * to be ignored on primary level and moved to the quaternary
249
+ * level.
250
+ * @stable ICU 2.0
251
+ */
252
+ UCOL_ALTERNATE_HANDLING,
253
+ /** Controls the ordering of upper and lower case letters.
254
+ * Acceptable values are UCOL_OFF (default), which orders
255
+ * upper and lower case letters in accordance to their tertiary
256
+ * weights, UCOL_UPPER_FIRST which forces upper case letters to
257
+ * sort before lower case letters, and UCOL_LOWER_FIRST which does
258
+ * the opposite.
259
+ * @stable ICU 2.0
260
+ */
261
+ UCOL_CASE_FIRST,
262
+ /** Controls whether an extra case level (positioned before the third
263
+ * level) is generated or not. Acceptable values are UCOL_OFF (default),
264
+ * when case level is not generated, and UCOL_ON which causes the case
265
+ * level to be generated. Contents of the case level are affected by
266
+ * the value of UCOL_CASE_FIRST attribute. A simple way to ignore
267
+ * accent differences in a string is to set the strength to UCOL_PRIMARY
268
+ * and enable case level.
269
+ * @stable ICU 2.0
270
+ */
271
+ UCOL_CASE_LEVEL,
272
+ /** Controls whether the normalization check and necessary normalizations
273
+ * are performed. When set to UCOL_OFF (default) no normalization check
274
+ * is performed. The correctness of the result is guaranteed only if the
275
+ * input data is in so-called FCD form (see users manual for more info).
276
+ * When set to UCOL_ON, an incremental check is performed to see whether
277
+ * the input data is in the FCD form. If the data is not in the FCD form,
278
+ * incremental NFD normalization is performed.
279
+ * @stable ICU 2.0
280
+ */
281
+ UCOL_NORMALIZATION_MODE,
282
+ /** An alias for UCOL_NORMALIZATION_MODE attribute.
283
+ * @stable ICU 2.0
284
+ */
285
+ UCOL_DECOMPOSITION_MODE = UCOL_NORMALIZATION_MODE,
286
+ /** The strength attribute. Can be either UCOL_PRIMARY, UCOL_SECONDARY,
287
+ * UCOL_TERTIARY, UCOL_QUATERNARY or UCOL_IDENTICAL. The usual strength
288
+ * for most locales (except Japanese) is tertiary.
289
+ *
290
+ * Quaternary strength
291
+ * is useful when combined with shifted setting for alternate handling
292
+ * attribute and for JIS X 4061 collation, when it is used to distinguish
293
+ * between Katakana and Hiragana.
294
+ * Otherwise, quaternary level
295
+ * is affected only by the number of non-ignorable code points in
296
+ * the string.
297
+ *
298
+ * Identical strength is rarely useful, as it amounts
299
+ * to codepoints of the NFD form of the string.
300
+ * @stable ICU 2.0
301
+ */
302
+ UCOL_STRENGTH,
303
+ #ifndef U_HIDE_DEPRECATED_API
304
+ /** When turned on, this attribute positions Hiragana before all
305
+ * non-ignorables on quaternary level This is a sneaky way to produce JIS
306
+ * sort order.
307
+ *
308
+ * This attribute was an implementation detail of the CLDR Japanese tailoring.
309
+ * Since ICU 50, this attribute is not settable any more via API functions.
310
+ * Since CLDR 25/ICU 53, explicit quaternary relations are used
311
+ * to achieve the same Japanese sort order.
312
+ *
313
+ * @deprecated ICU 50 Implementation detail, cannot be set via API, was removed from implementation.
314
+ */
315
+ UCOL_HIRAGANA_QUATERNARY_MODE = UCOL_STRENGTH + 1,
316
+ #endif /* U_HIDE_DEPRECATED_API */
317
+ /**
318
+ * When turned on, this attribute makes
319
+ * substrings of digits sort according to their numeric values.
320
+ *
321
+ * This is a way to get '100' to sort AFTER '2'. Note that the longest
322
+ * digit substring that can be treated as a single unit is
323
+ * 254 digits (not counting leading zeros). If a digit substring is
324
+ * longer than that, the digits beyond the limit will be treated as a
325
+ * separate digit substring.
326
+ *
327
+ * A "digit" in this sense is a code point with General_Category=Nd,
328
+ * which does not include circled numbers, roman numerals, etc.
329
+ * Only a contiguous digit substring is considered, that is,
330
+ * non-negative integers without separators.
331
+ * There is no support for plus/minus signs, decimals, exponents, etc.
332
+ *
333
+ * @stable ICU 2.8
334
+ */
335
+ UCOL_NUMERIC_COLLATION = UCOL_STRENGTH + 2,
336
+ /**
337
+ * The number of UColAttribute constants.
338
+ * @stable ICU 2.0
339
+ */
340
+ UCOL_ATTRIBUTE_COUNT
341
+ } UColAttribute;
342
+
343
+ /** Options for retrieving the rule string
344
+ * @stable ICU 2.0
345
+ */
346
+ typedef enum {
347
+ /**
348
+ * Retrieves the tailoring rules only.
349
+ * Same as calling the version of getRules() without UColRuleOption.
350
+ * @stable ICU 2.0
351
+ */
352
+ UCOL_TAILORING_ONLY,
353
+ /**
354
+ * Retrieves the "UCA rules" concatenated with the tailoring rules.
355
+ * The "UCA rules" are an <i>approximation</i> of the root collator's sort order.
356
+ * They are almost never used or useful at runtime and can be removed from the data.
357
+ * See http://userguide.icu-project.org/collation/customization#TOC-Building-on-Existing-Locales
358
+ * @stable ICU 2.0
359
+ */
360
+ UCOL_FULL_RULES
361
+ } UColRuleOption ;
362
+
363
+ /**
364
+ * Open a UCollator for comparing strings.
365
+ *
366
+ * For some languages, multiple collation types are available;
367
+ * for example, "de@collation=phonebook".
368
+ * Starting with ICU 54, collation attributes can be specified via locale keywords as well,
369
+ * in the old locale extension syntax ("el@colCaseFirst=upper")
370
+ * or in language tag syntax ("el-u-kf-upper").
371
+ * See <a href="http://userguide.icu-project.org/collation/api">User Guide: Collation API</a>.
372
+ *
373
+ * The UCollator pointer is used in all the calls to the Collation
374
+ * service. After finished, collator must be disposed of by calling
375
+ * {@link #ucol_close }.
376
+ * @param loc The locale containing the required collation rules.
377
+ * Special values for locales can be passed in -
378
+ * if NULL is passed for the locale, the default locale
379
+ * collation rules will be used. If empty string ("") or
380
+ * "root" are passed, the root collator will be returned.
381
+ * @param status A pointer to a UErrorCode to receive any errors
382
+ * @return A pointer to a UCollator, or 0 if an error occurred.
383
+ * @see ucol_openRules
384
+ * @see ucol_safeClone
385
+ * @see ucol_close
386
+ * @stable ICU 2.0
387
+ */
388
+ U_STABLE UCollator* U_EXPORT2
389
+ ucol_open(const char *loc, UErrorCode *status);
390
+
391
+ /**
392
+ * Produce a UCollator instance according to the rules supplied.
393
+ * The rules are used to change the default ordering, defined in the
394
+ * UCA in a process called tailoring. The resulting UCollator pointer
395
+ * can be used in the same way as the one obtained by {@link #ucol_strcoll }.
396
+ * @param rules A string describing the collation rules. For the syntax
397
+ * of the rules please see users guide.
398
+ * @param rulesLength The length of rules, or -1 if null-terminated.
399
+ * @param normalizationMode The normalization mode: One of
400
+ * UCOL_OFF (expect the text to not need normalization),
401
+ * UCOL_ON (normalize), or
402
+ * UCOL_DEFAULT (set the mode according to the rules)
403
+ * @param strength The default collation strength; one of UCOL_PRIMARY, UCOL_SECONDARY,
404
+ * UCOL_TERTIARY, UCOL_IDENTICAL,UCOL_DEFAULT_STRENGTH - can be also set in the rules.
405
+ * @param parseError A pointer to UParseError to recieve information about errors
406
+ * occurred during parsing. This argument can currently be set
407
+ * to NULL, but at users own risk. Please provide a real structure.
408
+ * @param status A pointer to a UErrorCode to receive any errors
409
+ * @return A pointer to a UCollator. It is not guaranteed that NULL be returned in case
410
+ * of error - please use status argument to check for errors.
411
+ * @see ucol_open
412
+ * @see ucol_safeClone
413
+ * @see ucol_close
414
+ * @stable ICU 2.0
415
+ */
416
+ U_STABLE UCollator* U_EXPORT2
417
+ ucol_openRules( const UChar *rules,
418
+ int32_t rulesLength,
419
+ UColAttributeValue normalizationMode,
420
+ UCollationStrength strength,
421
+ UParseError *parseError,
422
+ UErrorCode *status);
423
+
424
+ #ifndef U_HIDE_DEPRECATED_API
425
+ /**
426
+ * Open a collator defined by a short form string.
427
+ * The structure and the syntax of the string is defined in the "Naming collators"
428
+ * section of the users guide:
429
+ * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme
430
+ * Attributes are overriden by the subsequent attributes. So, for "S2_S3", final
431
+ * strength will be 3. 3066bis locale overrides individual locale parts.
432
+ * The call to this function is equivalent to a call to ucol_open, followed by a
433
+ * series of calls to ucol_setAttribute and ucol_setVariableTop.
434
+ * @param definition A short string containing a locale and a set of attributes.
435
+ * Attributes not explicitly mentioned are left at the default
436
+ * state for a locale.
437
+ * @param parseError if not NULL, structure that will get filled with error's pre
438
+ * and post context in case of error.
439
+ * @param forceDefaults if FALSE, the settings that are the same as the collator
440
+ * default settings will not be applied (for example, setting
441
+ * French secondary on a French collator would not be executed).
442
+ * If TRUE, all the settings will be applied regardless of the
443
+ * collator default value. If the definition
444
+ * strings are to be cached, should be set to FALSE.
445
+ * @param status Error code. Apart from regular error conditions connected to
446
+ * instantiating collators (like out of memory or similar), this
447
+ * API will return an error if an invalid attribute or attribute/value
448
+ * combination is specified.
449
+ * @return A pointer to a UCollator or 0 if an error occured (including an
450
+ * invalid attribute).
451
+ * @see ucol_open
452
+ * @see ucol_setAttribute
453
+ * @see ucol_setVariableTop
454
+ * @see ucol_getShortDefinitionString
455
+ * @see ucol_normalizeShortDefinitionString
456
+ * @deprecated ICU 54 Use ucol_open() with language tag collation keywords instead.
457
+ */
458
+ U_DEPRECATED UCollator* U_EXPORT2
459
+ ucol_openFromShortString( const char *definition,
460
+ UBool forceDefaults,
461
+ UParseError *parseError,
462
+ UErrorCode *status);
463
+ #endif /* U_HIDE_DEPRECATED_API */
464
+
465
+ #ifndef U_HIDE_DEPRECATED_API
466
+ /**
467
+ * Get a set containing the contractions defined by the collator. The set includes
468
+ * both the root collator's contractions and the contractions defined by the collator. This set
469
+ * will contain only strings. If a tailoring explicitly suppresses contractions from
470
+ * the root collator (like Russian), removed contractions will not be in the resulting set.
471
+ * @param coll collator
472
+ * @param conts the set to hold the result. It gets emptied before
473
+ * contractions are added.
474
+ * @param status to hold the error code
475
+ * @return the size of the contraction set
476
+ *
477
+ * @deprecated ICU 3.4, use ucol_getContractionsAndExpansions instead
478
+ */
479
+ U_DEPRECATED int32_t U_EXPORT2
480
+ ucol_getContractions( const UCollator *coll,
481
+ USet *conts,
482
+ UErrorCode *status);
483
+ #endif /* U_HIDE_DEPRECATED_API */
484
+
485
+ /**
486
+ * Get a set containing the expansions defined by the collator. The set includes
487
+ * both the root collator's expansions and the expansions defined by the tailoring
488
+ * @param coll collator
489
+ * @param contractions if not NULL, the set to hold the contractions
490
+ * @param expansions if not NULL, the set to hold the expansions
491
+ * @param addPrefixes add the prefix contextual elements to contractions
492
+ * @param status to hold the error code
493
+ *
494
+ * @stable ICU 3.4
495
+ */
496
+ U_STABLE void U_EXPORT2
497
+ ucol_getContractionsAndExpansions( const UCollator *coll,
498
+ USet *contractions, USet *expansions,
499
+ UBool addPrefixes, UErrorCode *status);
500
+
501
+ /**
502
+ * Close a UCollator.
503
+ * Once closed, a UCollator should not be used. Every open collator should
504
+ * be closed. Otherwise, a memory leak will result.
505
+ * @param coll The UCollator to close.
506
+ * @see ucol_open
507
+ * @see ucol_openRules
508
+ * @see ucol_safeClone
509
+ * @stable ICU 2.0
510
+ */
511
+ U_STABLE void U_EXPORT2
512
+ ucol_close(UCollator *coll);
513
+
514
+ #if U_SHOW_CPLUSPLUS_API
515
+
516
+ U_NAMESPACE_BEGIN
517
+
518
+ /**
519
+ * \class LocalUCollatorPointer
520
+ * "Smart pointer" class, closes a UCollator via ucol_close().
521
+ * For most methods see the LocalPointerBase base class.
522
+ *
523
+ * @see LocalPointerBase
524
+ * @see LocalPointer
525
+ * @stable ICU 4.4
526
+ */
527
+ U_DEFINE_LOCAL_OPEN_POINTER(LocalUCollatorPointer, UCollator, ucol_close);
528
+
529
+ U_NAMESPACE_END
530
+
531
+ #endif
532
+
533
+ /**
534
+ * Compare two strings.
535
+ * The strings will be compared using the options already specified.
536
+ * @param coll The UCollator containing the comparison rules.
537
+ * @param source The source string.
538
+ * @param sourceLength The length of source, or -1 if null-terminated.
539
+ * @param target The target string.
540
+ * @param targetLength The length of target, or -1 if null-terminated.
541
+ * @return The result of comparing the strings; one of UCOL_EQUAL,
542
+ * UCOL_GREATER, UCOL_LESS
543
+ * @see ucol_greater
544
+ * @see ucol_greaterOrEqual
545
+ * @see ucol_equal
546
+ * @stable ICU 2.0
547
+ */
548
+ U_STABLE UCollationResult U_EXPORT2
549
+ ucol_strcoll( const UCollator *coll,
550
+ const UChar *source,
551
+ int32_t sourceLength,
552
+ const UChar *target,
553
+ int32_t targetLength);
554
+
555
+ /**
556
+ * Compare two strings in UTF-8.
557
+ * The strings will be compared using the options already specified.
558
+ * Note: When input string contains malformed a UTF-8 byte sequence,
559
+ * this function treats these bytes as REPLACEMENT CHARACTER (U+FFFD).
560
+ * @param coll The UCollator containing the comparison rules.
561
+ * @param source The source UTF-8 string.
562
+ * @param sourceLength The length of source, or -1 if null-terminated.
563
+ * @param target The target UTF-8 string.
564
+ * @param targetLength The length of target, or -1 if null-terminated.
565
+ * @param status A pointer to a UErrorCode to receive any errors
566
+ * @return The result of comparing the strings; one of UCOL_EQUAL,
567
+ * UCOL_GREATER, UCOL_LESS
568
+ * @see ucol_greater
569
+ * @see ucol_greaterOrEqual
570
+ * @see ucol_equal
571
+ * @stable ICU 50
572
+ */
573
+ U_STABLE UCollationResult U_EXPORT2
574
+ ucol_strcollUTF8(
575
+ const UCollator *coll,
576
+ const char *source,
577
+ int32_t sourceLength,
578
+ const char *target,
579
+ int32_t targetLength,
580
+ UErrorCode *status);
581
+
582
+ /**
583
+ * Determine if one string is greater than another.
584
+ * This function is equivalent to {@link #ucol_strcoll } == UCOL_GREATER
585
+ * @param coll The UCollator containing the comparison rules.
586
+ * @param source The source string.
587
+ * @param sourceLength The length of source, or -1 if null-terminated.
588
+ * @param target The target string.
589
+ * @param targetLength The length of target, or -1 if null-terminated.
590
+ * @return TRUE if source is greater than target, FALSE otherwise.
591
+ * @see ucol_strcoll
592
+ * @see ucol_greaterOrEqual
593
+ * @see ucol_equal
594
+ * @stable ICU 2.0
595
+ */
596
+ U_STABLE UBool U_EXPORT2
597
+ ucol_greater(const UCollator *coll,
598
+ const UChar *source, int32_t sourceLength,
599
+ const UChar *target, int32_t targetLength);
600
+
601
+ /**
602
+ * Determine if one string is greater than or equal to another.
603
+ * This function is equivalent to {@link #ucol_strcoll } != UCOL_LESS
604
+ * @param coll The UCollator containing the comparison rules.
605
+ * @param source The source string.
606
+ * @param sourceLength The length of source, or -1 if null-terminated.
607
+ * @param target The target string.
608
+ * @param targetLength The length of target, or -1 if null-terminated.
609
+ * @return TRUE if source is greater than or equal to target, FALSE otherwise.
610
+ * @see ucol_strcoll
611
+ * @see ucol_greater
612
+ * @see ucol_equal
613
+ * @stable ICU 2.0
614
+ */
615
+ U_STABLE UBool U_EXPORT2
616
+ ucol_greaterOrEqual(const UCollator *coll,
617
+ const UChar *source, int32_t sourceLength,
618
+ const UChar *target, int32_t targetLength);
619
+
620
+ /**
621
+ * Compare two strings for equality.
622
+ * This function is equivalent to {@link #ucol_strcoll } == UCOL_EQUAL
623
+ * @param coll The UCollator containing the comparison rules.
624
+ * @param source The source string.
625
+ * @param sourceLength The length of source, or -1 if null-terminated.
626
+ * @param target The target string.
627
+ * @param targetLength The length of target, or -1 if null-terminated.
628
+ * @return TRUE if source is equal to target, FALSE otherwise
629
+ * @see ucol_strcoll
630
+ * @see ucol_greater
631
+ * @see ucol_greaterOrEqual
632
+ * @stable ICU 2.0
633
+ */
634
+ U_STABLE UBool U_EXPORT2
635
+ ucol_equal(const UCollator *coll,
636
+ const UChar *source, int32_t sourceLength,
637
+ const UChar *target, int32_t targetLength);
638
+
639
+ /**
640
+ * Compare two UTF-8 encoded trings.
641
+ * The strings will be compared using the options already specified.
642
+ * @param coll The UCollator containing the comparison rules.
643
+ * @param sIter The source string iterator.
644
+ * @param tIter The target string iterator.
645
+ * @return The result of comparing the strings; one of UCOL_EQUAL,
646
+ * UCOL_GREATER, UCOL_LESS
647
+ * @param status A pointer to a UErrorCode to receive any errors
648
+ * @see ucol_strcoll
649
+ * @stable ICU 2.6
650
+ */
651
+ U_STABLE UCollationResult U_EXPORT2
652
+ ucol_strcollIter( const UCollator *coll,
653
+ UCharIterator *sIter,
654
+ UCharIterator *tIter,
655
+ UErrorCode *status);
656
+
657
+ /**
658
+ * Get the collation strength used in a UCollator.
659
+ * The strength influences how strings are compared.
660
+ * @param coll The UCollator to query.
661
+ * @return The collation strength; one of UCOL_PRIMARY, UCOL_SECONDARY,
662
+ * UCOL_TERTIARY, UCOL_QUATERNARY, UCOL_IDENTICAL
663
+ * @see ucol_setStrength
664
+ * @stable ICU 2.0
665
+ */
666
+ U_STABLE UCollationStrength U_EXPORT2
667
+ ucol_getStrength(const UCollator *coll);
668
+
669
+ /**
670
+ * Set the collation strength used in a UCollator.
671
+ * The strength influences how strings are compared.
672
+ * @param coll The UCollator to set.
673
+ * @param strength The desired collation strength; one of UCOL_PRIMARY,
674
+ * UCOL_SECONDARY, UCOL_TERTIARY, UCOL_QUATERNARY, UCOL_IDENTICAL, UCOL_DEFAULT
675
+ * @see ucol_getStrength
676
+ * @stable ICU 2.0
677
+ */
678
+ U_STABLE void U_EXPORT2
679
+ ucol_setStrength(UCollator *coll,
680
+ UCollationStrength strength);
681
+
682
+ /**
683
+ * Retrieves the reordering codes for this collator.
684
+ * These reordering codes are a combination of UScript codes and UColReorderCode entries.
685
+ * @param coll The UCollator to query.
686
+ * @param dest The array to fill with the script ordering.
687
+ * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
688
+ * will only return the length of the result without writing any of the result string (pre-flighting).
689
+ * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a
690
+ * failure before the function call.
691
+ * @return The number of reordering codes written to the dest array.
692
+ * @see ucol_setReorderCodes
693
+ * @see ucol_getEquivalentReorderCodes
694
+ * @see UScriptCode
695
+ * @see UColReorderCode
696
+ * @stable ICU 4.8
697
+ */
698
+ U_STABLE int32_t U_EXPORT2
699
+ ucol_getReorderCodes(const UCollator* coll,
700
+ int32_t* dest,
701
+ int32_t destCapacity,
702
+ UErrorCode *pErrorCode);
703
+ /**
704
+ * Sets the reordering codes for this collator.
705
+ * Collation reordering allows scripts and some other defined blocks of characters
706
+ * to be moved relative to each other as a block. This reordering is done on top of
707
+ * the DUCET/CLDR standard collation order. Reordering can specify groups to be placed
708
+ * at the start and/or the end of the collation order. These groups are specified using
709
+ * UScript codes and UColReorderCode entries.
710
+ * <p>By default, reordering codes specified for the start of the order are placed in the
711
+ * order given after a group of "special" non-script blocks. These special groups of characters
712
+ * are space, punctuation, symbol, currency, and digit. These special groups are represented with
713
+ * UColReorderCode entries. Script groups can be intermingled with
714
+ * these special non-script blocks if those special blocks are explicitly specified in the reordering.
715
+ * <p>The special code OTHERS stands for any script that is not explicitly
716
+ * mentioned in the list of reordering codes given. Anything that is after OTHERS
717
+ * will go at the very end of the reordering in the order given.
718
+ * <p>The special reorder code DEFAULT will reset the reordering for this collator
719
+ * to the default for this collator. The default reordering may be the DUCET/CLDR order or may be a reordering that
720
+ * was specified when this collator was created from resource data or from rules. The
721
+ * DEFAULT code <b>must</b> be the sole code supplied when it used. If not
722
+ * that will result in a U_ILLEGAL_ARGUMENT_ERROR being set.
723
+ * <p>The special reorder code NONE will remove any reordering for this collator.
724
+ * The result of setting no reordering will be to have the DUCET/CLDR ordering used. The
725
+ * NONE code <b>must</b> be the sole code supplied when it used.
726
+ * @param coll The UCollator to set.
727
+ * @param reorderCodes An array of script codes in the new order. This can be NULL if the
728
+ * length is also set to 0. An empty array will clear any reordering codes on the collator.
729
+ * @param reorderCodesLength The length of reorderCodes.
730
+ * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a
731
+ * failure before the function call.
732
+ * @see ucol_getReorderCodes
733
+ * @see ucol_getEquivalentReorderCodes
734
+ * @see UScriptCode
735
+ * @see UColReorderCode
736
+ * @stable ICU 4.8
737
+ */
738
+ U_STABLE void U_EXPORT2
739
+ ucol_setReorderCodes(UCollator* coll,
740
+ const int32_t* reorderCodes,
741
+ int32_t reorderCodesLength,
742
+ UErrorCode *pErrorCode);
743
+
744
+ /**
745
+ * Retrieves the reorder codes that are grouped with the given reorder code. Some reorder
746
+ * codes will be grouped and must reorder together.
747
+ * @param reorderCode The reorder code to determine equivalence for.
748
+ * @param dest The array to fill with the script ordering.
749
+ * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
750
+ * will only return the length of the result without writing any of the result string (pre-flighting).
751
+ * @param pErrorCode Must be a valid pointer to an error code value, which must not indicate
752
+ * a failure before the function call.
753
+ * @return The number of reordering codes written to the dest array.
754
+ * @see ucol_setReorderCodes
755
+ * @see ucol_getReorderCodes
756
+ * @see UScriptCode
757
+ * @see UColReorderCode
758
+ * @stable ICU 4.8
759
+ */
760
+ U_STABLE int32_t U_EXPORT2
761
+ ucol_getEquivalentReorderCodes(int32_t reorderCode,
762
+ int32_t* dest,
763
+ int32_t destCapacity,
764
+ UErrorCode *pErrorCode);
765
+
766
+ /**
767
+ * Get the display name for a UCollator.
768
+ * The display name is suitable for presentation to a user.
769
+ * @param objLoc The locale of the collator in question.
770
+ * @param dispLoc The locale for display.
771
+ * @param result A pointer to a buffer to receive the attribute.
772
+ * @param resultLength The maximum size of result.
773
+ * @param status A pointer to a UErrorCode to receive any errors
774
+ * @return The total buffer size needed; if greater than resultLength,
775
+ * the output was truncated.
776
+ * @stable ICU 2.0
777
+ */
778
+ U_STABLE int32_t U_EXPORT2
779
+ ucol_getDisplayName( const char *objLoc,
780
+ const char *dispLoc,
781
+ UChar *result,
782
+ int32_t resultLength,
783
+ UErrorCode *status);
784
+
785
+ /**
786
+ * Get a locale for which collation rules are available.
787
+ * A UCollator in a locale returned by this function will perform the correct
788
+ * collation for the locale.
789
+ * @param localeIndex The index of the desired locale.
790
+ * @return A locale for which collation rules are available, or 0 if none.
791
+ * @see ucol_countAvailable
792
+ * @stable ICU 2.0
793
+ */
794
+ U_STABLE const char* U_EXPORT2
795
+ ucol_getAvailable(int32_t localeIndex);
796
+
797
+ /**
798
+ * Determine how many locales have collation rules available.
799
+ * This function is most useful as determining the loop ending condition for
800
+ * calls to {@link #ucol_getAvailable }.
801
+ * @return The number of locales for which collation rules are available.
802
+ * @see ucol_getAvailable
803
+ * @stable ICU 2.0
804
+ */
805
+ U_STABLE int32_t U_EXPORT2
806
+ ucol_countAvailable(void);
807
+
808
+ #if !UCONFIG_NO_SERVICE
809
+ /**
810
+ * Create a string enumerator of all locales for which a valid
811
+ * collator may be opened.
812
+ * @param status input-output error code
813
+ * @return a string enumeration over locale strings. The caller is
814
+ * responsible for closing the result.
815
+ * @stable ICU 3.0
816
+ */
817
+ U_STABLE UEnumeration* U_EXPORT2
818
+ ucol_openAvailableLocales(UErrorCode *status);
819
+ #endif
820
+
821
+ /**
822
+ * Create a string enumerator of all possible keywords that are relevant to
823
+ * collation. At this point, the only recognized keyword for this
824
+ * service is "collation".
825
+ * @param status input-output error code
826
+ * @return a string enumeration over locale strings. The caller is
827
+ * responsible for closing the result.
828
+ * @stable ICU 3.0
829
+ */
830
+ U_STABLE UEnumeration* U_EXPORT2
831
+ ucol_getKeywords(UErrorCode *status);
832
+
833
+ /**
834
+ * Given a keyword, create a string enumeration of all values
835
+ * for that keyword that are currently in use.
836
+ * @param keyword a particular keyword as enumerated by
837
+ * ucol_getKeywords. If any other keyword is passed in, *status is set
838
+ * to U_ILLEGAL_ARGUMENT_ERROR.
839
+ * @param status input-output error code
840
+ * @return a string enumeration over collation keyword values, or NULL
841
+ * upon error. The caller is responsible for closing the result.
842
+ * @stable ICU 3.0
843
+ */
844
+ U_STABLE UEnumeration* U_EXPORT2
845
+ ucol_getKeywordValues(const char *keyword, UErrorCode *status);
846
+
847
+ /**
848
+ * Given a key and a locale, returns an array of string values in a preferred
849
+ * order that would make a difference. These are all and only those values where
850
+ * the open (creation) of the service with the locale formed from the input locale
851
+ * plus input keyword and that value has different behavior than creation with the
852
+ * input locale alone.
853
+ * @param key one of the keys supported by this service. For now, only
854
+ * "collation" is supported.
855
+ * @param locale the locale
856
+ * @param commonlyUsed if set to true it will return only commonly used values
857
+ * with the given locale in preferred order. Otherwise,
858
+ * it will return all the available values for the locale.
859
+ * @param status error status
860
+ * @return a string enumeration over keyword values for the given key and the locale.
861
+ * @stable ICU 4.2
862
+ */
863
+ U_STABLE UEnumeration* U_EXPORT2
864
+ ucol_getKeywordValuesForLocale(const char* key,
865
+ const char* locale,
866
+ UBool commonlyUsed,
867
+ UErrorCode* status);
868
+
869
+ /**
870
+ * Return the functionally equivalent locale for the specified
871
+ * input locale, with respect to given keyword, for the
872
+ * collation service. If two different input locale + keyword
873
+ * combinations produce the same result locale, then collators
874
+ * instantiated for these two different input locales will behave
875
+ * equivalently. The converse is not always true; two collators
876
+ * may in fact be equivalent, but return different results, due to
877
+ * internal details. The return result has no other meaning than
878
+ * that stated above, and implies nothing as to the relationship
879
+ * between the two locales. This is intended for use by
880
+ * applications who wish to cache collators, or otherwise reuse
881
+ * collators when possible. The functional equivalent may change
882
+ * over time. For more information, please see the <a
883
+ * href="http://userguide.icu-project.org/locale#TOC-Locales-and-Services">
884
+ * Locales and Services</a> section of the ICU User Guide.
885
+ * @param result fillin for the functionally equivalent result locale
886
+ * @param resultCapacity capacity of the fillin buffer
887
+ * @param keyword a particular keyword as enumerated by
888
+ * ucol_getKeywords.
889
+ * @param locale the specified input locale
890
+ * @param isAvailable if non-NULL, pointer to a fillin parameter that
891
+ * on return indicates whether the specified input locale was 'available'
892
+ * to the collation service. A locale is defined as 'available' if it
893
+ * physically exists within the collation locale data.
894
+ * @param status pointer to input-output error code
895
+ * @return the actual buffer size needed for the locale. If greater
896
+ * than resultCapacity, the returned full name will be truncated and
897
+ * an error code will be returned.
898
+ * @stable ICU 3.0
899
+ */
900
+ U_STABLE int32_t U_EXPORT2
901
+ ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
902
+ const char* keyword, const char* locale,
903
+ UBool* isAvailable, UErrorCode* status);
904
+
905
+ /**
906
+ * Get the collation tailoring rules from a UCollator.
907
+ * The rules will follow the rule syntax.
908
+ * @param coll The UCollator to query.
909
+ * @param length
910
+ * @return The collation tailoring rules.
911
+ * @stable ICU 2.0
912
+ */
913
+ U_STABLE const UChar* U_EXPORT2
914
+ ucol_getRules( const UCollator *coll,
915
+ int32_t *length);
916
+
917
+ #ifndef U_HIDE_DEPRECATED_API
918
+ /** Get the short definition string for a collator. This API harvests the collator's
919
+ * locale and the attribute set and produces a string that can be used for opening
920
+ * a collator with the same attributes using the ucol_openFromShortString API.
921
+ * This string will be normalized.
922
+ * The structure and the syntax of the string is defined in the "Naming collators"
923
+ * section of the users guide:
924
+ * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme
925
+ * This API supports preflighting.
926
+ * @param coll a collator
927
+ * @param locale a locale that will appear as a collators locale in the resulting
928
+ * short string definition. If NULL, the locale will be harvested
929
+ * from the collator.
930
+ * @param buffer space to hold the resulting string
931
+ * @param capacity capacity of the buffer
932
+ * @param status for returning errors. All the preflighting errors are featured
933
+ * @return length of the resulting string
934
+ * @see ucol_openFromShortString
935
+ * @see ucol_normalizeShortDefinitionString
936
+ * @deprecated ICU 54
937
+ */
938
+ U_DEPRECATED int32_t U_EXPORT2
939
+ ucol_getShortDefinitionString(const UCollator *coll,
940
+ const char *locale,
941
+ char *buffer,
942
+ int32_t capacity,
943
+ UErrorCode *status);
944
+
945
+ /** Verifies and normalizes short definition string.
946
+ * Normalized short definition string has all the option sorted by the argument name,
947
+ * so that equivalent definition strings are the same.
948
+ * This API supports preflighting.
949
+ * @param source definition string
950
+ * @param destination space to hold the resulting string
951
+ * @param capacity capacity of the buffer
952
+ * @param parseError if not NULL, structure that will get filled with error's pre
953
+ * and post context in case of error.
954
+ * @param status Error code. This API will return an error if an invalid attribute
955
+ * or attribute/value combination is specified. All the preflighting
956
+ * errors are also featured
957
+ * @return length of the resulting normalized string.
958
+ *
959
+ * @see ucol_openFromShortString
960
+ * @see ucol_getShortDefinitionString
961
+ *
962
+ * @deprecated ICU 54
963
+ */
964
+
965
+ U_DEPRECATED int32_t U_EXPORT2
966
+ ucol_normalizeShortDefinitionString(const char *source,
967
+ char *destination,
968
+ int32_t capacity,
969
+ UParseError *parseError,
970
+ UErrorCode *status);
971
+ #endif /* U_HIDE_DEPRECATED_API */
972
+
973
+
974
+ /**
975
+ * Get a sort key for a string from a UCollator.
976
+ * Sort keys may be compared using <TT>strcmp</TT>.
977
+ *
978
+ * Note that sort keys are often less efficient than simply doing comparison.
979
+ * For more details, see the ICU User Guide.
980
+ *
981
+ * Like ICU functions that write to an output buffer, the buffer contents
982
+ * is undefined if the buffer capacity (resultLength parameter) is too small.
983
+ * Unlike ICU functions that write a string to an output buffer,
984
+ * the terminating zero byte is counted in the sort key length.
985
+ * @param coll The UCollator containing the collation rules.
986
+ * @param source The string to transform.
987
+ * @param sourceLength The length of source, or -1 if null-terminated.
988
+ * @param result A pointer to a buffer to receive the attribute.
989
+ * @param resultLength The maximum size of result.
990
+ * @return The size needed to fully store the sort key.
991
+ * If there was an internal error generating the sort key,
992
+ * a zero value is returned.
993
+ * @see ucol_keyHashCode
994
+ * @stable ICU 2.0
995
+ */
996
+ U_STABLE int32_t U_EXPORT2
997
+ ucol_getSortKey(const UCollator *coll,
998
+ const UChar *source,
999
+ int32_t sourceLength,
1000
+ uint8_t *result,
1001
+ int32_t resultLength);
1002
+
1003
+
1004
+ /** Gets the next count bytes of a sort key. Caller needs
1005
+ * to preserve state array between calls and to provide
1006
+ * the same type of UCharIterator set with the same string.
1007
+ * The destination buffer provided must be big enough to store
1008
+ * the number of requested bytes.
1009
+ *
1010
+ * The generated sort key may or may not be compatible with
1011
+ * sort keys generated using ucol_getSortKey().
1012
+ * @param coll The UCollator containing the collation rules.
1013
+ * @param iter UCharIterator containing the string we need
1014
+ * the sort key to be calculated for.
1015
+ * @param state Opaque state of sortkey iteration.
1016
+ * @param dest Buffer to hold the resulting sortkey part
1017
+ * @param count number of sort key bytes required.
1018
+ * @param status error code indicator.
1019
+ * @return the actual number of bytes of a sortkey. It can be
1020
+ * smaller than count if we have reached the end of
1021
+ * the sort key.
1022
+ * @stable ICU 2.6
1023
+ */
1024
+ U_STABLE int32_t U_EXPORT2
1025
+ ucol_nextSortKeyPart(const UCollator *coll,
1026
+ UCharIterator *iter,
1027
+ uint32_t state[2],
1028
+ uint8_t *dest, int32_t count,
1029
+ UErrorCode *status);
1030
+
1031
+ /** enum that is taken by ucol_getBound API
1032
+ * See below for explanation
1033
+ * do not change the values assigned to the
1034
+ * members of this enum. Underlying code
1035
+ * depends on them having these numbers
1036
+ * @stable ICU 2.0
1037
+ */
1038
+ typedef enum {
1039
+ /** lower bound */
1040
+ UCOL_BOUND_LOWER = 0,
1041
+ /** upper bound that will match strings of exact size */
1042
+ UCOL_BOUND_UPPER = 1,
1043
+ /** upper bound that will match all the strings that have the same initial substring as the given string */
1044
+ UCOL_BOUND_UPPER_LONG = 2,
1045
+ UCOL_BOUND_VALUE_COUNT
1046
+ } UColBoundMode;
1047
+
1048
+ /**
1049
+ * Produce a bound for a given sortkey and a number of levels.
1050
+ * Return value is always the number of bytes needed, regardless of
1051
+ * whether the result buffer was big enough or even valid.<br>
1052
+ * Resulting bounds can be used to produce a range of strings that are
1053
+ * between upper and lower bounds. For example, if bounds are produced
1054
+ * for a sortkey of string "smith", strings between upper and lower
1055
+ * bounds with one level would include "Smith", "SMITH", "sMiTh".<br>
1056
+ * There are two upper bounds that can be produced. If UCOL_BOUND_UPPER
1057
+ * is produced, strings matched would be as above. However, if bound
1058
+ * produced using UCOL_BOUND_UPPER_LONG is used, the above example will
1059
+ * also match "Smithsonian" and similar.<br>
1060
+ * For more on usage, see example in cintltst/capitst.c in procedure
1061
+ * TestBounds.
1062
+ * Sort keys may be compared using <TT>strcmp</TT>.
1063
+ * @param source The source sortkey.
1064
+ * @param sourceLength The length of source, or -1 if null-terminated.
1065
+ * (If an unmodified sortkey is passed, it is always null
1066
+ * terminated).
1067
+ * @param boundType Type of bound required. It can be UCOL_BOUND_LOWER, which
1068
+ * produces a lower inclusive bound, UCOL_BOUND_UPPER, that
1069
+ * produces upper bound that matches strings of the same length
1070
+ * or UCOL_BOUND_UPPER_LONG that matches strings that have the
1071
+ * same starting substring as the source string.
1072
+ * @param noOfLevels Number of levels required in the resulting bound (for most
1073
+ * uses, the recommended value is 1). See users guide for
1074
+ * explanation on number of levels a sortkey can have.
1075
+ * @param result A pointer to a buffer to receive the resulting sortkey.
1076
+ * @param resultLength The maximum size of result.
1077
+ * @param status Used for returning error code if something went wrong. If the
1078
+ * number of levels requested is higher than the number of levels
1079
+ * in the source key, a warning (U_SORT_KEY_TOO_SHORT_WARNING) is
1080
+ * issued.
1081
+ * @return The size needed to fully store the bound.
1082
+ * @see ucol_keyHashCode
1083
+ * @stable ICU 2.1
1084
+ */
1085
+ U_STABLE int32_t U_EXPORT2
1086
+ ucol_getBound(const uint8_t *source,
1087
+ int32_t sourceLength,
1088
+ UColBoundMode boundType,
1089
+ uint32_t noOfLevels,
1090
+ uint8_t *result,
1091
+ int32_t resultLength,
1092
+ UErrorCode *status);
1093
+
1094
+ /**
1095
+ * Gets the version information for a Collator. Version is currently
1096
+ * an opaque 32-bit number which depends, among other things, on major
1097
+ * versions of the collator tailoring and UCA.
1098
+ * @param coll The UCollator to query.
1099
+ * @param info the version # information, the result will be filled in
1100
+ * @stable ICU 2.0
1101
+ */
1102
+ U_STABLE void U_EXPORT2
1103
+ ucol_getVersion(const UCollator* coll, UVersionInfo info);
1104
+
1105
+ /**
1106
+ * Gets the UCA version information for a Collator. Version is the
1107
+ * UCA version number (3.1.1, 4.0).
1108
+ * @param coll The UCollator to query.
1109
+ * @param info the version # information, the result will be filled in
1110
+ * @stable ICU 2.8
1111
+ */
1112
+ U_STABLE void U_EXPORT2
1113
+ ucol_getUCAVersion(const UCollator* coll, UVersionInfo info);
1114
+
1115
+ /**
1116
+ * Merges two sort keys. The levels are merged with their corresponding counterparts
1117
+ * (primaries with primaries, secondaries with secondaries etc.). Between the values
1118
+ * from the same level a separator is inserted.
1119
+ *
1120
+ * This is useful, for example, for combining sort keys from first and last names
1121
+ * to sort such pairs.
1122
+ * See http://www.unicode.org/reports/tr10/#Merging_Sort_Keys
1123
+ *
1124
+ * The recommended way to achieve "merged" sorting is by
1125
+ * concatenating strings with U+FFFE between them.
1126
+ * The concatenation has the same sort order as the merged sort keys,
1127
+ * but merge(getSortKey(str1), getSortKey(str2)) may differ from getSortKey(str1 + '\uFFFE' + str2).
1128
+ * Using strings with U+FFFE may yield shorter sort keys.
1129
+ *
1130
+ * For details about Sort Key Features see
1131
+ * http://userguide.icu-project.org/collation/api#TOC-Sort-Key-Features
1132
+ *
1133
+ * It is possible to merge multiple sort keys by consecutively merging
1134
+ * another one with the intermediate result.
1135
+ *
1136
+ * The length of the merge result is the sum of the lengths of the input sort keys.
1137
+ *
1138
+ * Example (uncompressed):
1139
+ * <pre>191B1D 01 050505 01 910505 00
1140
+ * 1F2123 01 050505 01 910505 00</pre>
1141
+ * will be merged as
1142
+ * <pre>191B1D 02 1F2123 01 050505 02 050505 01 910505 02 910505 00</pre>
1143
+ *
1144
+ * If the destination buffer is not big enough, then its contents are undefined.
1145
+ * If any of source lengths are zero or any of the source pointers are NULL/undefined,
1146
+ * the result is of size zero.
1147
+ *
1148
+ * @param src1 the first sort key
1149
+ * @param src1Length the length of the first sort key, including the zero byte at the end;
1150
+ * can be -1 if the function is to find the length
1151
+ * @param src2 the second sort key
1152
+ * @param src2Length the length of the second sort key, including the zero byte at the end;
1153
+ * can be -1 if the function is to find the length
1154
+ * @param dest the buffer where the merged sort key is written,
1155
+ * can be NULL if destCapacity==0
1156
+ * @param destCapacity the number of bytes in the dest buffer
1157
+ * @return the length of the merged sort key, src1Length+src2Length;
1158
+ * can be larger than destCapacity, or 0 if an error occurs (only for illegal arguments),
1159
+ * in which cases the contents of dest is undefined
1160
+ * @stable ICU 2.0
1161
+ */
1162
+ U_STABLE int32_t U_EXPORT2
1163
+ ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length,
1164
+ const uint8_t *src2, int32_t src2Length,
1165
+ uint8_t *dest, int32_t destCapacity);
1166
+
1167
+ /**
1168
+ * Universal attribute setter
1169
+ * @param coll collator which attributes are to be changed
1170
+ * @param attr attribute type
1171
+ * @param value attribute value
1172
+ * @param status to indicate whether the operation went on smoothly or there were errors
1173
+ * @see UColAttribute
1174
+ * @see UColAttributeValue
1175
+ * @see ucol_getAttribute
1176
+ * @stable ICU 2.0
1177
+ */
1178
+ U_STABLE void U_EXPORT2
1179
+ ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value, UErrorCode *status);
1180
+
1181
+ /**
1182
+ * Universal attribute getter
1183
+ * @param coll collator which attributes are to be changed
1184
+ * @param attr attribute type
1185
+ * @return attribute value
1186
+ * @param status to indicate whether the operation went on smoothly or there were errors
1187
+ * @see UColAttribute
1188
+ * @see UColAttributeValue
1189
+ * @see ucol_setAttribute
1190
+ * @stable ICU 2.0
1191
+ */
1192
+ U_STABLE UColAttributeValue U_EXPORT2
1193
+ ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status);
1194
+
1195
+ #ifndef U_HIDE_DRAFT_API
1196
+
1197
+ /**
1198
+ * Sets the variable top to the top of the specified reordering group.
1199
+ * The variable top determines the highest-sorting character
1200
+ * which is affected by UCOL_ALTERNATE_HANDLING.
1201
+ * If that attribute is set to UCOL_NON_IGNORABLE, then the variable top has no effect.
1202
+ * @param coll the collator
1203
+ * @param group one of UCOL_REORDER_CODE_SPACE, UCOL_REORDER_CODE_PUNCTUATION,
1204
+ * UCOL_REORDER_CODE_SYMBOL, UCOL_REORDER_CODE_CURRENCY;
1205
+ * or UCOL_REORDER_CODE_DEFAULT to restore the default max variable group
1206
+ * @param pErrorCode Standard ICU error code. Its input value must
1207
+ * pass the U_SUCCESS() test, or else the function returns
1208
+ * immediately. Check for U_FAILURE() on output or use with
1209
+ * function chaining. (See User Guide for details.)
1210
+ * @see ucol_getMaxVariable
1211
+ * @draft ICU 53
1212
+ */
1213
+ U_DRAFT void U_EXPORT2
1214
+ ucol_setMaxVariable(UCollator *coll, UColReorderCode group, UErrorCode *pErrorCode);
1215
+
1216
+ /**
1217
+ * Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING.
1218
+ * @param coll the collator
1219
+ * @return the maximum variable reordering group.
1220
+ * @see ucol_setMaxVariable
1221
+ * @draft ICU 53
1222
+ */
1223
+ U_DRAFT UColReorderCode U_EXPORT2
1224
+ ucol_getMaxVariable(const UCollator *coll);
1225
+
1226
+ #endif /* U_HIDE_DRAFT_API */
1227
+
1228
+ #ifndef U_HIDE_DEPRECATED_API
1229
+ /**
1230
+ * Sets the variable top to the primary weight of the specified string.
1231
+ *
1232
+ * Beginning with ICU 53, the variable top is pinned to
1233
+ * the top of one of the supported reordering groups,
1234
+ * and it must not be beyond the last of those groups.
1235
+ * See ucol_setMaxVariable().
1236
+ * @param coll the collator
1237
+ * @param varTop one or more (if contraction) UChars to which the variable top should be set
1238
+ * @param len length of variable top string. If -1 it is considered to be zero terminated.
1239
+ * @param status error code. If error code is set, the return value is undefined.
1240
+ * Errors set by this function are:<br>
1241
+ * U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such contraction<br>
1242
+ * U_ILLEGAL_ARGUMENT_ERROR if the variable top is beyond
1243
+ * the last reordering group supported by ucol_setMaxVariable()
1244
+ * @return variable top primary weight
1245
+ * @see ucol_getVariableTop
1246
+ * @see ucol_restoreVariableTop
1247
+ * @deprecated ICU 53 Call ucol_setMaxVariable() instead.
1248
+ */
1249
+ U_DEPRECATED uint32_t U_EXPORT2
1250
+ ucol_setVariableTop(UCollator *coll,
1251
+ const UChar *varTop, int32_t len,
1252
+ UErrorCode *status);
1253
+ #endif /* U_HIDE_DEPRECATED_API */
1254
+
1255
+ /**
1256
+ * Gets the variable top value of a Collator.
1257
+ * @param coll collator which variable top needs to be retrieved
1258
+ * @param status error code (not changed by function). If error code is set,
1259
+ * the return value is undefined.
1260
+ * @return the variable top primary weight
1261
+ * @see ucol_getMaxVariable
1262
+ * @see ucol_setVariableTop
1263
+ * @see ucol_restoreVariableTop
1264
+ * @stable ICU 2.0
1265
+ */
1266
+ U_STABLE uint32_t U_EXPORT2 ucol_getVariableTop(const UCollator *coll, UErrorCode *status);
1267
+
1268
+ /**
1269
+ * Sets the variable top to the specified primary weight.
1270
+ *
1271
+ * Beginning with ICU 53, the variable top is pinned to
1272
+ * the top of one of the supported reordering groups,
1273
+ * and it must not be beyond the last of those groups.
1274
+ * See ucol_setMaxVariable().
1275
+ * @param varTop primary weight, as returned by ucol_setVariableTop or ucol_getVariableTop
1276
+ * @param status error code
1277
+ * @see ucol_getVariableTop
1278
+ * @see ucol_setVariableTop
1279
+ * @deprecated ICU 53 Call ucol_setMaxVariable() instead.
1280
+ */
1281
+ U_DEPRECATED void U_EXPORT2
1282
+ ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *status);
1283
+
1284
+ /**
1285
+ * Thread safe cloning operation. The result is a clone of a given collator.
1286
+ * @param coll collator to be cloned
1287
+ * @param stackBuffer <em>Deprecated functionality as of ICU 52, use NULL.</em><br>
1288
+ * user allocated space for the new clone.
1289
+ * If NULL new memory will be allocated.
1290
+ * If buffer is not large enough, new memory will be allocated.
1291
+ * Clients can use the U_COL_SAFECLONE_BUFFERSIZE.
1292
+ * @param pBufferSize <em>Deprecated functionality as of ICU 52, use NULL or 1.</em><br>
1293
+ * pointer to size of allocated space.
1294
+ * If *pBufferSize == 0, a sufficient size for use in cloning will
1295
+ * be returned ('pre-flighting')
1296
+ * If *pBufferSize is not enough for a stack-based safe clone,
1297
+ * new memory will be allocated.
1298
+ * @param status to indicate whether the operation went on smoothly or there were errors
1299
+ * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any
1300
+ * allocations were necessary.
1301
+ * @return pointer to the new clone
1302
+ * @see ucol_open
1303
+ * @see ucol_openRules
1304
+ * @see ucol_close
1305
+ * @stable ICU 2.0
1306
+ */
1307
+ U_STABLE UCollator* U_EXPORT2
1308
+ ucol_safeClone(const UCollator *coll,
1309
+ void *stackBuffer,
1310
+ int32_t *pBufferSize,
1311
+ UErrorCode *status);
1312
+
1313
+ #ifndef U_HIDE_DEPRECATED_API
1314
+
1315
+ /** default memory size for the new clone.
1316
+ * @deprecated ICU 52. Do not rely on ucol_safeClone() cloning into any provided buffer.
1317
+ */
1318
+ #define U_COL_SAFECLONE_BUFFERSIZE 1
1319
+
1320
+ #endif /* U_HIDE_DEPRECATED_API */
1321
+
1322
+ /**
1323
+ * Returns current rules. Delta defines whether full rules are returned or just the tailoring.
1324
+ * Returns number of UChars needed to store rules. If buffer is NULL or bufferLen is not enough
1325
+ * to store rules, will store up to available space.
1326
+ *
1327
+ * ucol_getRules() should normally be used instead.
1328
+ * See http://userguide.icu-project.org/collation/customization#TOC-Building-on-Existing-Locales
1329
+ * @param coll collator to get the rules from
1330
+ * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES.
1331
+ * @param buffer buffer to store the result in. If NULL, you'll get no rules.
1332
+ * @param bufferLen length of buffer to store rules in. If less than needed you'll get only the part that fits in.
1333
+ * @return current rules
1334
+ * @stable ICU 2.0
1335
+ * @see UCOL_FULL_RULES
1336
+ */
1337
+ U_STABLE int32_t U_EXPORT2
1338
+ ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen);
1339
+
1340
+ #ifndef U_HIDE_DEPRECATED_API
1341
+ /**
1342
+ * gets the locale name of the collator. If the collator
1343
+ * is instantiated from the rules, then this function returns
1344
+ * NULL.
1345
+ * @param coll The UCollator for which the locale is needed
1346
+ * @param type You can choose between requested, valid and actual
1347
+ * locale. For description see the definition of
1348
+ * ULocDataLocaleType in uloc.h
1349
+ * @param status error code of the operation
1350
+ * @return real locale name from which the collation data comes.
1351
+ * If the collator was instantiated from rules, returns
1352
+ * NULL.
1353
+ * @deprecated ICU 2.8 Use ucol_getLocaleByType instead
1354
+ */
1355
+ U_DEPRECATED const char * U_EXPORT2
1356
+ ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status);
1357
+ #endif /* U_HIDE_DEPRECATED_API */
1358
+
1359
+ /**
1360
+ * gets the locale name of the collator. If the collator
1361
+ * is instantiated from the rules, then this function returns
1362
+ * NULL.
1363
+ * @param coll The UCollator for which the locale is needed
1364
+ * @param type You can choose between requested, valid and actual
1365
+ * locale. For description see the definition of
1366
+ * ULocDataLocaleType in uloc.h
1367
+ * @param status error code of the operation
1368
+ * @return real locale name from which the collation data comes.
1369
+ * If the collator was instantiated from rules, returns
1370
+ * NULL.
1371
+ * @stable ICU 2.8
1372
+ */
1373
+ U_STABLE const char * U_EXPORT2
1374
+ ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status);
1375
+
1376
+ /**
1377
+ * Get a Unicode set that contains all the characters and sequences tailored in
1378
+ * this collator. The result must be disposed of by using uset_close.
1379
+ * @param coll The UCollator for which we want to get tailored chars
1380
+ * @param status error code of the operation
1381
+ * @return a pointer to newly created USet. Must be be disposed by using uset_close
1382
+ * @see ucol_openRules
1383
+ * @see uset_close
1384
+ * @stable ICU 2.4
1385
+ */
1386
+ U_STABLE USet * U_EXPORT2
1387
+ ucol_getTailoredSet(const UCollator *coll, UErrorCode *status);
1388
+
1389
+ #ifndef U_HIDE_INTERNAL_API
1390
+ /** Calculates the set of unsafe code points, given a collator.
1391
+ * A character is unsafe if you could append any character and cause the ordering to alter significantly.
1392
+ * Collation sorts in normalized order, so anything that rearranges in normalization can cause this.
1393
+ * Thus if you have a character like a_umlaut, and you add a lower_dot to it,
1394
+ * then it normalizes to a_lower_dot + umlaut, and sorts differently.
1395
+ * @param coll Collator
1396
+ * @param unsafe a fill-in set to receive the unsafe points
1397
+ * @param status for catching errors
1398
+ * @return number of elements in the set
1399
+ * @internal ICU 3.0
1400
+ */
1401
+ U_INTERNAL int32_t U_EXPORT2
1402
+ ucol_getUnsafeSet( const UCollator *coll,
1403
+ USet *unsafe,
1404
+ UErrorCode *status);
1405
+
1406
+ /** Touches all resources needed for instantiating a collator from a short string definition,
1407
+ * thus filling up the cache.
1408
+ * @param definition A short string containing a locale and a set of attributes.
1409
+ * Attributes not explicitly mentioned are left at the default
1410
+ * state for a locale.
1411
+ * @param parseError if not NULL, structure that will get filled with error's pre
1412
+ * and post context in case of error.
1413
+ * @param forceDefaults if FALSE, the settings that are the same as the collator
1414
+ * default settings will not be applied (for example, setting
1415
+ * French secondary on a French collator would not be executed).
1416
+ * If TRUE, all the settings will be applied regardless of the
1417
+ * collator default value. If the definition
1418
+ * strings are to be cached, should be set to FALSE.
1419
+ * @param status Error code. Apart from regular error conditions connected to
1420
+ * instantiating collators (like out of memory or similar), this
1421
+ * API will return an error if an invalid attribute or attribute/value
1422
+ * combination is specified.
1423
+ * @see ucol_openFromShortString
1424
+ * @internal ICU 3.2.1
1425
+ */
1426
+ U_INTERNAL void U_EXPORT2
1427
+ ucol_prepareShortStringOpen( const char *definition,
1428
+ UBool forceDefaults,
1429
+ UParseError *parseError,
1430
+ UErrorCode *status);
1431
+ #endif /* U_HIDE_INTERNAL_API */
1432
+
1433
+ /** Creates a binary image of a collator. This binary image can be stored and
1434
+ * later used to instantiate a collator using ucol_openBinary.
1435
+ * This API supports preflighting.
1436
+ * @param coll Collator
1437
+ * @param buffer a fill-in buffer to receive the binary image
1438
+ * @param capacity capacity of the destination buffer
1439
+ * @param status for catching errors
1440
+ * @return size of the image
1441
+ * @see ucol_openBinary
1442
+ * @stable ICU 3.2
1443
+ */
1444
+ U_STABLE int32_t U_EXPORT2
1445
+ ucol_cloneBinary(const UCollator *coll,
1446
+ uint8_t *buffer, int32_t capacity,
1447
+ UErrorCode *status);
1448
+
1449
+ /** Opens a collator from a collator binary image created using
1450
+ * ucol_cloneBinary. Binary image used in instantiation of the
1451
+ * collator remains owned by the user and should stay around for
1452
+ * the lifetime of the collator. The API also takes a base collator
1453
+ * which must be the root collator.
1454
+ * @param bin binary image owned by the user and required through the
1455
+ * lifetime of the collator
1456
+ * @param length size of the image. If negative, the API will try to
1457
+ * figure out the length of the image
1458
+ * @param base Base collator, for lookup of untailored characters.
1459
+ * Must be the root collator, must not be NULL.
1460
+ * The base is required to be present through the lifetime of the collator.
1461
+ * @param status for catching errors
1462
+ * @return newly created collator
1463
+ * @see ucol_cloneBinary
1464
+ * @stable ICU 3.2
1465
+ */
1466
+ U_STABLE UCollator* U_EXPORT2
1467
+ ucol_openBinary(const uint8_t *bin, int32_t length,
1468
+ const UCollator *base,
1469
+ UErrorCode *status);
1470
+
1471
+
1472
+ #endif /* #if !UCONFIG_NO_COLLATION */
1473
+
1474
+ #endif