Jeff Genovy
8edc6ba107
ICU-20042 Improve OOM handling in PluralRules class. ( #20 )
...
- PluralRules class doesn't handle out-of-memory (OOM) errors in some code paths.
- The clone and assignment operator (operator=) methods of construction don't take an error code parameter, meaning that if an OOM error occurs during the constructor, it will not reported back to the caller, and the caller has no way to know that the object is in a half-constructed state.
- Using an internal status variable for these above cases.
- Changes to the various PluralRules helper classes to check for OOM as well.
- Using nullptr instead NULL.
- Using LocalPointer instead of raw new/delete in some cases.
- Need to set mRules to nullptr, otherwise we can end up with double deletes in the failure case. (Thanks to Andy for the review).
- Using default member initializers for class members to avoid dangling pointers. Also allows for using default constructors too.
2018-09-27 14:27:37 -07:00
Andy Heninger
35ce5296c1
ICU-13810 Doxygen warning cleanup.
2018-09-27 14:27:37 -07:00
Markus Scherer
d8f9a47637
ICU-13667 update/fix/improve dependencies; better layering formatting->numberparser->numberformatter->number_representation
...
X-SVN-Rev: 41461
2018-05-25 17:57:30 +00:00
Shane Carr
453788ddfd
ICU-13634 Temporarily deleting all old number formatting implementation code. Pieces will be restored as needed. ICU4C builds, including tests, but won't run. Changes in plurfmt.cpp and plurrule.cpp are not tested. numberformat2test.cpp is unlinked but not deleted.
...
X-SVN-Rev: 41098
2018-03-13 08:12:05 +00:00
Jeff Genovy
328dd95b9c
ICU-13177 Fix minor typos/spelling in comments.
...
X-SVN-Rev: 40596
2017-10-06 22:44:25 +00:00
Shane Carr
1f1a485c3c
ICU-13177 Adding IFixedDecimal interface to C++.
...
X-SVN-Rev: 40391
2017-09-13 07:49:26 +00:00
Peter Edberg
b3a53f130e
ICU-12763 For C++ API, say return is undefined in the case of an error
...
X-SVN-Rev: 39675
2017-02-15 21:15:58 +00:00
Peter Edberg
870b039296
ICU-12763 for C++ select(const Formattable&...), add UErrorCode param, return empty string if err
...
X-SVN-Rev: 39658
2017-02-09 23:40:59 +00:00
Peter Edberg
47e1aaaf14
ICU-12763 Add uplrules_selectWithFormat and PluralRules::select that take & use [U]NumberFormat
...
X-SVN-Rev: 39591
2017-01-21 01:03:32 +00:00
Andy Heninger
242e02c388
ICU-12764 icu4c utf-8 source files, update Copyright notices.
...
X-SVN-Rev: 39583
2017-01-20 00:20:31 +00:00
Michael Ow
61607c2773
ICU-12564 Update copyright notice in trunk
...
X-SVN-Rev: 38848
2016-06-15 18:58:17 +00:00
Yoshito Umaoka
00ca13e126
ICU-12564 Reverted r38761 and r38762, because we want to prepend the Unicode copyright for existing source files, instead of replacing copyright comments.
...
X-SVN-Rev: 38776
2016-05-31 21:45:07 +00:00
Michael Ow
c9f199a30f
ICU-12564 Update copyright notice in ICU4C
...
X-SVN-Rev: 38761
2016-05-26 22:32:17 +00:00
Michael Ow
6857dbc99e
ICU-11917 Add missing API tag
...
X-SVN-Rev: 38015
2015-09-23 20:58:51 +00:00
Travis Keep
2860cd48c4
ICU-11740 DecimalFormat refactor.
...
X-SVN-Rev: 37821
2015-08-25 23:31:01 +00:00
Andy Heninger
6ffe686192
ICU-10759 deprecate Plural Rules Functions w no implementation in ICU4C.
...
X-SVN-Rev: 37131
2015-03-04 20:21:41 +00:00
Travis Keep
e4f7eafc89
ICU-10461 Andy's review comments.
...
X-SVN-Rev: 35490
2014-03-17 18:07:34 +00:00
Travis Keep
53ababf5a7
ICU-10461 Make NumberFormat::createInstance() and PluralRules::forLocale() 10X faster than before for most common types. Provide internal createSharedInstance() for NumberFormat and SharedFormat for internal use that is 2 orders of magnitude faster than before.
...
X-SVN-Rev: 35114
2014-02-10 19:13:50 +00:00
Peter Edberg
3f51cb7d8d
ICU-10398 Update #ifndef U_HIDE_XXXXX_API (e.g. DRAFT) to match status tags (e.g. @draft)
...
X-SVN-Rev: 34448
2013-09-23 06:52:34 +00:00
Steven R. Loomis
37562f403e
ICU-10394 api promo 50->52 as per PMC
...
X-SVN-Rev: 34396
2013-09-19 00:44:08 +00:00
Andy Heninger
62cb5a9ca6
ICU-10273 Plural Rules, remove unimplemented getFunctionalEquivalent().
...
X-SVN-Rev: 34126
2013-08-29 18:07:13 +00:00
Andy Heninger
4dc67e0203
ICU-10273 New plural rule syntax. Changes merged from development branch. With this checkin, Plural rule data is back in synch between ICU4C, ICU4J and CLDR trunk.
...
X-SVN-Rev: 34103
2013-08-28 20:51:44 +00:00
Andy Heninger
f4e36c9c98
ICU-10253 Plural Rule, support for new syntax for fractional rules. Merge from development branch.
...
X-SVN-Rev: 33958
2013-07-22 23:57:17 +00:00
Peter Edberg
fbace77746
ICU-9721 Update "#ifndef U_HIDE_XXX_API" guards for API status
...
X-SVN-Rev: 33367
2013-03-05 01:38:48 +00:00
Markus Scherer
8d7428d1b3
ICU-9132 ordinal-plural formatting in C/C++
...
X-SVN-Rev: 31687
2012-04-07 04:27:27 +00:00
Peter Edberg
4b3835d9e9
ICU-9091 Promote to stable most ICU4C API that are draft 4.8 or earlier
...
X-SVN-Rev: 31446
2012-02-20 04:28:17 +00:00
Markus Scherer
e8aa203464
ICU-8571 API cannot be both @stable and @internal, keep @stable
...
X-SVN-Rev: 30455
2011-08-03 18:28:56 +00:00
Markus Scherer
4e30dc4c14
ICU-8571 remove udraft.h etc. & genheaders.pl, use #ifndef U_HIDE_DRAFT_API etc. instead
...
X-SVN-Rev: 30447
2011-08-01 02:20:46 +00:00
Steven R. Loomis
63dd5be23d
ICU-8525 doxygen warnings
...
X-SVN-Rev: 30029
2011-05-05 01:35:22 +00:00
Doug Felt
f51066e066
ICU-8448 update docs for list syntax
...
X-SVN-Rev: 30023
2011-05-04 17:07:24 +00:00
Markus Scherer
0765a860a0
ICU-8053 add link to the LDML spec, C.11 Language Plural Rules
...
X-SVN-Rev: 29928
2011-04-29 18:04:45 +00:00
Markus Scherer
bb9af46cfe
ICU-8432 test & document that PluralRules::getSamples() returns count<=destCapacity
...
X-SVN-Rev: 29924
2011-04-29 16:42:34 +00:00
Markus Scherer
6c49e812c0
ICU-8432 fix PluralRules memory management & a couple of minor issues
...
X-SVN-Rev: 29914
2011-04-28 13:35:56 +00:00
Markus Scherer
e25457f07a
ICU-8499 change PluralRules::NO_UNIQUE_VALUE into #define UPLRULES_NO_UNIQUE_VALUE
...
X-SVN-Rev: 29911
2011-04-27 20:04:06 +00:00
Markus Scherer
d743bb693e
ICU-8319 merge MessageFormat 2011q1 work into trunk, from icu/branches/markus/msg48 -r 29400:29882
...
X-SVN-Rev: 29886
2011-04-25 20:47:32 +00:00
Doug Felt
47108a4e65
ICU-8432 add icu4c implementation and tests
...
X-SVN-Rev: 29666
2011-03-17 21:36:03 +00:00
Claire Ho
61bd8f7de2
ICU-7770 Added plural keywords to documents.
...
X-SVN-Rev: 28345
2010-07-22 00:29:25 +00:00
Steven R. Loomis
1fcbaff0ba
ICU-6804 @draft to @stable
...
X-SVN-Rev: 25626
2009-03-19 04:03:31 +00:00
Steven R. Loomis
0e7646b347
ICU-6552 reduce a lot of doxygen errs, improve output docs
...
X-SVN-Rev: 24668
2008-09-27 01:12:32 +00:00
Claire Ho
0f3bf04d8c
ICU-6374 Change status from ICU4.2 to ICU4.0 for supporting double type
...
X-SVN-Rev: 24310
2008-06-27 03:33:14 +00:00
Claire Ho
9e010c8ebe
ICU-6374 Support decimal fractions in PluralRules:select()
...
X-SVN-Rev: 24299
2008-06-26 17:51:59 +00:00
Claire Ho
2ede5a4790
ICU-6366 Access locale plural rules from resource bundle.
...
X-SVN-Rev: 24242
2008-06-19 20:23:49 +00:00
Steven R. Loomis
8bfc121f97
ICU-6297 doxygen fixes (partial)
...
X-SVN-Rev: 23959
2008-05-21 21:34:54 +00:00
Andy Heninger
71bf003171
ICU-5696 Unicode 5.1 Update
...
X-SVN-Rev: 23761
2008-04-04 22:47:43 +00:00
George Rhoten
ec68039564
ICU-5794 Fix for non-Intel machines and fix Solaris compiler warnings.
...
X-SVN-Rev: 23280
2008-01-21 21:51:09 +00:00
George Rhoten
8081ce1d2b
ICU-5794 Various fixes for the following items.
...
1) Pass the locale on for the PluralFormat constructor
2) Perform normal ICU error code handling so that parse errors aren't discarded.
3) Remove more C++ static initialization.
4) Remove spaces from test names so that they can be called from the command line.
5) Fix various compiler warnings.
X-SVN-Rev: 23141
2007-12-29 05:51:50 +00:00
George Rhoten
dc0166c6ae
ICU-5794 Fixes for Windows, build configuration and other issues.
...
X-SVN-Rev: 23098
2007-12-17 19:30:03 +00:00
Claire Ho
c11cd154da
ICU-5794 merge from feature branch.
...
X-SVN-Rev: 23095
2007-12-17 01:39:55 +00:00