Commit Graph

21974 Commits

Author SHA1 Message Date
Jeff Genovy
f76f68aeaa ICU-20221 Add support for building with Cygwin/GCC to the AppVeyor CI builds. 2018-10-30 10:26:07 -07:00
Fredrik Roubert
964a8eb036 ICU-20202 Replace UVector with MemoryPool in uloc_keytype.
By moving the required call to uhash_close() into the destructor of
LocExtKeyData and using CharString instead of raw chunks of bytes
allocated with uprv_malloc(), it becomes easier to guarantee that
memory handling is correct, without leaks or overflows.

With the need for custom deleter functions removed, the code doesn't use
any of the additional functionality provided by UVector, it just needs a
simple way to keep track of allocated objects to delete them after it's
done using them, which MemoryPool does in a simpler and typesafe way.
2018-10-30 17:06:56 +01:00
Fredrik Roubert
440d8b3be8 ICU-20202 Replace UVector with MemoryPool in CalendarDataSink.
CalendarDataSink doesn't use any of the additional functionality
provided by UVector, it just needs a simple way to keep track of
allocated objects to delete them after it's done using them.
2018-10-30 17:01:10 +01:00
Shane Carr
f8c09f776a ICU-20231 Adding tests for accounting with variable currency widths. 2018-10-29 16:29:06 -07:00
Shane Carr
fd5faeb48b ICU-20159 Fixing gcc warnings in project and test code. 2018-10-29 16:28:54 -07:00
Shane Carr
8018eb84e7 ICU-13701 Adding custom logic for nickel rounding, C and J.
Avoids expensive arithmetic when performing nickel rounding for currencies such as CAD, CHF, and DKK.
2018-10-29 16:28:42 -07:00
Jeff Genovy
5a34bfb151 ICU-20209 Fix build failures on Windows with std::atomic not in enclosing namespace std
Also: Change to use the ICU namespace macro instead, and skip doxygen as well.
2018-10-29 15:07:05 -07:00
Fredrik Roubert
b8d2d92d36 ICU-20202 Replace CharStringPool with MemoryPool.
The shared templated helper class MemoryPool is a drop-in replacement
for the local helper class CharStringPool, with a simpler implementation
and an interface that allows parameters to be passed to the constructor.
2018-10-29 22:58:33 +01:00
Fredrik Roubert
d62f5ae5d8 ICU-20202 Add an internal helper class to own heap allocated objects.
This will be used first to replace existing locally defined memory
management helper classes such as CharStringPool (uloc_tag.cpp) and
CodePointMatcherWarehouse (numparse_affixes.h), then in new code.
2018-10-29 22:26:29 +01:00
Fredrik Roubert
21a8698951 ICU-20235 Undefine OVERFLOW in case Microsoft math.h has defined it. 2018-10-29 12:07:16 +01:00
Jeff Genovy
3d86d24a68 ICU-20240 Fix Windows build failure in japancal.cpp 2018-10-26 14:12:24 -07:00
Jeff Genovy
13ad1fe4e0 ICU-20194 TimeZone createSystemTimeZone doesn't set error code on OOM error. 2018-10-25 15:22:38 -07:00
Fredrik Roubert
59fe4f4be2 ICU-20132 Pass ByteSink from Locale::toLanguageTag() to uloc_toLanguageTag().
This eliminates the need for a scratch buffer in Locale::toLanguageTag()
and also the need for counting bytes required in uloc_toLanguageTag(),
something that ByteSink will now handle correctly and thereby
eliminating the bug where too few bytes required was returned.
2018-10-25 21:04:47 +02:00
Fredrik Roubert
8b7fa6a03f ICU-20228 Revert file from commit 10e79698d7.
This file was changed by mistake (and not caught by the presubmit tests
because of unrelated build failures).
2018-10-24 23:26:00 +02:00
Fredrik Roubert
10e79698d7 ICU-20228 Fix common typos for "language". 2018-10-24 20:54:10 +02:00
Shane Carr
aa898cc042 ICU-11511 Adding tests for CLDR-10103 scientific notation spec changes. 2018-10-23 17:46:33 -07:00
Yoshito Umaoka
48d3ad0d39 ICU-20224 tzdata2018f updates. 2018-10-19 22:15:18 -04:00
Fredrik Roubert
0da942bd52 ICU-20080 Avoid strange compiler behaviour in ASSERT_EQUAL() macro.
Using temporary variables for the two values to be compared here makes
GCC compile the code just like we expect it to. (What it really is that
it otherwise does on some architechtures remains a mystery.)

This will make the tests pass as expected also on IA-32 with GCC.

It'll also make it possible to revert the old workaround for SPARC
introduced by commit 5b0592af79.

Tested:

Linux gcc45 3.16.0-5-686-pae #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08) i686 GNU/Linux

Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
g++ (Debian 4.9.2-10+deb8u1) 4.9.2

Linux gcc202 4.16.0-1-sparc64-smp #1 SMP Debian 4.16.5-1 (2018-04-29) sparc64 GNU/Linux

clang version 4.0.1-10+sparc64 (tags/RELEASE_401/final)
g++ (Debian 8.2.0-7) 8.2.0
2018-10-19 11:45:09 +02:00
Jeff Genovy
9ec2c332c1 ICU-20208 uspoof.cpp function checkImpl should be static, regenerate urename.h 2018-10-18 16:38:28 -07:00
Andy Heninger
47b3922b59 ICU-20212 unistr.h, review comments from Markus for doc formatting. 2018-10-18 10:01:51 -07:00
Andy Heninger
f3ce5a33be ICU-20212 Tweaks to markdown API docs in unistr.h 2018-10-18 10:01:51 -07:00
Andy Heninger
7918e54d30 ICU-20212 Markdown API docs in unistr.h 2018-10-18 10:01:51 -07:00
Ken Brown
31b89b5484 ICU-20214 Fix namespace error on Cygwin 2018-10-17 19:31:08 -07:00
Andy Heninger
e509105c9b
ICU-20205 RelativeDateTimeFormatter pt data fix, improved error handling and test. (#210)
* ICU-20205 Add locale test for RelativeDateTimeFormatter.

* ICU-20205 Fix error in pt relative date data. Improve error handling in code.

* ICU-20205 Add instantiation test & regen data from ICU4C

* ICU-20205 Added DateFormatSymbols error check per jefgen's comments.
2018-10-12 16:19:14 -07:00
Jeff Genovy
1af92cd3e7
ICU-20120 BRS63GA: Update version numbers/readme for ICU 63 GA. (#199) 2018-10-08 10:56:42 -07:00
Jeff Genovy
ba001f4616 ICU-20196 Fix MSVC/clang compiler warning C4251, export explicit template, required for building DLLs on Windows. Also fix a few other warnings as well. 2018-10-05 13:21:00 -07:00
pedberg-icu
b098078ab8
ICU-20120 63 BRS, integrate cldr release-34-beta with various fixes (#186) 2018-10-05 11:01:15 -07:00
gvictor
ff72d74d1e ICU-20193 urename.h shouldn't be ignored by other compilers except VS IntelliSense (#189)
The macro _MSC_VER is not defined in other compilers.
Change the logic and so urename.h is ignored on VS IntelliSense
2018-10-04 16:29:57 -07:00
kbrow1i
7d99ba4e57 ICU-20191 Don't use Win32 APIs on Cygwin (#185)
This was fixed in earlier commits (see, for example, ICU-12786), but
the problem was reintroduced in commits f8ba68e and fcb82cb.
2018-10-04 14:10:00 -07:00
pedberg-icu
bcd0a4165c
ICU-20119 Update ICU4C #ifndef U_HIDE_XXX guard conditionals (PR #183)
ICU-20119 Update ICU4C #ifndef U_HIDE_XXX guard conditionals (PR #183)
2018-09-30 21:23:42 -07:00
pedberg-icu
bac4c96020
ICU-20119 cldr release-34-alpha3 integration (#181)
ICU-20119 cldr release-34-alpha3 integration (PR #181):
* ICU-20119 63rc BRS, cldr 34-alpha3: add ku,xh; fixes for de/it CompactDec, availFmts yw amd MW patterns
* ICU-20119 Skip & log_knownIssue for Windows LCID mapping problem with ckb/ku
2018-09-28 16:09:15 -07:00
Andy Heninger
19a29f956e
ICU-20119 ICU4C 63 API promotion & change report (#161)
* ICU-20119 ICU4C 63 API promotion, work in progress.

* ICU-20119 ICU4C 63 API promotion, work in progress.

* ICU-20119 ICU 63 API promotion & change report

* ICU-20119 ICU4C 63 API change report, new draft, still work in progress.

* ICU-20119 ICU4C 63 API change report, another new draft, still work in progress.

* ICU-20119 ICU4C 63 API change report, another new draft.

* ICU-20119 ICU4C 63 API change report, after @preview revert. Hopefully the final rev.

* ICU-20119 ICU4C 63 API change report, clean up a few minor html errors.
2018-09-28 09:36:25 -07:00
gnrunge
1b62e2c851
ICU-20119 Fixes for run-without-data BRS test. In all cases an error (#177)
check was needed in the test cases to prevent a segmentation fault.
2018-09-27 14:27:42 -07:00
gnrunge
39b98c8a6b
ICU-20168 Fix memory leak in error path, add a free statement. (#175) 2018-09-27 14:27:42 -07:00
Steven R. Loomis
53986cc57d
ICU-13685 Revert c: add @preview (retry) (#172)
This reverts commit 25f1589466c8b74ce36d762d4e9f3a72b3007eaf from  #8
2018-09-27 14:27:42 -07:00
Jungshik Shin
c71a1b4b51
ICU-9562 Update language tag mapping per the latest IANA registry
uloc_forLanguageTag has a few mapping tables to map grandfathered
language tags and deprecated language subtags to their preferred or
modern values.

Update them based on the latest version of the IANA
language subtag registry. [1]

Five grandfathered tags without a preferred value are still mapped to
what ICU has mapped them to for backward compatibility until the
wisdom of continuing to do so is reviewed.

In addition, map redundant language tags to their preferred values
regardless of whether they're followed by other subtags or not. (e.g.
zh-yue vs zh-yue-u-co-pinyin) .

Similary, ja-latn-hepburn-heploc is mapped to ja-latn-alaic97 (the
variant subtag 'hepburn-helploc' with the prefix 'ja-latn' has the
preferred value, 'alaic97') .

Update the mapping for deprecated language subtags (e.g. 'jw' to
'jv' and a bunch of 3-letter language codes).

Add a new table for deprecated region subtags to map them to their
modern values. (e.g. 'DD' to 'DE').

Add a new test case for deprecated language and region mapping and
a few more cases for updated grandfathered and redundant tag mapping.

[1]
https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
2018-09-27 14:27:42 -07:00
Markus Scherer
ff9876421e
ICU-20119 pool bundles for ICU 63/CLDR 34 (#173) 2018-09-27 14:27:42 -07:00
Markus Scherer
cc1784ae7d
ICU-20119 update C++ dependencies, fix bugs (#171) 2018-09-27 14:27:42 -07:00
gnrunge
97710f4586
ICU-20119 Remove C linkage declaration; urename.h BRS-update script (#169)
otherwise includes entry points that should not be included.
2018-09-27 14:27:41 -07:00
gnrunge
2b6b8c73c4
ICU-20119 urename.h update, header test fixes for icu 63 (#165)
* ICU-20119 Update and fixes for the following BRS tasks:
 - Update urename.h
 - Test uconfig.h variations

* ICU-20119 Updates copyright scanner script exclusions: don't scan ./git/*.

* ICU-20119 Changes in reply to comments for pull requst #165.
2018-09-27 14:27:41 -07:00
pedberg-icu
4a139a3f91
ICU-20119 Merge pull request #162 from pedberg-icu/cldr34a-integration
ICU-20119 Integrate CLDR release-34-alpha2, adjust code & test, update MeasureUnit
2018-09-27 14:27:41 -07:00
Shane F. Carr
b9b6cfebd8
ICU-11319 Add tests for compact decimal in zh-Hant and zh-Hant-HK. (#166) 2018-09-27 14:27:41 -07:00
Peter Edberg
7e3068b207
ICU-20119 63rc BRS, update ICU4C numberformattestspecification.txt for J versions 2018-09-27 14:27:41 -07:00
Markus Scherer
5148a38143
ICU-20125 numeric values of level constants will not change; fix/update some docs (#159) 2018-09-27 14:27:41 -07:00
Shane F. Carr
4d09e9d62b
ICU-11276 Using atomics for thread safety in NumberRangeFormatter. (#130)
See discussions on pull request.
2018-09-27 14:27:41 -07:00
Peter Edberg
0185883ba5
ICU-20119 63rc BRS, merge current unicode-icu master (Sep 21) into cldr34a-integration branch 2018-09-27 14:27:41 -07:00
Shane F. Carr
5cfb733249
ICU-11276 Apply the approximately pattern inside of the unit string. (#148) 2018-09-27 14:27:41 -07:00
Jeff Genovy
db05e18f28
ICU-20157 Fix MSVC C4251: Need to export explicit template instantiation, plus some more warning fixes. (#154)
* Fix MSVC C4251: Need to export explicit template instantiation for std::atomic<int32_t> when building DLLs

* Some more warning fixes for MSVC as well.

* Can't use static_cast in C file.
2018-09-27 14:27:41 -07:00
Shane F. Carr
a38beef113
ICU-20160 Add check for Python 3 in autoconf and nmake. (#157) 2018-09-27 14:27:41 -07:00
Peter Edberg
54a35e43ee
ICU-20119 63rc BRS, cldr 34-alpha2 part 2: 10 locales, MeasUnit updates, icu4j tests with serialization fails 2018-09-27 14:27:41 -07:00