Commit Graph

22574 Commits

Author SHA1 Message Date
Shane Carr
0ad2f9590b ICU-20418 Fix indentation of CHECK_NULL in number_skeletons.cpp 2020-01-14 11:52:27 +01:00
Shane Carr
fe98d870b2 ICU-20418 Adding concise number skeletons in ICU4C 2020-01-14 11:52:27 +01:00
Shane Carr
df8841aa6f ICU-20418 Adding *internal* parse method for core unit identifiers.
Also see ICU-20286
2020-01-14 11:52:27 +01:00
Shane Carr
b24538eb05 ICU-20921 Adding find and compare to StringPiece 2020-01-14 11:52:27 +01:00
Joshua Root
a3078fb8c8 ICU-20875 Include <cstddef> for max_align_t
The definition of max_align_t is not guaranteed to be available unless
the appropriate header is included. Since use of <stddef.h> from C++ is
deprecated, that's <cstddef>, and max_align_t is thus defined under the
std namespace rather than in the global namespace.
2020-01-09 15:42:52 -08:00
Caio Lima
09d409f5f4 ICU-20442 Adding support for hour-cycle on DateTimePatternGenerator
DateTimePatternGenerator needs to consider the hour-cycle preferred by
Locale. This means that we need to to override the hour-cycle when a
locale contains "hc" keyword. This patch is adding such functionality.
In addition, "DateTimePatternGenerator::adjustFieldTypes" should adjust
hour field to properly follow tr35
spec(https://www.unicode.org/reports/tr35/tr35-dates.html#dfst-hour).
2020-01-09 16:45:56 +01:00
Smaarn
996da8faac ICU-20871 Fixed: no rule was defined to create the $(OUTDIR) directory if it didn't exist.
This would cause failures during cross compilation cases such as:

make[6]: Leaving directory '/spksrc/spk/bazarr/work-qoriq-6.1/icu/source/data'
make[5]: *** No rule to make target 'out', needed by 'out/icudt64b.dat'.  Stop.
2020-01-08 15:42:35 +01:00
Hugh McMaster
5aae52d3ef ICU-20924 Use pkg-config to generate the path to pkgdata.inc 2020-01-07 14:19:02 -08:00
Frank Tang
11ad8d69fb ICU-20934 Fix TZ test error
Somehow these tests are now fail on trunks.
Per https://mm.icann.org/pipermail/tz-announce/2019-July/000056.html
     Brazil has canceled DST and will stay on standard time indefinitely.
2020-01-03 20:52:11 -08:00
Frank Tang
4a8483be91 ICU-20900 Fix createCanonical
See #922
2020-01-03 15:00:04 -08:00
Markus Scherer
60b567d6ab ICU-20917 LocaleMatcher: prefer a more-default locale 2020-01-02 18:00:52 -08:00
Frank Tang
79fac50101 ICU-20310 omit "-true" in toLanguageTag
See #952
2019-12-30 15:39:59 -08:00
Markus Scherer
cb1d4f5903 ICU-20916 UBSan & ErrorProne fixes 2019-12-20 14:56:31 -08:00
Markus Scherer
ad638c274e ICU-20916 LocaleMatcher distinguish between equivalent locales
- equivalent but originally unequal
- locale distance shifted left for additional fraction bits with micro distance
- Java more verbose matcher debug output
See #949
2019-12-20 09:36:57 -08:00
Shane Carr
46ec4fd523 ICU-12863 Add list style APIs to C and C++
See #894
2019-12-17 13:07:36 -08:00
Andy Heninger
faa2f9f9e1 ICU-20303 Break Iterator, improve handling of look-ahead rules.
- Merge the look-ahead results slots used when multiple rules share a common accepting state.
- Sequentially number the look-ahead result slot. Will eventually allow replacing the runtime map with an array.
- Inhibit chaining out of look-ahead rules. This could never actually happen; when a hard break
  rule matches, the engine is stopped immediately, but the state table was being constructed
  as if it could  happen. Reduces table size for line break rules.
- Remove incorrect handling of fAccepting and fLookAhead fields of a state table row
  when removing duplicate states. Look-ahead slot number was being mis-interpreted as a state number.
2019-12-13 13:17:21 -08:00
Shane Carr
7917df1e80 ICU-20883 Move UFormattedDateInterval to end of argument list. 2019-12-12 13:48:28 -08:00
Frank Tang
923ec1ad30 ICU-20436 Add getDefaultHourCycle to DateTimePatternGenerator
See #901
2019-12-12 00:13:37 -08:00
Rosen Penev
8fda72f6d8 ICU-20877 i18n: Don't use C++11 math
It's not available with some libc implementations. Specifically,
BIONIC and uClibc-ng. uprv_ variants are available.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-12-11 20:55:23 -08:00
Joshua Root
c6fd07cdec ICU-20904 Don't use char16_t with C++98/03
When C code includes the ICU headers, the UChar type is defined to be
uint16_t. But when C++ code includes the headers, UChar is char16_t
even when U_SHOW_CPLUSPLUS_API has been set to 0. Apart from arguably
being an inconsistency in the API, this means that C++98 or C++03 code
can't use the C API even though C99 code can.

So, change unicode/umachine.h to check not just whether __cplusplus is
defined but the value of U_CPLUSPLUS_VERSION when deciding how to
typedef UChar.
2019-12-11 18:41:27 -08:00
Shane F. Carr
39eb0f4fbf
ICU-20919 Merge maint/maint-66 (release-66-preview) to master 2019-12-11 15:25:36 -08:00
Caio Lima
7c147e4e85 ICU-20741 Changing SimpleDateTimeFormat::subFormat to only include 1 field at the same position when there is a data fallback 2019-12-10 21:53:47 -08:00
Steven R. Loomis
ffbc8cf85f ICU-20857 update API Change Report for ICU 66preview
- uses tools updated in [ICU-20910]
2019-12-03 17:11:37 -08:00
Peter Edberg
e2afc5486d ICU-20857 BRS66 update urename.h 2019-12-03 08:53:23 -08:00
Jeff Genovy
f3e2f4f02e ICU-20857 Update Readme for ICU 66 Preview. 2019-12-02 15:13:15 -08:00
Jeff Genovy
afaff40164 ICU-20907 Disable optimization on Windows when building for ARM64 with Visual Studio versions below 16.4. 2019-11-27 15:35:58 -08:00
Andy Heninger
197e0239ab ICU-20893 Line break tailorings updated to Unicode 13. 2019-11-26 15:25:06 -08:00
Shane Carr
017c8b762e ICU-20890 Change locale_dependencies.py into LOCALE_DEPS.json files
- Refactors Python to make I/O operations more abstract
- Adds stable sample data for Python test
2019-11-22 20:23:30 -08:00
Peter Edberg
04c8616f93 ICU-20857 integrate CLDR release-36-1-preview to maint-66 2019-11-22 19:01:36 -08:00
Caio Lima
873e2db780 ICU-20741 Adding tests for C/C++ API into DateFormatTests 2019-11-22 15:43:27 -08:00
Markus Scherer
a7e378d587 ICU-20893 Unicode 13 beta
See PR #915, see changes.txt
- Unicode 13 beta data as of 2019-nov-21
- uprops.icu format version 7.7 with more bits for Script/Script_Extensions
- more bits in spoof checker ScriptSet
- root line break rules adjusted for UAX 14 changes, from Andy
- line break tailorings not yet in sync with root
2019-11-21 17:35:53 -08:00
Peter Edberg
ceb84b5dde ICU-20844 remove restriction on minInt=minFrac=0, ensure doFastFormatInt32
and NumberFormatterImpl::writeNumber produce at least 1 result digit (#917)
2019-11-13 16:15:02 -08:00
Frank Tang
afbd1b91d9 ICU-20705 Add udtitvfmt_formatCalendarToResult
See #896
2019-11-12 09:34:52 -08:00
Mihai Nita
17d23d71c0 ICU-20739 Force seconds if the skeleton has fractional seconds 2019-11-08 16:03:40 -08:00
Shane Carr
cfb298f035 ICU-20709 Use SIGNUM_COUNT for number of entries in Signum enum. 2019-11-05 14:43:34 -08:00
Shane Carr
00946cef43 ICU-20709 Moving rounder call before number properties.
- Changes EXCEPT_ZERO notation to hide sign on numbers that round to zero.
- Adds additional tests for this behavior.
2019-11-05 14:43:34 -08:00
Shane Carr
e7b540d1af ICU-20709 Refactoring number formatter to apply pattern after compact notation. 2019-11-05 14:43:34 -08:00
Shane Carr
369e67221c ICU-20709 Adding fourth signum type. Converting Java to use enum. 2019-11-05 14:43:34 -08:00
Frank Tang
fab4c3c719 ICU-20884 initialized buffer uloc_getKeywordValue 2019-11-05 13:51:35 -08:00
Frank Yung-Fong Tang
3735b6b8c0 ICU-20872 remove extra ; after function {}
See #888
2019-11-05 11:43:02 -08:00
Andy Heninger
1206f07a52 ICU-20863 Regex Named Capture map, add a missing nullptr check. 2019-10-28 21:10:41 -07:00
Andy Heninger
e94657e614 ICU-20863 Regex Named Capture map, add a missing nullptr check. 2019-10-28 16:53:18 -07:00
Frank Tang
84f6735fde ICU-20478 Sort variant in (for|to)LanguageTag of icu::Locale and ULocale
See #836
2019-10-28 14:57:10 -07:00
Frank Yung-Fong Tang
176674f9f1 ICU-20872 remove extra ; after function {}
See #888
2019-10-23 11:30:29 -07:00
Andy Heninger
03937347fb ICU-20863 Regex, lazy creation and reduced size of map from capture group names to numbers. 2019-10-22 17:23:26 -07:00
Daniel Ju
e95840c59c ICU-20857 Update version numbers to 66.0.1 2019-10-21 12:32:39 -07:00
Frank Tang
596647c0c3 ICU-20862 Fix setKeywordValue U_BUFFER_OVERFLOW_ERROR bug.
See #885
2019-10-18 10:54:56 -07:00
Jeff Genovy
727505bdda ICU-20850 Use LocalMemory for cmd to prevent use after free 2019-10-15 12:52:13 -07:00
Jeff Genovy
1e65be7d1a ICU-20858 Fix Windows data build failure with long paths 2019-10-11 11:43:04 -07:00
Jeff Genovy
c6d2de5222 ICU-20859 ICU4C: Python data build uses wrong value for tool_cfg 2019-10-11 11:41:55 -07:00
Craig Cornelius
2baf0a75b0 ICU-20728 Improve debug output for old C++ RBBI monkey test
See #730
2019-10-10 13:26:03 -07:00
Elango Cheran
2b32778611 ICU-13734 Adding tests for DecimalFormat strict mode handling of flexible whitespace 2019-10-09 17:52:40 -07:00
Jeff Genovy
bcd3f8b68f ICU-20839 Add ICU4C header test to check for including utypes.h when using U_SHOW_CPLUSPLUS_API 2019-10-09 17:51:27 -07:00
Daniel Ju
f5b951d505 ICU-20857 Update version numbers to 66.1 2019-10-09 16:47:02 -07:00
Frank Tang
1ab75afc5f ICU-20706 Fix DateInterval::createInstance w/ test
See #876
2019-10-09 16:13:47 -07:00
Shane F. Carr
f744742e03
ICU-20851 Merge release-65-1 to master. 2019-10-04 16:05:55 -04:00
Steven R. Loomis
fd123bf023 ICU-20796 update C API Change Report 2019-10-02 14:30:54 -07:00
Markus Scherer
e5381c956b ICU-20845 UMutex not trivially but constexpr constructible 2019-10-02 11:00:19 -07:00
Steven R. Loomis
7f862281da ICU-20813 Fix Multi-line comment in umachine.h
- This comment failed on gcc. Split it into two lines.
2019-10-02 10:02:26 -07:00
Shane F. Carr
051d6a553e ICU-20453 Add more warning types to CI build.
See #824
2019-10-02 13:00:14 -04:00
Shane Carr
d36779df6c ICU-20796 Updating double-conversion from upstream master. 2019-09-27 13:03:30 -07:00
Peter Edberg
33ca188a7f ICU-20796 integrate CLDR release-36-beta 2019-09-27 11:52:05 -07:00
Elango Cheran
3b99d07581 ICU-13735 Adding tests for DecimalFormat grouping getters 2019-09-27 11:05:32 -07:00
Jeff Genovy
dc4dfd292b ICU-20836 ICU4C header file plurrule.h needs to include utypes.h before checking U_SHOW_CPLUSPLUS_API. 2019-09-26 18:25:19 -07:00
Robin Leroy
4f72eea026 ICU-20831 Make *fCapitalizationBrkIter const, eliminating a data race in SimpleDateFormat::format. 2019-09-25 16:30:15 -07:00
Adam Sitnik
1f4a77cbc1 ICU-20832 use uint32_t instead of uint16_t to avoid overflows for very long strings 2019-09-25 14:20:56 -07:00
Fredrik Roubert
e5529933b2 ICU-20819 Correct placement of parentheses in preprocessor macro.
The purpose of the FIELD_NAME_STR() macro is to create a string literal
by using the # preprocessing operator and then skip the first 5 chars of
this string by using the +5 pointer arithmetic. This is all intentional,
but if the parentheses are misplaced the compiler might think that this
is a mistake, a failed string concatenation (-Wstring-plus-int).
2019-09-25 08:06:29 -07:00
Markus Scherer
5f443972ec ICU-20814 new tool for checking API tags vs. ifdef guards; add FORCE guards, and move some guards, to make this work 2019-09-23 17:04:53 -07:00
Peter Edberg
6d14ff6e1f ICU-20796 integrate CLDR release-36-alpha3 2019-09-20 16:08:49 -07:00
Jeff Genovy
e472e46a60 ICU-20825 Add ARM64 to distrelease.ps1 script, and run in the CI builds 2019-09-18 10:53:13 -07:00
Daniel Ju
8b0cd535f9 ICU-20796 BRS65GA Update version numbers and README 2019-09-17 11:48:55 -07:00
Yoshito Umaoka
a5e2945eb0 ICU-20823 ICU time zone data update for 2019c 2019-09-16 23:03:45 -04:00
Shane Carr
1d40b8f5e8 ICU-20811 Add fields required for locale inheritance to additive mode. 2019-09-13 15:38:38 -07:00
Peter Edberg
c4ea7681ee ICU-20796 BRS 65 update C API guard macros (manual version) (#827) 2019-09-13 10:56:25 -07:00
Jeff Genovy
5464f3482f ICU-20804 OOM not handled in selectForMask 2019-09-11 18:15:39 -07:00
Peter Edberg
c98e90c670 ICU-20396 add RelativeDateTimeFormatter test for af 2019-09-11 17:32:06 -07:00
Peter Edberg
7814980f51 ICU-20749 add ອາແມນ to laodict.txt 2019-09-11 14:46:40 -07:00
Steven R. Loomis
417254f66a ICU-20795 ICU4C 65.1 API promotion - locid.h
- fixup some functions in locid.h that were incorrectly guarded as draft
- Error was in:
   - 5a3ea669aa
   - https://github.com/unicode-org/icu/pull/808
2019-09-10 11:31:54 -07:00
Steven R. Loomis
5a3ea669aa ICU-20795 ICU4C 65.1 API promotion draft
- includes new APIChangeReport.md
- the 'simplification' section is no longer new
- uses tools from [ICU-20162] #807

Includes non-promotion fixes:
- utrace.h: UTRACE_UDATA_BUNDLE
2019-09-09 21:41:04 -07:00
Peter Edberg
84d16d8c6c ICU-20795 BRS 65 update urename.h 2019-09-09 10:45:06 -07:00
Peter Edberg
e25796f6e5 ICU-20801 integrate CLDR release-36-alpha2, update MeasureUnits (#809) 2019-09-06 14:07:36 -07:00
Jeff Genovy
f82e4c4401 ICU-20795 BRS65 ICU4C Samples: case sample should use DLL runtime to prevent assertion failures. 2019-09-06 13:44:14 -07:00
gnrunge
66b8b4c8ce ICU-20795 BRS test without data task: Adds a status check after PluralRules
instance creation. Test causes segmentation fault later if instance creation
fails.
2019-09-06 11:32:48 -07:00
gnrunge
5e3f472c67 ICU-20795 BRS test without data task: Adds a status check after Locale instance
creation. Test causes segmentation fault if it tries to continue beyond failed
instance creation.
segmentation fault if instance creation fails
2019-09-06 09:43:30 -07:00
Markus Scherer
611a659d4c ICU-20795 add LocaleMatcher to API docs index 2019-09-05 14:15:59 -07:00
Jeff Genovy
b851c53b91 ICU-20807 BRS65: Environment test failure in cintltst-timezone
The test fails for "America/Argentina/ComodRivadavia", which has length
of 32, the same as the buffer. The results in the string being not
terminated with a NUL.

This increases the buffer size used by the test, and also checks for the
string not terminated warning.
2019-09-05 14:12:57 -07:00
Steven R. Loomis
ddadc9427b ICU-13745 fix undefined behavior: GregorianCalendar::setGregorianChange()
- Julian days outside of INT32_MIN..INT32_MAX are normalized
- Add a test case
2019-09-04 23:20:31 +02:00
Jeff Genovy
d89c4909f8 ICU-20802 Need to use LocalMemory in uloc_openKeywordList, not LocalPointer 2019-08-31 00:30:12 -07:00
Markus Scherer
616b3c5647 ICU-13647 fix SearchIterator docs sample: getMatchedLength() not getMatchLength() 2019-08-30 23:12:29 -07:00
Markus Scherer
e9285d9675 ICU-20518 update u_isbase() reference to Unicode Standard Base character 2019-08-30 17:06:33 -07:00
Jeff Genovy
973a96785e ICU-20802 OOM not handled in uloc_openKeywordList.
Also change to use LocalPointer and nullptr instead of NULL.
2019-08-30 16:35:26 -07:00
Markus Scherer
c4f68c3790 ICU-13649 UnicodeString docs: mention std::string clear() to make remove() easier to find 2019-08-30 16:24:10 -07:00
Jeff Genovy
543495da74 ICU-20368 OOM not handled in NumberFormatterImpl::macrosToMicroGenerator 2019-08-30 16:00:06 -07:00
Peter Edberg
0801dd0bdd ICU-20577 Restore C MeasureFormat ability to adopt non-decimal number formatter (#789) 2019-08-30 15:53:05 -07:00
Markus Scherer
7237fc58b4 ICU-12086 ICU-12165 Currency.getName() param isChoiceFormat can be null, make it so, document, use null in library code 2019-08-30 14:47:19 -07:00
Victor Chang
6ff43608d2 ICU-20589 Fix EraRulesTest#testAPIs failure on 1 May 2019 2019-08-30 17:21:25 -04:00
Jeff Genovy
3d9914be47 ICU-20795 Added comment to ICU4C Readme.html about U_SHOW_CPLUSPLUS_API. 2019-08-30 10:35:40 -07:00
Peter Edberg
f46b567ba3 ICU-20701 Add more PluralRules tests for locales with keywords 2019-08-30 10:06:21 -07:00
Daniel Ju
cfe093e945 ICU-20795 BRS65RC Update version numbers and readme files, regenerate JARs 2019-08-30 17:58:24 +02:00
Peter Edberg
62914d1f07 ICU-20620 cap UNUM_MAX_FRACTION_DIGITS setting at 999 2019-08-29 16:12:09 -07:00
Frank Tang
eeb759063b ICU-20799 delete calendarToAdopt upon error
ICU-20799 add unit tests

ICU-20799 initialize error and add comments.
2019-08-29 15:49:37 -07:00
Jeff Genovy
c28505caaa ICU-20555 Fix Windows build failures with long paths: Use PowerShell when command length exceeds CMD's limit. 2019-08-29 12:22:56 -07:00
Jeff Genovy
b702db31df ICU-20680 Add comments about UPRV_UNREACHABLE to u_UCharsToChars and CEIBuffer::get[Previous]. 2019-08-28 17:22:15 -07:00
Jeff Genovy
ed99298431 ICU-20794 Fix typo in ucurr.h 2019-08-28 13:24:48 -07:00
Jeff Genovy
1573018e5e ICU-20789 Clean-up the VS "clean" target for the Makedata project. 2019-08-28 12:32:42 -07:00
Peter Edberg
141884a85c ICU-20680 revert use of UPRV_UNREACHABLE in places actually reached in production code 2019-08-27 23:23:36 -07:00
Jeff Genovy
4b6eb7236a ICU-20782 Enable Windows icucheck.bat script for ARM/ARM64. 2019-08-27 18:29:12 -07:00
Jeff Genovy
f7abe8c1c1 ICU-20782 Add support for cross-compiling Windows ARM/ARM64 data DLL from the x64 bits. 2019-08-26 22:50:31 -07:00
Jeff Genovy
408752ec49 ICU-20782 Enable Windows desktop ARM and ARM64 builds of ICU4C.
This enables "classic" desktop builds of ICU4C for both ARM (32-bit)
and ARM64 (64-bit) on Windows.

All but the two samples "cal" and "date" in the "allinone" project now
have ARM and ARM64 project configurations, and build for Windows Desktop
ARM/ARM64.

Note: In order to build the ARM/ARM64 data DLL, you need to first build
x64/Release, as the ARM/ARM build uses the x64 bits in order to be able
to cross-compile for ARM/ARM64. This allows for completely building
ARM/ARM64 binaries using only x64 hardware.

The ARM/ARM64 builds require using a newer version of the Windows SDK
than 8.1, so they have a separate WindowsTargetPlatformVersion which
uses Windows 10 SDK version 10.0.16299.0 (aka RS3), which is the first
version of the Windows SDK to support building ARM64 desktop applications.

In addition this also greatly cleans-up the ICU4C ".vcxproj" files, in
order to remove redundant parts, fix inconsistencies, and make them more
readable. This introduces two new variables in the shared `*.props`
files: `IcuBinOutputDir` and `IcuLibOutputDir` in order to further
reduce the amount of duplicated lines in the individual ".vcxproj"
files themselves.
2019-08-26 22:50:31 -07:00
Jose Dapena Paz
407442dec7 ICU-20784 Do not override clang compiler internal builtins
In the case several internal builtins defined by clang were not available,
ICU was replacing them by a stub implementation. But that was breaking
detection of availability of same methods in other parts of Chromium
(specifically in base/location.h).

Instead of that, this change creates ICU specific macros that will
map to those builtins when available, or to stub implementation if
not.

I.e. for the case of __has_builtin, previous implementation was
defining __has_builtin(x) as 0 in case it was not declared. With
new implementation, there is a macro UPRV_HAS_BUILTIN that maps
to __has_builtin if available, or 0 if not.
2019-08-26 09:14:01 -07:00
Markus Scherer
d3315d98ef ICU-20783 use C++ covariant return types 2019-08-23 11:45:36 -07:00
Markus Scherer
f02b496494 ICU-20783 C++ covariant return types: clone(), freeze() & friends 2019-08-22 16:24:41 -07:00
Markus Scherer
deec7ef683 ICU-20646 make Edits::copyErrorTo() const 2019-08-22 13:25:01 -07:00
Filip Filmar
0a01b29005 ICU-20776 Checks for nullness in UMutex::lock()
Adds `U_ASSERT` check before using `m->lock()` to make allocation issues
more apparent at least in debug builds.

There is probably quite a few places like this, but let's try fixing
broken windows.
2019-08-21 11:21:24 -07:00
Jeff Genovy
c5ad4664f9 ICU-20768 Remove fixed DLL base addresses when building Windows DLLs.
Remove redundant FixedBaseAddress entries from the vcxproj files.
Make the pkgdata -b option a no-op, and output a message to the user.
2019-08-20 15:37:15 -07:00
Andy Heninger
327087150f ICU-20618 Regex nested lookaround expressions, clean up active match region handling. 2019-08-19 13:31:34 -07:00
Andy Heninger
5f837abd40 ICU-13533 Fix address sanitizer failures found with no-data ICU testing. 2019-08-19 13:29:32 -07:00
Markus Scherer
41c24b6c00 ICU-9695 port LocaleMatcher to C++ 2019-08-19 10:41:35 -07:00
Fredrik Roubert
b4b2378931 ICU-20601 Wrap ICU test compound macros in do { } while.
This does the same for the ICU test code as was done for the
public ICU API in commit 480bec3ea6.
2019-08-15 22:01:42 +02:00
Fredrik Roubert
4fb47b12a7 ICU-20601 Wrap ICU implementation compound macros in do { } while.
This does the same for the ICU implementation code as was done for the
public ICU API in commit 480bec3ea6.
2019-08-15 20:48:50 +02:00
Fredrik Roubert
480bec3ea6 ICU-20601 Wrap public ICU API compound macros in do { } while.
This is the normal way of making compound macros behave like statements
and allowing macro invocations that look like function calls to work
just like if they were function calls.

Before ICU 65, function-like, multi-statement ICU macros were just
defined as series of statements wrapped in { } blocks and the caller
could choose to either treat them as if they were actual functions and
end the invocation with a trailing ; creating an empty statement after
the block or else omit this trailing ; using the knowledge that the
macro would expand to { }.

To continue supporting code that depends on that old behaviour, on being
able to omit the trailing ; when invoking one of these macros, the new
surrounding do { } while is done through preprocessor defines that can
easily be overridden at compile time, when needed.
2019-08-15 19:17:25 +02:00
Fredrik Roubert
d8f14e22df ICU-20758 Add a StringPiece constructor for any string view type.
Using the C++ SFINAE (substitution failure is not an error) technique,
it's possible to provide an icu::StringPiece constructor that accepts
any string view type that might be available in the current compilation
unit, without adding any additional dependencies or configuration flags
to ICU.
2019-08-15 13:36:09 +02:00
Fredrik Roubert
c78d9fa137 ICU-20601 Add missing semicolons.
These are the same changes for the C++ code as was done for the C code
by commit aa60d4292e.
2019-08-15 12:30:21 +02:00
Fredrik Roubert
5d6d29b76a ICU-20601 Remove superfluous semicolons (-Wextra-semi-stmt).
These are the same changes for the C++ code as was done for the C code
by commit 17606e0345.
2019-08-15 12:30:21 +02:00
Shane Carr
1d2861bb0c ICU-20627 Adding getAvailableLocalesByType, ICU4C and ICU4J. 2019-08-14 20:45:27 -07:00
Jeff Genovy
9a3f15c2b3 ICU-20759 Add ucal_getDefaultTimeZone C API for host OS timezone detection. 2019-08-14 18:27:04 -07:00
Shane Carr
5e7ff44f91 ICU-20517 Removing dead code in rbnf.cpp 2019-08-14 17:49:52 -07:00
Shane Carr
3879315738 ICU-13596 Clarifying error code type in numfmt.h parse() 2019-08-14 17:49:04 -07:00
Shane Carr
4785f55622 ICU-20562 Adding toDecimalNumber method to C++ FormattedNumber. 2019-08-14 16:59:09 -07:00
Shane Carr
4e07b85279 ICU-20422 Redefining U_NO_THROW to U_NOEXCEPT 2019-08-14 10:32:48 -07:00
Nikita Iashchenko
89a618de70 ICU-20771 Fix incorrect documentation tag for DateTimePatternGenerator 2019-08-14 10:27:20 -07:00
Shane Carr
2b3e3e3ce6 ICU-20524 Adding variables for relative file replacement directory.
Also fixes some bugs with file replacement.
2019-08-14 00:25:26 -07:00
Jeff Genovy
d1293c50cb ICU-20712 Add support for building Windows UWP ARM/ARM64 data DLLs.
This also changes the pkgdata tool command line options to decouple the
ARM/ARM64 flags from the UWP flag, and adds a generic architecture
option (-a) for passing in the value of the linker "/MACHINE:" argument
on the command line. (Ex: -a ARM64).

Additionally this change also adds another option to pkgdata (-b) to 
set /DYNAMICBASE on the data DLL, which is required for the ARM64 builds.

Both of these changes also work towards future work in order to enable
full ARM64 desktop builds without UWP.

This change also removes a number of ifdefs/forks in the ICU code based
on U_PLATFORM_HAS_WINUWP_API, and changes them to use ICU_DATA_DIR_WINDOWS
instead. This is needed to unblock the usage of the data DLL in the
UWP scenario, but also helps to further reduce the divergence of the UWP
projects from regular Windows builds.

Related tickets:
  ICU4C: Remove fixed DLL base addresses when building Windows DLLs
  https://unicode-org.atlassian.net/browse/ICU-20768

  Add support to generate ICU data DLL for Windows arm64
  https://unicode-org.atlassian.net/browse/ICU-20670
2019-08-13 17:03:33 -07:00
Shane Carr
2390ce569e ICU-20685 Improving docs for UErrorCode. 2019-08-13 16:01:48 -07:00
Shane Carr
d983221543 ICU-20764 Allow top-level include and exclude in data filter rules. 2019-08-13 15:12:32 -07:00
Shane Carr
035eead0e8 ICU-20423 Removing deprecated method toNumberFormatter() 2019-08-13 13:06:52 -07:00
Shane Carr
f4fc9d06c2 ICU-20394 Changing DecimalFormatFields to not allocate as many objects 2019-08-13 13:06:20 -07:00
Shane Carr
513b0c20b0 ICU-13743 Adding number permutation test.
Adds a test suite in C++ and Java to test many permutations of options in NumberFormatter.
2019-08-12 23:34:51 -07:00
Shane Carr
b4d41b0561 ICU-20737 Removing Python dependency on distutils.
Deletes tstfiles.mk and merges the list into BUILDRULES.py
2019-08-12 15:12:48 -07:00
Shane Carr
afab3f992c ICU-13780 Removing DecimalFormat_ICU58 (finally). 2019-08-12 14:59:45 -07:00
Markus Scherer
527ff9f7ac ICU-20735 simpler state saving for C++ string tries 2019-08-12 14:49:10 -07:00
Jeff Genovy
8646872f68 ICU-20757 Fix typos in utrans.h header file. 2019-08-09 17:43:31 -07:00
Fredrik Roubert
aa60d4292e ICU-20601 Add missing semicolons.
The way these macros currently are defined, the code compiles also
without the final semicolons. But for consistency and in order to allow
the macro definitions to be updated also these macro invocations should
have final semicolons just like in the rest of this code base.
2019-08-09 14:38:52 +02:00
Fredrik Roubert
17606e0345 ICU-20601 Remove superfluous semicolons (-Wextra-semi-stmt). 2019-08-09 14:38:52 +02:00
Rohan Palaniappan
185fbba5a2 ICU-20747 Modify common_uwp to use onecore.lib instead of onecoreuap.lib 2019-08-07 17:06:13 -07:00
Jeff Genovy
e72290c45e ICU-13764 Add separate CI build that treats warnings as errors with clang.
This adds a separate CI build that enables -Werror for clang.

This also fixes all of the -Wall -Wextra warnings in the tests, and all the
-Wextra-semi warnings as well.
2019-07-30 22:10:02 -07:00
Andy Heninger
3ac2da2044 ICU-20048 Remove use of std::align() for compat with g++ 4.9. 2019-07-30 11:19:53 -07:00
Steven R. Loomis
fc487bf32b ICU-20493 Warn on global/static c’tors
- add -Wglobal-constructors to clang (only for libs)
- Note: ignore 'runstatedir' flap in configure
2019-07-26 15:16:13 -07:00
Andy Heninger
f793ad55e9 ICU-20729 Remove obsolete U_HAVE_STD_ATOMICS and similar @internal macros. 2019-07-24 16:37:40 -07:00
Jeff Genovy
16f2ba2180 ICU-20721 Fix typo in API docs about unumf_openForSkeletonAndLocale. 2019-07-24 11:52:19 -07:00