pango 2.2.5-x86-mingw32 → 3.0.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +19 -3
  3. data/ext/pango/depend +0 -1
  4. data/ext/pango/extconf.rb +0 -2
  5. data/ext/pango/rbpango.c +44 -6
  6. data/ext/pango/rbpango.h +0 -1
  7. data/ext/pango/rbpangoattribute.c +2 -2
  8. data/ext/pango/rbpangocairo.c +4 -4
  9. data/ext/pango/rbpangocontext.c +2 -2
  10. data/ext/pango/rbpangofontdescription.c +2 -2
  11. data/ext/pango/rbpangogravity.c +2 -2
  12. data/ext/pango/rbpangolanguage.c +8 -0
  13. data/ext/pango/rbpangolayout.c +15 -4
  14. data/ext/pango/rbpangomatrix.c +2 -2
  15. data/ext/pango/rbpangoscript.c +3 -3
  16. data/lib/2.0/pango.so +0 -0
  17. data/lib/2.1/pango.so +0 -0
  18. data/lib/2.2/pango.so +0 -0
  19. data/test/test-language.rb +5 -0
  20. data/test/test-layout.rb +7 -1
  21. data/vendor/local/bin/derb.exe +0 -0
  22. data/vendor/local/bin/genbrk.exe +0 -0
  23. data/vendor/local/bin/genccode.exe +0 -0
  24. data/vendor/local/bin/gencfu.exe +0 -0
  25. data/vendor/local/bin/gencmn.exe +0 -0
  26. data/vendor/local/bin/gencnval.exe +0 -0
  27. data/vendor/local/bin/gendict.exe +0 -0
  28. data/vendor/local/bin/gennorm2.exe +0 -0
  29. data/vendor/local/bin/genrb.exe +0 -0
  30. data/vendor/local/bin/gensprep.exe +0 -0
  31. data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
  32. data/vendor/local/bin/hb-shape.exe +0 -0
  33. data/vendor/local/bin/hb-view.exe +0 -0
  34. data/vendor/local/bin/icu-config +6 -6
  35. data/vendor/local/bin/icuinfo.exe +0 -0
  36. data/vendor/local/bin/icupkg.exe +0 -0
  37. data/vendor/local/bin/libharfbuzz-0.dll +0 -0
  38. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  39. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  40. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  41. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  42. data/vendor/local/bin/makeconv.exe +0 -0
  43. data/vendor/local/bin/pango-querymodules.exe +0 -0
  44. data/vendor/local/bin/pango-view.exe +0 -0
  45. data/vendor/local/bin/pkgdata.exe +0 -0
  46. data/vendor/local/bin/uconv.exe +0 -0
  47. data/vendor/local/etc/pango/pango.modules +1 -1
  48. data/vendor/local/include/harfbuzz/hb-buffer.h +26 -1
  49. data/vendor/local/include/harfbuzz/hb-common.h +7 -0
  50. data/vendor/local/include/harfbuzz/hb-font.h +7 -6
  51. data/vendor/local/include/harfbuzz/hb-ft.h +58 -1
  52. data/vendor/local/include/harfbuzz/hb-glib.h +3 -0
  53. data/vendor/local/include/harfbuzz/hb-ot-font.h +4 -0
  54. data/vendor/local/include/harfbuzz/hb-shape.h +0 -3
  55. data/vendor/local/include/harfbuzz/hb-unicode.h +28 -3
  56. data/vendor/local/include/harfbuzz/hb-version.h +4 -4
  57. data/vendor/local/include/layout/LEFontInstance.h +2 -28
  58. data/vendor/local/include/layout/LETableReference.h +7 -2
  59. data/vendor/local/include/unicode/calendar.h +32 -2
  60. data/vendor/local/include/unicode/coll.h +9 -7
  61. data/vendor/local/include/unicode/datefmt.h +102 -13
  62. data/vendor/local/include/unicode/dcfmtsym.h +4 -2
  63. data/vendor/local/include/unicode/decimfmt.h +4 -5
  64. data/vendor/local/include/unicode/dtfmtsym.h +60 -1
  65. data/vendor/local/include/unicode/dtptngen.h +21 -7
  66. data/vendor/local/include/unicode/localpointer.h +49 -1
  67. data/vendor/local/include/unicode/locid.h +2 -3
  68. data/vendor/local/include/unicode/measfmt.h +30 -37
  69. data/vendor/local/include/unicode/measunit.h +65 -152
  70. data/vendor/local/include/unicode/measure.h +3 -3
  71. data/vendor/local/include/unicode/numfmt.h +3 -5
  72. data/vendor/local/include/unicode/platform.h +12 -2
  73. data/vendor/local/include/unicode/plurrule.h +18 -14
  74. data/vendor/local/include/unicode/rbnf.h +3 -4
  75. data/vendor/local/include/unicode/regex.h +42 -26
  76. data/vendor/local/include/unicode/region.h +9 -9
  77. data/vendor/local/include/unicode/reldatefmt.h +50 -45
  78. data/vendor/local/include/unicode/scientificnumberformatter.h +222 -0
  79. data/vendor/local/include/unicode/smpdtfmt.h +30 -24
  80. data/vendor/local/include/unicode/tblcoll.h +5 -4
  81. data/vendor/local/include/unicode/timezone.h +18 -1
  82. data/vendor/local/include/unicode/ucal.h +2 -2
  83. data/vendor/local/include/unicode/ucol.h +22 -18
  84. data/vendor/local/include/unicode/uconfig.h +17 -2
  85. data/vendor/local/include/unicode/udat.h +164 -56
  86. data/vendor/local/include/unicode/udatpg.h +9 -7
  87. data/vendor/local/include/unicode/ufieldpositer.h +121 -0
  88. data/vendor/local/include/unicode/uidna.h +21 -13
  89. data/vendor/local/include/unicode/ulistformatter.h +130 -0
  90. data/vendor/local/include/unicode/ulocdata.h +4 -3
  91. data/vendor/local/include/unicode/unistr.h +101 -53
  92. data/vendor/local/include/unicode/unum.h +7 -10
  93. data/vendor/local/include/unicode/uregex.h +52 -29
  94. data/vendor/local/include/unicode/urename.h +14 -3
  95. data/vendor/local/include/unicode/uscript.h +30 -16
  96. data/vendor/local/include/unicode/uspoof.h +13 -9
  97. data/vendor/local/include/unicode/utrans.h +5 -7
  98. data/vendor/local/include/unicode/utypes.h +9 -3
  99. data/vendor/local/include/unicode/uvernum.h +8 -8
  100. data/vendor/local/lib/icu/{54.1 → 55.1}/Makefile.inc +5 -5
  101. data/vendor/local/lib/icu/{54.1 → 55.1}/pkgdata.inc +1 -1
  102. data/vendor/local/lib/icu/Makefile.inc +5 -5
  103. data/vendor/local/lib/icu/pkgdata.inc +1 -1
  104. data/vendor/local/lib/icudt.dll +0 -0
  105. data/vendor/local/lib/{icudt54.dll → icudt55.dll} +0 -0
  106. data/vendor/local/lib/icuin.dll +0 -0
  107. data/vendor/local/lib/icuin55.dll +0 -0
  108. data/vendor/local/lib/icuio.dll +0 -0
  109. data/vendor/local/lib/icuio55.dll +0 -0
  110. data/vendor/local/lib/icule.dll +0 -0
  111. data/vendor/local/lib/icule55.dll +0 -0
  112. data/vendor/local/lib/iculx.dll +0 -0
  113. data/vendor/local/lib/iculx55.dll +0 -0
  114. data/vendor/local/lib/icutest.dll +0 -0
  115. data/vendor/local/lib/icutest55.dll +0 -0
  116. data/vendor/local/lib/icutu.dll +0 -0
  117. data/vendor/local/lib/icutu55.dll +0 -0
  118. data/vendor/local/lib/icuuc.dll +0 -0
  119. data/vendor/local/lib/icuuc55.dll +0 -0
  120. data/vendor/local/lib/libharfbuzz-icu.a +0 -0
  121. data/vendor/local/lib/libharfbuzz-icu.la +7 -7
  122. data/vendor/local/lib/libharfbuzz.dll.a +0 -0
  123. data/vendor/local/lib/libharfbuzz.la +7 -7
  124. data/vendor/local/lib/libicudt.dll.a +0 -0
  125. data/vendor/local/lib/libicuin.dll.a +0 -0
  126. data/vendor/local/lib/libicuio.dll.a +0 -0
  127. data/vendor/local/lib/libicule.dll.a +0 -0
  128. data/vendor/local/lib/libiculx.dll.a +0 -0
  129. data/vendor/local/lib/libicutest.dll.a +0 -0
  130. data/vendor/local/lib/libicutu.dll.a +0 -0
  131. data/vendor/local/lib/libicuuc.dll.a +0 -0
  132. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  133. data/vendor/local/lib/libpango-1.0.la +2 -2
  134. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  135. data/vendor/local/lib/libpangocairo-1.0.la +1 -1
  136. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  137. data/vendor/local/lib/libpangoft2-1.0.la +2 -2
  138. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  139. data/vendor/local/lib/libpangowin32-1.0.la +2 -2
  140. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
  141. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
  142. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +2 -2
  143. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
  144. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
  145. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +2 -2
  146. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
  147. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
  148. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +2 -2
  149. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
  150. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
  151. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +2 -2
  152. data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +1 -1
  153. data/vendor/local/lib/pkgconfig/harfbuzz.pc +3 -1
  154. data/vendor/local/lib/pkgconfig/icu-i18n.pc +5 -5
  155. data/vendor/local/lib/pkgconfig/icu-io.pc +5 -5
  156. data/vendor/local/lib/pkgconfig/icu-le.pc +5 -5
  157. data/vendor/local/lib/pkgconfig/icu-lx.pc +5 -5
  158. data/vendor/local/lib/pkgconfig/icu-uc.pc +5 -5
  159. data/vendor/local/share/gtk-doc/html/harfbuzz/adding-text-to-the-buffer.html +35 -0
  160. data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +30 -35
  161. data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +158 -27
  162. data/vendor/local/share/gtk-doc/html/harfbuzz/buffers-language-script-and-direction.html +87 -0
  163. data/vendor/local/share/gtk-doc/html/harfbuzz/{ch01.html → ch06.html} +12 -13
  164. data/vendor/local/share/gtk-doc/html/harfbuzz/customizing-unicode-functions.html +31 -0
  165. data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +7 -8
  166. data/vendor/local/share/gtk-doc/html/harfbuzz/fonts-and-faces.html +40 -0
  167. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-Shaping.html +352 -0
  168. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +88 -47
  169. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +128 -204
  170. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +290 -304
  171. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +14 -23
  172. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +14 -17
  173. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +40 -51
  174. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +126 -190
  175. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +19 -24
  176. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +14 -29
  177. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +438 -11
  178. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +14 -25
  179. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +14 -29
  180. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +19 -160
  181. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +21 -36
  182. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +14 -11
  183. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +70 -81
  184. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +33 -44
  185. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +290 -323
  186. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +14 -23
  187. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +59 -27
  188. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +16 -13
  189. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +415 -104
  190. data/vendor/local/share/gtk-doc/html/harfbuzz/hello-harfbuzz.html +181 -0
  191. data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +43 -12
  192. data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +11 -13
  193. data/vendor/local/share/gtk-doc/html/harfbuzz/plans-and-caching.html +31 -0
  194. data/vendor/local/share/gtk-doc/html/harfbuzz/pt01.html +70 -0
  195. data/vendor/local/share/gtk-doc/html/harfbuzz/pt02.html +107 -0
  196. data/vendor/local/share/gtk-doc/html/harfbuzz/setting-buffer-properties.html +31 -0
  197. data/vendor/local/share/gtk-doc/html/harfbuzz/shaping-and-shape-plans.html +39 -0
  198. data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +9 -6
  199. data/vendor/local/share/gtk-doc/html/harfbuzz/using-harfbuzzs-native-opentype-implementation.html +31 -0
  200. data/vendor/local/share/gtk-doc/html/harfbuzz/using-your-own-font-functions.html +31 -0
  201. data/vendor/local/share/gtk-doc/html/harfbuzz/what-about-the-other-scripts.html +31 -0
  202. data/vendor/local/share/gtk-doc/html/harfbuzz/what-is-harfbuzz.html +124 -0
  203. data/vendor/local/share/gtk-doc/html/harfbuzz/why-is-it-called-harfbuzz.html +38 -0
  204. data/vendor/local/share/icu/{54.1 → 55.1}/config/mh-mingw +0 -0
  205. data/vendor/local/share/icu/{54.1 → 55.1}/install-sh +0 -0
  206. data/vendor/local/share/icu/{54.1 → 55.1}/license.html +3 -4
  207. data/vendor/local/share/icu/{54.1 → 55.1}/mkinstalldirs +0 -0
  208. data/vendor/local/share/man/man1/derb.1 +2 -2
  209. data/vendor/local/share/man/man1/genbrk.1 +2 -2
  210. data/vendor/local/share/man/man1/gencfu.1 +1 -1
  211. data/vendor/local/share/man/man1/gencnval.1 +3 -3
  212. data/vendor/local/share/man/man1/gendict.1 +2 -2
  213. data/vendor/local/share/man/man1/genrb.1 +3 -3
  214. data/vendor/local/share/man/man1/icu-config.1 +2 -2
  215. data/vendor/local/share/man/man1/makeconv.1 +3 -3
  216. data/vendor/local/share/man/man1/pkgdata.1 +2 -2
  217. data/vendor/local/share/man/man1/uconv.1 +2 -2
  218. data/vendor/local/share/man/man8/genccode.8 +2 -2
  219. data/vendor/local/share/man/man8/gencmn.8 +3 -3
  220. data/vendor/local/share/man/man8/gensprep.8 +3 -3
  221. data/vendor/local/share/man/man8/icupkg.8 +1 -1
  222. metadata +38 -22
  223. data/vendor/local/include/unicode/scientificformathelper.h +0 -139
  224. data/vendor/local/lib/icuin54.dll +0 -0
  225. data/vendor/local/lib/icuio54.dll +0 -0
  226. data/vendor/local/lib/icule54.dll +0 -0
  227. data/vendor/local/lib/iculx54.dll +0 -0
  228. data/vendor/local/lib/icutest54.dll +0 -0
  229. data/vendor/local/lib/icutu54.dll +0 -0
  230. data/vendor/local/lib/icuuc54.dll +0 -0
  231. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +0 -286
  232. data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +0 -496
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  ********************************************************************************
3
- * Copyright (C) 1997-2014, International Business Machines
3
+ * Copyright (C) 1997-2015, International Business Machines
4
4
  * Corporation and others. All Rights Reserved.
5
5
  ********************************************************************************
6
6
  *
@@ -408,6 +408,38 @@ public:
408
408
  */
409
409
  void setAmPmStrings(const UnicodeString* ampms, int32_t count);
410
410
 
411
+ #ifndef U_HIDE_INTERNAL_API
412
+ /**
413
+ * This default time separator is used for formatting when the locale
414
+ * doesn't specify any time separator, and always recognized when parsing.
415
+ * @internal
416
+ */
417
+ static const UChar DEFAULT_TIME_SEPARATOR = 0x003a; // ':'
418
+
419
+ /**
420
+ * This alternate time separator is always recognized when parsing.
421
+ * @internal
422
+ */
423
+ static const UChar ALTERNATE_TIME_SEPARATOR = 0x002e; // '.'
424
+ #endif /* U_HIDE_INTERNAL_API */
425
+
426
+ #ifndef U_HIDE_DRAFT_API
427
+ /**
428
+ * Gets the time separator string. For example: ":".
429
+ * @param result Output param which will receive the time separator string.
430
+ * @return A reference to 'result'.
431
+ * @draft ICU 55
432
+ */
433
+ UnicodeString& getTimeSeparatorString(UnicodeString& result) const;
434
+
435
+ /**
436
+ * Sets the time separator string. For example: ":".
437
+ * @param newTimeSeparator the new time separator string.
438
+ * @draft ICU 55
439
+ */
440
+ void setTimeSeparatorString(const UnicodeString& newTimeSeparator);
441
+ #endif /* U_HIDE_DRAFT_API */
442
+
411
443
  #ifndef U_HIDE_DRAFT_API
412
444
  /**
413
445
  * Gets cyclic year name strings if the calendar has them, by width and context.
@@ -710,6 +742,17 @@ private:
710
742
  UnicodeString* fAmPms;
711
743
  int32_t fAmPmsCount;
712
744
 
745
+ /**
746
+ * Narrow Ampm strings. For example: "a" and "p".
747
+ */
748
+ UnicodeString* fNarrowAmPms;
749
+ int32_t fNarrowAmPmsCount;
750
+
751
+ /**
752
+ * Time separator string. For example: ":".
753
+ */
754
+ UnicodeString fTimeSeparator;
755
+
713
756
  /**
714
757
  * Quarter strings. For example: "1st quarter", "2nd quarter", etc.
715
758
  */
@@ -902,6 +945,22 @@ private:
902
945
  * Returns TRUE if c (repeated count times) is the pattern character for a numeric field.
903
946
  */
904
947
  static UBool U_EXPORT2 isNumericPatternChar(UChar c, int32_t count);
948
+ public:
949
+ #ifndef U_HIDE_INTERNAL_API
950
+ /**
951
+ * Gets a DateFormatSymbols by locale.
952
+ * Unlike the constructors which always use gregorian calendar, this
953
+ * method uses the calendar in the locale. If the locale contains no
954
+ * explicit calendar, this method uses the default calendar for that
955
+ * locale.
956
+ * @param locale the locale.
957
+ * @param status error returned here.
958
+ * @return the new DateFormatSymbols which the caller owns.
959
+ * @internal For ICU use only.
960
+ */
961
+ static DateFormatSymbols * U_EXPORT2 createForLocale(
962
+ const Locale &locale, UErrorCode &status);
963
+ #endif /* U_HIDE_INTERNAL_API */
905
964
  };
906
965
 
907
966
  U_NAMESPACE_END
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  *******************************************************************************
3
- * Copyright (C) 2007-2013, International Business Machines Corporation and
3
+ * Copyright (C) 2007-2015, International Business Machines Corporation and
4
4
  * others. All Rights Reserved.
5
5
  *******************************************************************************
6
6
  *
@@ -31,6 +31,7 @@ class DateTimeMatcher;
31
31
  class DistanceInfo;
32
32
  class PatternMap;
33
33
  class PtnSkeleton;
34
+ class SharedDateTimePatternGenerator;
34
35
 
35
36
  /**
36
37
  * This class provides flexible generation of date format patterns, like "yy-MM-dd".
@@ -65,6 +66,17 @@ public:
65
66
  */
66
67
  static DateTimePatternGenerator* U_EXPORT2 createInstance(const Locale& uLocale, UErrorCode& status);
67
68
 
69
+ #ifndef U_HIDE_INTERNAL_API
70
+
71
+ /**
72
+ * For ICU use only
73
+ *
74
+ * @internal
75
+ */
76
+ static DateTimePatternGenerator* U_EXPORT2 internalMakeInstance(const Locale& uLocale, UErrorCode& status);
77
+
78
+ #endif /* U_HIDE_INTERNAL_API */
79
+
68
80
  /**
69
81
  * Create an empty generator, to be constructed with addPattern(...) etc.
70
82
  * @param status Output param set to success/failure code on exit,
@@ -215,22 +227,24 @@ public:
215
227
  const UnicodeString& getAppendItemName(UDateTimePatternField field) const;
216
228
 
217
229
  /**
218
- * The date time format is a message format pattern used to compose date and
219
- * time patterns. The default value is "{0} {1}", where {0} will be replaced
220
- * by the date pattern and {1} will be replaced by the time pattern.
230
+ * The DateTimeFormat is a message format pattern used to compose date and
231
+ * time patterns. The default pattern in the root locale is "{1} {0}", where
232
+ * {1} will be replaced by the date pattern and {0} will be replaced by the
233
+ * time pattern; however, other locales may specify patterns such as
234
+ * "{1}, {0}" or "{1} 'at' {0}", etc.
221
235
  * <p>
222
236
  * This is used when the input skeleton contains both date and time fields,
223
237
  * but there is not a close match among the added patterns. For example,
224
238
  * suppose that this object was created by adding "dd-MMM" and "hh:mm", and
225
- * its datetimeFormat is the default "{0} {1}". Then if the input skeleton
239
+ * its datetimeFormat is the default "{1} {0}". Then if the input skeleton
226
240
  * is "MMMdhmm", there is not an exact match, so the input skeleton is
227
241
  * broken up into two components "MMMd" and "hmm". There are close matches
228
242
  * for those two skeletons, so the result is put together with this pattern,
229
243
  * resulting in "d-MMM h:mm".
230
244
  *
231
245
  * @param dateTimeFormat
232
- * message format pattern, here {0} will be replaced by the date
233
- * pattern and {1} will be replaced by the time pattern.
246
+ * message format pattern, here {1} will be replaced by the date
247
+ * pattern and {0} will be replaced by the time pattern.
234
248
  * @stable ICU 3.8
235
249
  */
236
250
  void setDateTimeFormat(const UnicodeString& dateTimeFormat);
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  *******************************************************************************
3
3
  *
4
- * Copyright (C) 2009-2012, International Business Machines
4
+ * Copyright (C) 2009-2014, International Business Machines
5
5
  * Corporation and others. All Rights Reserved.
6
6
  *
7
7
  *******************************************************************************
@@ -191,6 +191,26 @@ public:
191
191
  * @stable ICU 4.4
192
192
  */
193
193
  explicit LocalPointer(T *p=NULL) : LocalPointerBase<T>(p) {}
194
+ #ifndef U_HIDE_DRAFT_API
195
+ /**
196
+ * Constructor takes ownership and reports an error if NULL.
197
+ *
198
+ * This constructor is intended to be used with other-class constructors
199
+ * that may report a failure UErrorCode,
200
+ * so that callers need to check only for U_FAILURE(errorCode)
201
+ * and not also separately for isNull().
202
+ *
203
+ * @param p simple pointer to an object that is adopted
204
+ * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
205
+ * if p==NULL and no other failure code had been set
206
+ * @draft ICU 55
207
+ */
208
+ LocalPointer(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) {
209
+ if(p==NULL && U_SUCCESS(errorCode)) {
210
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
211
+ }
212
+ }
213
+ #endif /* U_HIDE_DRAFT_API */
194
214
  /**
195
215
  * Destructor deletes the object it owns.
196
216
  * @stable ICU 4.4
@@ -208,6 +228,34 @@ public:
208
228
  delete LocalPointerBase<T>::ptr;
209
229
  LocalPointerBase<T>::ptr=p;
210
230
  }
231
+ #ifndef U_HIDE_DRAFT_API
232
+ /**
233
+ * Deletes the object it owns,
234
+ * and adopts (takes ownership of) the one passed in.
235
+ *
236
+ * If U_FAILURE(errorCode), then the current object is retained and the new one deleted.
237
+ *
238
+ * If U_SUCCESS(errorCode) but the input pointer is NULL,
239
+ * then U_MEMORY_ALLOCATION_ERROR is set,
240
+ * the current object is deleted, and NULL is set.
241
+ *
242
+ * @param p simple pointer to an object that is adopted
243
+ * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
244
+ * if p==NULL and no other failure code had been set
245
+ * @draft ICU 55
246
+ */
247
+ void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) {
248
+ if(U_SUCCESS(errorCode)) {
249
+ delete LocalPointerBase<T>::ptr;
250
+ LocalPointerBase<T>::ptr=p;
251
+ if(p==NULL) {
252
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
253
+ }
254
+ } else {
255
+ delete p;
256
+ }
257
+ }
258
+ #endif /* U_HIDE_DRAFT_API */
211
259
  };
212
260
 
213
261
  /**
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  ******************************************************************************
3
3
  *
4
- * Copyright (C) 1996-2014, International Business Machines
4
+ * Copyright (C) 1996-2015, International Business Machines
5
5
  * Corporation and others. All Rights Reserved.
6
6
  *
7
7
  ******************************************************************************
@@ -750,7 +750,7 @@ private:
750
750
  char fullNameBuffer[ULOC_FULLNAME_CAPACITY];
751
751
  // name without keywords
752
752
  char* baseName;
753
- char baseNameBuffer[ULOC_FULLNAME_CAPACITY];
753
+ void initBaseName(UErrorCode& status);
754
754
 
755
755
  UBool fIsBogus;
756
756
 
@@ -795,7 +795,6 @@ Locale::getScript() const
795
795
  inline const char *
796
796
  Locale::getVariant() const
797
797
  {
798
- getBaseName(); // lazy init
799
798
  return &baseName[variantBegin];
800
799
  }
801
800
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  **********************************************************************
3
- * Copyright (c) 2004-2014, International Business Machines
3
+ * Copyright (c) 2004-2015, International Business Machines
4
4
  * Corporation and others. All Rights Reserved.
5
5
  **********************************************************************
6
6
  * Author: Alan Liu
@@ -29,45 +29,43 @@
29
29
  * For example, for English, when formatting "3 hours"
30
30
  * Wide is "3 hours"; short is "3 hrs"; narrow is "3h";
31
31
  * formatting "3 hours 17 minutes" as numeric give "3:17"
32
- * @draft ICU 53
32
+ * @stable ICU 53
33
33
  */
34
34
  enum UMeasureFormatWidth {
35
35
 
36
- #ifndef U_HIDE_DRAFT_API
37
36
  // Wide, short, and narrow must be first and in this order.
38
37
  /**
39
38
  * Spell out measure units.
40
- * @draft ICU 53
39
+ * @stable ICU 53
41
40
  */
42
41
  UMEASFMT_WIDTH_WIDE,
43
42
 
44
43
  /**
45
44
  * Abbreviate measure units.
46
- * @draft ICU 53
45
+ * @stable ICU 53
47
46
  */
48
47
  UMEASFMT_WIDTH_SHORT,
49
48
 
50
49
  /**
51
50
  * Use symbols for measure units when possible.
52
- * @draft ICU 53
51
+ * @stable ICU 53
53
52
  */
54
53
  UMEASFMT_WIDTH_NARROW,
55
54
 
56
55
  /**
57
56
  * Completely omit measure units when possible. For example, format
58
57
  * '5 hours, 37 minutes' as '5:37'
59
- * @draft ICU 53
58
+ * @stable ICU 53
60
59
  */
61
60
  UMEASFMT_WIDTH_NUMERIC,
62
- #endif /* U_HIDE_DRAFT_API */
63
61
 
64
62
  /**
65
63
  * Count of values in this enum.
66
- * @draft ICU 53
64
+ * @stable ICU 53
67
65
  */
68
66
  UMEASFMT_WIDTH_COUNT = 4
69
67
  };
70
- /** @draft ICU 53 */
68
+ /** @stable ICU 53 */
71
69
  typedef enum UMeasureFormatWidth UMeasureFormatWidth;
72
70
 
73
71
  U_NAMESPACE_BEGIN
@@ -97,34 +95,32 @@ class U_I18N_API MeasureFormat : public Format {
97
95
  using Format::parseObject;
98
96
  using Format::format;
99
97
 
100
- #ifndef U_HIDE_DRAFT_API
101
98
  /**
102
99
  * Constructor.
103
- * @draft ICU 53
100
+ * @stable ICU 53
104
101
  */
105
102
  MeasureFormat(
106
103
  const Locale &locale, UMeasureFormatWidth width, UErrorCode &status);
107
104
 
108
105
  /**
109
106
  * Constructor.
110
- * @draft ICU 53
107
+ * @stable ICU 53
111
108
  */
112
109
  MeasureFormat(
113
110
  const Locale &locale,
114
111
  UMeasureFormatWidth width,
115
112
  NumberFormat *nfToAdopt,
116
113
  UErrorCode &status);
117
- #endif /* U_HIDE_DRAFT_API */
118
114
 
119
115
  /**
120
116
  * Copy constructor.
121
- * @draft ICU 53
117
+ * @stable ICU 3.0
122
118
  */
123
119
  MeasureFormat(const MeasureFormat &other);
124
120
 
125
121
  /**
126
122
  * Assignment operator.
127
- * @draft ICU 53
123
+ * @stable ICU 3.0
128
124
  */
129
125
  MeasureFormat &operator=(const MeasureFormat &rhs);
130
126
 
@@ -136,19 +132,19 @@ class U_I18N_API MeasureFormat : public Format {
136
132
 
137
133
  /**
138
134
  * Return true if given Format objects are semantically equal.
139
- * @draft ICU 53
135
+ * @stable ICU 53
140
136
  */
141
137
  virtual UBool operator==(const Format &other) const;
142
138
 
143
139
  /**
144
140
  * Clones this object polymorphically.
145
- * @draft ICU 53
141
+ * @stable ICU 53
146
142
  */
147
143
  virtual Format *clone() const;
148
144
 
149
145
  /**
150
146
  * Formats object to produce a string.
151
- * @draft ICU 53
147
+ * @stable ICU 53
152
148
  */
153
149
  virtual UnicodeString &format(
154
150
  const Formattable &obj,
@@ -167,7 +163,6 @@ class U_I18N_API MeasureFormat : public Format {
167
163
  Formattable &reslt,
168
164
  ParsePosition &pos) const;
169
165
 
170
- #ifndef U_HIDE_DRAFT_API
171
166
  /**
172
167
  * Formats measure objects to produce a string. An example of such a
173
168
  * formatted string is 3 meters, 3.5 centimeters. Measure objects appear
@@ -182,7 +177,7 @@ class U_I18N_API MeasureFormat : public Format {
182
177
  * @param status the error.
183
178
  * @return appendTo reference
184
179
  *
185
- * @draft ICU 53
180
+ * @stable ICU 53
186
181
  */
187
182
  UnicodeString &formatMeasures(
188
183
  const Measure *measures,
@@ -190,31 +185,29 @@ class U_I18N_API MeasureFormat : public Format {
190
185
  UnicodeString &appendTo,
191
186
  FieldPosition &pos,
192
187
  UErrorCode &status) const;
193
- #endif /* U_HIDE_DRAFT_API */
194
188
 
195
- #ifndef U_HIDE_INTERNAL_API
189
+ #ifndef U_HIDE_DRAFT_API
196
190
  /**
197
- * Works like formatMeasures but adds a per unit. An example of such a
198
- * formatted string is 3 meters, 3.5 centimeters per second.
199
- * @param measures array of measure objects.
200
- * @param measureCount the number of measure objects.
201
- * @param perUnit The per unit. In the example formatted string,
202
- * it is *MeasureUnit::createSecond(status).
191
+ * Formats a single measure per unit. An example of such a
192
+ * formatted string is 3.5 meters per second.
193
+ * @param measure The measure object. In above example, 3.5 meters.
194
+ * @param perUnit The per unit. In above example, it is
195
+ * *MeasureUnit::createSecond(status).
203
196
  * @param appendTo formatted string appended here.
204
197
  * @param pos the field position.
205
198
  * @param status the error.
206
199
  * @return appendTo reference
207
200
  *
208
- * @internal Technology preview
201
+ * @draft ICU 55
209
202
  */
210
- UnicodeString &formatMeasuresPer(
211
- const Measure *measures,
212
- int32_t measureCount,
203
+ UnicodeString &formatMeasurePerUnit(
204
+ const Measure &measure,
213
205
  const MeasureUnit &perUnit,
214
206
  UnicodeString &appendTo,
215
207
  FieldPosition &pos,
216
208
  UErrorCode &status) const;
217
- #endif /* U_HIDE_INTERNAL_API */
209
+
210
+ #endif /* U_HIDE_DRAFT_API */
218
211
 
219
212
  /**
220
213
  * Return a formatter for CurrencyAmount objects in the given
@@ -245,7 +238,7 @@ class U_I18N_API MeasureFormat : public Format {
245
238
  * . erived::getStaticClassID()) ...
246
239
  * </pre>
247
240
  * @return The class ID for all objects of this class.
248
- * @draft ICU 53
241
+ * @stable ICU 53
249
242
  */
250
243
  static UClassID U_EXPORT2 getStaticClassID(void);
251
244
 
@@ -258,7 +251,7 @@ class U_I18N_API MeasureFormat : public Format {
258
251
  * @return The class ID for this object. All objects of a
259
252
  * given class have the same class ID. Objects of
260
253
  * other classes have different class IDs.
261
- * @draft ICU 53
254
+ * @stable ICU 53
262
255
  */
263
256
  virtual UClassID getDynamicClassID(void) const;
264
257
 
@@ -347,7 +340,7 @@ class U_I18N_API MeasureFormat : public Format {
347
340
  int32_t widthIndex,
348
341
  UErrorCode &status) const;
349
342
 
350
- int32_t withPerUnit(
343
+ int32_t withPerUnitAndAppend(
351
344
  const UnicodeString &formatted,
352
345
  const MeasureUnit &perUnit,
353
346
  UnicodeString &appendTo,