Rich Gillam
1b33f5e30b
ICU-22889 Implemented a recursion limit in the RBNF parsing code to match the one already present in the RBNF
...
formatting code.
2024-09-18 16:05:13 -07:00
Fredrik Roubert
0178a07a26
ICU-22793 Clang-Tidy: google-readability-casting
...
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/google/readability-casting.html
2024-07-04 22:32:12 +02:00
Rich Gillam
13bf3c8313
ICU-22611 Fixed the RBNF MultiplierSubstitution to only perform floor() on the value being formatted when the
...
substitution is using a DecimalFormat and its owning rule also has a modulus substitution. Took out a redundant
call to floor(). Added a hack to allow the caller to change the rounding behavior with setRoundingMode().
Added appropriate unit tests. Added additional documentation of the behavior to the API docs.
2024-03-22 11:18:27 -07:00
Rich Gillam
14ca2b0e6d
ICU-22313 Various fixes for duration formatting:
...
- Changed the C++ and Java interfaces to that the URBNF_DURATION ruleset is marked deprecated.
- Fixed a bug in RuleBasedNumberFormat in both Java and C++ that caused the existing duration-formatting rules to produce bogus results when used on a non-integral value.
(Earlier versions of this PR added code to use a MeasureFormat under the covers when a caller used
unum_open(UNUM_DURATION). I took that out because of backward compatibility concerns, so we're still using RBNF
in the C API. I'm hoping to add a "real" duration formatter in ICU 75.)
2023-09-15 16:27:58 -07:00
Markus Scherer
b6dcc95d3c
ICU-21833 remove redundant void parameter lists
...
See #2351
2023-03-02 09:31:57 -08:00
Fredrik Roubert
2de88f9d9c
ICU-21833 Replace UChar with char16_t in all C++ code.
2023-02-06 19:27:44 +01:00
Fredrik Roubert
2e0d30cfcf
ICU-21833 Replace NULL with nullptr in all C++ code.
2023-02-03 20:20:38 +01:00
Fredrik Roubert
030fa1a479
ICU-21148 Consistently use standard lowercase true/false everywhere.
...
This is the normal standard way in C, C++ as well as Java and there's no
longer any reason for ICU to be different. The various internal macros
providing custom boolean constants can all be deleted and code as well
as documentation can be updated to use lowercase true/false everywhere.
2022-09-07 20:56:33 +02:00
Frank Yung-Fong Tang
4747484273
ICU-21966 Cleanup -Wunused-but-set-variable
...
See #2055
2022-04-06 12:51:46 -07:00
Peter Varga
1986dcd0d8
ICU-21734 Add missing overrides
2021-09-07 17:42:14 -07:00
Fredrik Roubert
633438f8da
ICU-20973 Change all equality operator return types from UBool to bool.
2021-08-17 00:35:00 +02:00
luz paz
73eca0a9c9
ICU-21580 Fix typos in icu4c/
...
Found via `codespell -q 3 -L ans,anumber,atleast,ba,bre,hace,nd,nin,ois,rsource,som,sur,tht -S icu4c/source/data/zone,icu4c/source/data/lang`
ICU-21580 Fix source (related) typos
ICU-21580 Revert extraneous auto-encoding
ICU-21580 Re-add previous reverted fix without auto-encoding
2021-07-19 13:22:38 -05:00
Craig Cornelius
408cd128fc
ICU-21242 rephrase documentation using term master
...
See #1255
2020-08-28 12:42:20 -07:00
Shane Carr
73f93a457a
ICU-13634 Fixing DecimalQuantity call sites, first written in r41063, r41064, and r41098. RNBF test is passing again.
...
X-SVN-Rev: 41204
2018-04-06 09:35:16 +00:00
Shane Carr
fe0725cd2a
ICU-13678 Changing Multiplier to use decNumber instead of double, in order to fix some unit tests. Refactored call sites to use a common DecNum wrapper class with constructors for string, double, and BCD.
...
X-SVN-Rev: 41198
2018-04-05 21:54:04 +00:00
Shane Carr
94427dc200
ICU-13574 Replacing DigitList with DecimalQuantity through most of the code base.
...
X-SVN-Rev: 41064
2018-03-03 10:53:01 +00:00
George Rhoten
d06d12896c
ICU-13529 Make some changes based on review feedback.
...
X-SVN-Rev: 40939
2018-02-16 18:07:32 +00:00
George Rhoten
4bac703558
ICU-13529 Parsing of redundant rule matches is slow when parsing with RuleBasedNumberFormat
...
X-SVN-Rev: 40913
2018-02-13 23:48:48 +00:00
Jeff Genovy
0a3a7fb889
ICU-13287 Add explicit casts for conversions between long/int64 and double.
...
X-SVN-Rev: 40310
2017-08-03 20:44:45 +00:00
Andy Heninger
04448b004f
ICU-12764 UTF-8 source files, update file encoding comments.
...
X-SVN-Rev: 39641
2017-02-03 18:57:23 +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
George Rhoten
72280fb152
ICU-12713 Port fix for handling large magnitude numbers from ICU4J to ICU4C
...
X-SVN-Rev: 39560
2017-01-14 16:29:40 +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
George Rhoten
e097e1b9ee
ICU-8223 Add rule syntax for NaN, infinity and alternate decimal points.
...
Other issues addressed:
* Some performance enhancements were added for good measure. Creating new RuleBasedNumberFormat objects can take a long time due to all the rule parsing. This was ported from ICU4J.
* I fixed a potential infinite recursion problem when RuleBasedNumberFormat used NumberFormat.createInstance, which could occasionally depend on creating RuleBasedNumberFormat for itself, which was bad. This was ported from ICU4J.
* I fixed a potential memory leak due to lazy initialization of some RBNF data members in a multithreaded environment, which is fine in Java, but it's not okay in C++. We no longer cast away const due to this, which is good.
* There were some compiler warnings and errors found while trying to debug this code on my machine. I fixed those too.
X-SVN-Rev: 37810
2015-08-25 16:55:52 +00:00
George Rhoten
e1c9c699b9
ICU-11564 Delete a stale cast and comment.
...
X-SVN-Rev: 37388
2015-04-23 17:14:52 +00:00
George Rhoten
e7b812f712
ICU-11564 Improve the thread safety of RBNF.
...
The recursion count is now a method argument instead of a data member.
Setting the DecimalFormatSymbols no longer reparses the rules, but it just sets a new version of DecimalFormatSymbols instead.
X-SVN-Rev: 37387
2015-04-23 16:13:46 +00:00
George Rhoten
eda8266715
ICU-11064 Add syntax for PluralFormat in RBNF
...
X-SVN-Rev: 36197
2014-08-18 20:47:36 +00:00
Jungshik Shin
4934b397a8
ICU-8343 fix build errors in Visual Studio when exception is disabled
...
X-SVN-Rev: 32010
2012-06-28 23:28:00 +00:00
John Emmons
0ce13a1711
ICU-7635 Modify toString method to handle >>>
...
X-SVN-Rev: 30868
2011-10-26 02:16:23 +00:00
Markus Scherer
2862296471
ICU-8454 virtual destructors should be explicit, and defined in a .cpp file, so that they can serve as key functions
...
X-SVN-Rev: 30423
2011-07-26 05:32:25 +00:00
Markus Scherer
2201fb816c
ICU-7877 optionally explicit UnicodeString constructors, and make them explicit inside ICU
...
X-SVN-Rev: 30293
2011-07-07 18:46:19 +00:00
Markus Scherer
f6a04770ff
ICU-7455 use compiler RTTI; stop adding poor mans RTTI to new class hierarchies
...
X-SVN-Rev: 28075
2010-05-19 17:29:33 +00:00
Andy Heninger
4e56218eb1
ICU-5193 Big decimal number formatting.
...
X-SVN-Rev: 27696
2010-02-26 02:29:00 +00:00
Doug Felt
fb2431bbdd
ICU-6000 fix for RBNF in ICU4C
...
X-SVN-Rev: 22845
2007-10-24 00:38:03 +00:00
George Rhoten
a1834196b3
ICU-5410 Move nfsubs.h private subclasses to nfsubs.cpp to get more accurate PureCoverage result.
...
Also use standard ICU rtti by using UOBJECT_DEFINE_RTTI_IMPLEMENTATION.
X-SVN-Rev: 21828
2007-06-27 00:59:42 +00:00
George Rhoten
fa97b33258
ICU-5304 Add missing namespace declarations.
...
X-SVN-Rev: 20243
2006-09-04 16:36:46 +00:00
Doug Felt
208c96caca
ICU-4288 undo accidental deletion of line
...
X-SVN-Rev: 18202
2005-07-11 22:48:52 +00:00
Doug Felt
2cae21f19f
ICU-4288 fix compiler warnings (from george)
...
X-SVN-Rev: 18193
2005-07-11 20:36:49 +00:00
Doug Felt
9619133865
ICU-4630 test port of missing ICU4J changes for Hebrew to ICU4C
...
X-SVN-Rev: 18180
2005-07-09 02:13:00 +00:00
Doug Felt
ce736f9da4
ICU-4630 port missing ICU4J changes for Hebrew to ICU4C
...
X-SVN-Rev: 18171
2005-07-08 00:16:47 +00:00
Eric Mader
850e160d30
ICU-4302 changes from ICU 3.2 "no data" test.
...
X-SVN-Rev: 17065
2004-12-31 19:26:31 +00:00
George Rhoten
0f77f15f2d
ICU-3500 Fix some compiler warnings
...
X-SVN-Rev: 15644
2004-05-31 03:08:28 +00:00
Eric Mader
abefef5844
ICU-3770 Updated copyright notices for ICU 3.0
...
X-SVN-Rev: 15411
2004-05-19 20:42:44 +00:00
Doug Felt
a6bda657f2
ICU-2509 improve rbnf error handling
...
X-SVN-Rev: 14959
2004-04-14 18:55:19 +00:00
Doug Felt
46f8a7fa55
ICU-2509 improve rbnf error handling
...
X-SVN-Rev: 14919
2004-04-09 19:58:58 +00:00
George Rhoten
da70b390bc
ICU-3682 Fix EBCDIC issue
...
X-SVN-Rev: 14901
2004-04-07 22:02:53 +00:00
Alan Liu
06c4bd41f3
ICU-3667 prefer UErrorCode& to UErrorCode* in C++ API
...
X-SVN-Rev: 14785
2004-03-27 04:49:02 +00:00
George Rhoten
fee6977d9d
ICU-1722 Use FALSE, not false.
...
X-SVN-Rev: 14761
2004-03-25 16:28:25 +00:00