(uprv_strlen(LEGACY[i+1]));
+ newTagLength = replacementLen + tagLen - checkLegacyLen;
if (tagLen < newTagLength) {
uprv_free(tagBuf);
tagBuf = (char*)uprv_malloc(newTagLength + 1);
@@ -2111,16 +2077,16 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
t->buf = tagBuf;
tagLen = newTagLength;
}
- parsedLenDelta = checkGrandfatheredLen - replacementLen;
- uprv_strcpy(t->buf, GRANDFATHERED[i + 1]);
- if (checkGrandfatheredLen != tagLen) {
- uprv_strcpy(t->buf + replacementLen, tag + checkGrandfatheredLen);
+ parsedLenDelta = checkLegacyLen - replacementLen;
+ uprv_strcpy(t->buf, LEGACY[i + 1]);
+ if (checkLegacyLen != tagLen) {
+ uprv_strcpy(t->buf + replacementLen, tag + checkLegacyLen);
}
break;
}
}
- if (grandfatheredLen == 0) {
+ if (legacyLen == 0) {
for (i = 0; i < UPRV_LENGTHOF(REDUNDANT); i += 2) {
const char* redundantTag = REDUNDANT[i];
size_t redundantTagLen = uprv_strlen(redundantTag);
@@ -2440,10 +2406,8 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
return t.orphan();
}
-/**
-* Ticket #12705 - Turn optimization back on.
-*/
-#if (defined(_MSC_VER) && (_MSC_VER >= 1900) && defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 190024210))
+// Ticket #12705 - Turn optimization back on.
+#if defined(_MSC_VER) && (_MSC_VER >= 1900) && (_MSC_VER < 1924)
#pragma optimize( "", on )
#endif
@@ -2608,8 +2572,8 @@ ultag_getPrivateUse(const ULanguageTag* langtag) {
#if 0
static const char*
-ultag_getGrandfathered(const ULanguageTag* langtag) {
- return langtag->grandfathered;
+ultag_getLegacy(const ULanguageTag* langtag) {
+ return langtag->legacy;
}
#endif
@@ -2720,14 +2684,17 @@ ulocimp_toLanguageTag(const char* localeID,
key = uenum_next(kwdEnum.getAlias(), &len, &tmpStatus);
if (len == 1 && *key == PRIVATEUSE) {
- char buf[ULOC_KEYWORD_AND_VALUES_CAPACITY];
- buf[0] = PRIVATEUSE;
- buf[1] = SEP;
- len = uloc_getKeywordValue(localeID, key, &buf[2], sizeof(buf) - 2, &tmpStatus);
+ icu::CharString buf;
+ {
+ icu::CharStringByteSink sink(&buf);
+ ulocimp_getKeywordValue(localeID, key, sink, &tmpStatus);
+ }
if (U_SUCCESS(tmpStatus)) {
- if (ultag_isPrivateuseValueSubtags(&buf[2], len)) {
+ if (ultag_isPrivateuseValueSubtags(buf.data(), buf.length())) {
/* return private use only tag */
- sink.Append(buf, len + 2);
+ static const char PREFIX[] = { PRIVATEUSE, SEP };
+ sink.Append(PREFIX, sizeof(PREFIX));
+ sink.Append(buf.data(), buf.length());
done = TRUE;
} else if (strict) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
diff --git a/deps/icu-small/source/common/ulocimp.h b/deps/icu-small/source/common/ulocimp.h
index 98b95dddfe75bc..a686759f32e3e1 100644
--- a/deps/icu-small/source/common/ulocimp.h
+++ b/deps/icu-small/source/common/ulocimp.h
@@ -13,6 +13,8 @@
#include "unicode/bytestream.h"
#include "unicode/uloc.h"
+#include "charstr.h"
+
/**
* Create an iterator over the specified keywords list
* @param keywordList double-null terminated list. Will be copied.
@@ -38,7 +40,7 @@ uloc_getTableStringWithFallback(
int32_t *pLength,
UErrorCode *pErrorCode);
-/*returns TRUE if a is an ID separator FALSE otherwise*/
+/*returns true if a is an ID separator false otherwise*/
#define _isIDSeparator(a) (a == '_' || a == '-')
U_CFUNC const char*
@@ -47,42 +49,55 @@ uloc_getCurrentCountryID(const char* oldID);
U_CFUNC const char*
uloc_getCurrentLanguageID(const char* oldID);
-U_CFUNC int32_t
+U_CFUNC void
+ulocimp_getKeywords(const char *localeID,
+ char prev,
+ icu::ByteSink& sink,
+ UBool valuesToo,
+ UErrorCode *status);
+
+icu::CharString U_EXPORT2
ulocimp_getLanguage(const char *localeID,
- char *language, int32_t languageCapacity,
- const char **pEnd);
+ const char **pEnd,
+ UErrorCode &status);
-U_CFUNC int32_t
+icu::CharString U_EXPORT2
ulocimp_getScript(const char *localeID,
- char *script, int32_t scriptCapacity,
- const char **pEnd);
+ const char **pEnd,
+ UErrorCode &status);
-U_CFUNC int32_t
+icu::CharString U_EXPORT2
ulocimp_getCountry(const char *localeID,
- char *country, int32_t countryCapacity,
- const char **pEnd);
+ const char **pEnd,
+ UErrorCode &status);
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocimp_getName(const char* localeID,
icu::ByteSink& sink,
UErrorCode* err);
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocimp_getBaseName(const char* localeID,
icu::ByteSink& sink,
UErrorCode* err);
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocimp_canonicalize(const char* localeID,
icu::ByteSink& sink,
UErrorCode* err);
+U_CAPI void U_EXPORT2
+ulocimp_getKeywordValue(const char* localeID,
+ const char* keywordName,
+ icu::ByteSink& sink,
+ UErrorCode* status);
+
/**
* Writes a well-formed language tag for this locale ID.
*
- * **Note**: When `strict` is FALSE, any locale fields which do not satisfy the
+ * **Note**: When `strict` is false, any locale fields which do not satisfy the
* BCP47 syntax requirement will be omitted from the result. When `strict` is
- * TRUE, this function sets U_ILLEGAL_ARGUMENT_ERROR to the `err` if any locale
+ * true, this function sets U_ILLEGAL_ARGUMENT_ERROR to the `err` if any locale
* fields do not satisfy the BCP47 syntax requirement.
*
* @param localeID the input locale ID
@@ -96,7 +111,7 @@ ulocimp_canonicalize(const char* localeID,
*
* @internal ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocimp_toLanguageTag(const char* localeID,
icu::ByteSink& sink,
UBool strict,
@@ -107,13 +122,17 @@ ulocimp_toLanguageTag(const char* localeID,
* If the specified language tag contains any ill-formed subtags,
* the first such subtag and all following subtags are ignored.
*
- * This implements the 'Language-Tag' production of BCP47, and so
- * supports grandfathered (regular and irregular) as well as private
- * use language tags. Private use tags are represented as 'x-whatever',
- * and grandfathered tags are converted to their canonical replacements
- * where they exist. Note that a few grandfathered tags have no modern
- * replacement, these will be converted using the fallback described in
+ * This implements the 'Language-Tag' production of BCP 47, and so
+ * supports legacy language tags (marked as “Type: grandfathered” in BCP 47)
+ * (regular and irregular) as well as private use language tags.
+ *
+ * Private use tags are represented as 'x-whatever',
+ * and legacy tags are converted to their canonical replacements where they exist.
+ *
+ * Note that a few legacy tags have no modern replacement;
+ * these will be converted using the fallback described in
* the first paragraph, so some information might be lost.
+ *
* @param langtag the input BCP47 language tag.
* @param tagLen the length of langtag, or -1 to call uprv_strlen().
* @param sink the output sink receiving a locale ID for the
@@ -135,7 +154,7 @@ ulocimp_forLanguageTag(const char* langtag,
* Get the region to use for supplemental data lookup. Uses
* (1) any region specified by locale tag "rg"; if none then
* (2) any unicode_region_tag in the locale ID; if none then
- * (3) if inferRegion is TRUE, the region suggested by
+ * (3) if inferRegion is true, the region suggested by
* getLikelySubtags on the localeID.
* If no region is found, returns length 0.
*
@@ -143,7 +162,7 @@ ulocimp_forLanguageTag(const char* langtag,
* The complete locale ID (with keywords) from which
* to get the region to use for supplemental data.
* @param inferRegion
- * If TRUE, will try to infer region from localeID if
+ * If true, will try to infer region from localeID if
* no other region is found.
* @param region
* Buffer in which to put the region ID found; should
@@ -189,7 +208,7 @@ ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion,
* or the localeId is not well-formed, the error code is U_ILLEGAL_ARGUMENT_ERROR.
* @internal ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocimp_addLikelySubtags(const char* localeID,
icu::ByteSink& sink,
UErrorCode* err);
@@ -223,7 +242,7 @@ ulocimp_addLikelySubtags(const char* localeID,
* or the localeId is not well-formed, the error code is U_ILLEGAL_ARGUMENT_ERROR.
* @internal ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocimp_minimizeSubtags(const char* localeID,
icu::ByteSink& sink,
UErrorCode* err);
@@ -279,4 +298,10 @@ ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* i
U_CFUNC const char*
ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType);
+/* Function for testing purpose */
+U_CAPI const char* const* ulocimp_getKnownCanonicalizedLocaleForTest(int32_t* length);
+
+// Return true if the value is already canonicalized.
+U_CAPI bool ulocimp_isCanonicalizedLocaleForTest(const char* localeName);
+
#endif
diff --git a/deps/icu-small/source/common/umutex.h b/deps/icu-small/source/common/umutex.h
index 7588bcc5d9aed6..57955353d0d6ff 100644
--- a/deps/icu-small/source/common/umutex.h
+++ b/deps/icu-small/source/common/umutex.h
@@ -262,13 +262,13 @@ class U_COMMON_API UMutex {
* the global ICU mutex. Recursive locks are an error
* and may cause a deadlock on some platforms.
*/
-U_INTERNAL void U_EXPORT2 umtx_lock(UMutex* mutex);
+U_CAPI void U_EXPORT2 umtx_lock(UMutex* mutex);
/* Unlock a mutex.
* @param mutex The given mutex to be unlocked. Pass NULL to specify
* the global ICU mutex.
*/
-U_INTERNAL void U_EXPORT2 umtx_unlock (UMutex* mutex);
+U_CAPI void U_EXPORT2 umtx_unlock (UMutex* mutex);
U_NAMESPACE_END
diff --git a/deps/icu-small/source/common/unicode/appendable.h b/deps/icu-small/source/common/unicode/appendable.h
index 4beacaf6583620..fc99254de14e58 100644
--- a/deps/icu-small/source/common/unicode/appendable.h
+++ b/deps/icu-small/source/common/unicode/appendable.h
@@ -45,7 +45,7 @@ class UnicodeString;
*
* The methods do not take UErrorCode parameters.
* If an error occurs (e.g., out-of-memory),
- * in addition to returning FALSE from failing operations,
+ * in addition to returning false from failing operations,
* the implementation must prevent unexpected behavior (e.g., crashes)
* from further calls and should make the error condition available separately
* (e.g., store a UErrorCode, make/keep a UnicodeString bogus).
@@ -62,7 +62,7 @@ class U_COMMON_API Appendable : public UObject {
/**
* Appends a 16-bit code unit.
* @param c code unit
- * @return TRUE if the operation succeeded
+ * @return true if the operation succeeded
* @stable ICU 4.8
*/
virtual UBool appendCodeUnit(char16_t c) = 0;
@@ -71,7 +71,7 @@ class U_COMMON_API Appendable : public UObject {
* Appends a code point.
* The default implementation calls appendCodeUnit(char16_t) once or twice.
* @param c code point 0..0x10ffff
- * @return TRUE if the operation succeeded
+ * @return true if the operation succeeded
* @stable ICU 4.8
*/
virtual UBool appendCodePoint(UChar32 c);
@@ -81,7 +81,7 @@ class U_COMMON_API Appendable : public UObject {
* The default implementation calls appendCodeUnit(char16_t) for each code unit.
* @param s string, must not be NULL if length!=0
* @param length string length, or -1 if NUL-terminated
- * @return TRUE if the operation succeeded
+ * @return true if the operation succeeded
* @stable ICU 4.8
*/
virtual UBool appendString(const char16_t *s, int32_t length);
@@ -90,9 +90,9 @@ class U_COMMON_API Appendable : public UObject {
* Tells the object that the caller is going to append roughly
* appendCapacity char16_ts. A subclass might use this to pre-allocate
* a larger buffer if necessary.
- * The default implementation does nothing. (It always returns TRUE.)
+ * The default implementation does nothing. (It always returns true.)
* @param appendCapacity estimated number of char16_ts that will be appended
- * @return TRUE if the operation succeeded
+ * @return true if the operation succeeded
* @stable ICU 4.8
*/
virtual UBool reserveAppendCapacity(int32_t appendCapacity);
@@ -171,7 +171,7 @@ class U_COMMON_API UnicodeStringAppendable : public Appendable {
/**
* Appends a 16-bit code unit to the string.
* @param c code unit
- * @return TRUE if the operation succeeded
+ * @return true if the operation succeeded
* @stable ICU 4.8
*/
virtual UBool appendCodeUnit(char16_t c);
@@ -179,7 +179,7 @@ class U_COMMON_API UnicodeStringAppendable : public Appendable {
/**
* Appends a code point to the string.
* @param c code point 0..0x10ffff
- * @return TRUE if the operation succeeded
+ * @return true if the operation succeeded
* @stable ICU 4.8
*/
virtual UBool appendCodePoint(UChar32 c);
@@ -188,7 +188,7 @@ class U_COMMON_API UnicodeStringAppendable : public Appendable {
* Appends a string to the UnicodeString.
* @param s string, must not be NULL if length!=0
* @param length string length, or -1 if NUL-terminated
- * @return TRUE if the operation succeeded
+ * @return true if the operation succeeded
* @stable ICU 4.8
*/
virtual UBool appendString(const char16_t *s, int32_t length);
@@ -197,7 +197,7 @@ class U_COMMON_API UnicodeStringAppendable : public Appendable {
* Tells the UnicodeString that the caller is going to append roughly
* appendCapacity char16_ts.
* @param appendCapacity estimated number of char16_ts that will be appended
- * @return TRUE if the operation succeeded
+ * @return true if the operation succeeded
* @stable ICU 4.8
*/
virtual UBool reserveAppendCapacity(int32_t appendCapacity);
diff --git a/deps/icu-small/source/common/unicode/brkiter.h b/deps/icu-small/source/common/unicode/brkiter.h
index b944497345479b..9bba5fcccc319d 100644
--- a/deps/icu-small/source/common/unicode/brkiter.h
+++ b/deps/icu-small/source/common/unicode/brkiter.h
@@ -564,7 +564,7 @@ class U_COMMON_API BreakIterator : public UObject {
* BreakIterator::createXXXInstance to avoid undefined behavior.
* @param key the registry key returned by a previous call to registerInstance
* @param status the in/out status code, no special meanings are assigned
- * @return TRUE if the iterator for the key was successfully unregistered
+ * @return true if the iterator for the key was successfully unregistered
* @stable ICU 2.4
*/
static UBool U_EXPORT2 unregister(URegistryKey key, UErrorCode& status);
@@ -655,7 +655,7 @@ class U_COMMON_API BreakIterator : public UObject {
inline UBool BreakIterator::isBufferClone()
{
- return FALSE;
+ return false;
}
#endif /* U_HIDE_DEPRECATED_API */
diff --git a/deps/icu-small/source/common/unicode/bytestream.h b/deps/icu-small/source/common/unicode/bytestream.h
index 33505a34299818..73d498397c744c 100644
--- a/deps/icu-small/source/common/unicode/bytestream.h
+++ b/deps/icu-small/source/common/unicode/bytestream.h
@@ -197,7 +197,7 @@ class U_COMMON_API CheckedArrayByteSink : public ByteSink {
* Returns the sink to its original state, without modifying the buffer.
* Useful for reusing both the buffer and the sink for multiple streams.
* Resets the state to NumberOfBytesWritten()=NumberOfBytesAppended()=0
- * and Overflowed()=FALSE.
+ * and Overflowed()=false.
* @return *this
* @stable ICU 4.6
*/
@@ -236,7 +236,7 @@ class U_COMMON_API CheckedArrayByteSink : public ByteSink {
/**
* Returns true if any bytes were discarded, i.e., if there was an
* attempt to write more than 'capacity' bytes.
- * @return TRUE if more than 'capacity' bytes were Append()ed
+ * @return true if more than 'capacity' bytes were Append()ed
* @stable ICU 4.2
*/
UBool Overflowed() const { return overflowed_; }
diff --git a/deps/icu-small/source/common/unicode/bytestrie.h b/deps/icu-small/source/common/unicode/bytestrie.h
index 51405f64a10e64..85f802df420262 100644
--- a/deps/icu-small/source/common/unicode/bytestrie.h
+++ b/deps/icu-small/source/common/unicode/bytestrie.h
@@ -97,14 +97,13 @@ class U_COMMON_API BytesTrie : public UMemory {
return *this;
}
-#ifndef U_HIDE_DRAFT_API
/**
* Returns the state of this trie as a 64-bit integer.
* The state value is never 0.
*
* @return opaque state value
* @see resetToState64
- * @draft ICU 65
+ * @stable ICU 65
*/
uint64_t getState64() const {
return (static_cast(remainingMatchLength_ + 2) << kState64RemainingShift) |
@@ -123,14 +122,13 @@ class U_COMMON_API BytesTrie : public UMemory {
* @see getState64
* @see resetToState
* @see reset
- * @draft ICU 65
+ * @stable ICU 65
*/
BytesTrie &resetToState64(uint64_t state) {
remainingMatchLength_ = static_cast(state >> kState64RemainingShift) - 2;
pos_ = bytes_ + (state & kState64PosMask);
return *this;
}
-#endif /* U_HIDE_DRAFT_API */
/**
* BytesTrie state object, for saving a trie's current state
@@ -253,16 +251,16 @@ class U_COMMON_API BytesTrie : public UMemory {
/**
* Determines whether all byte sequences reachable from the current state
* map to the same value.
- * @param uniqueValue Receives the unique value, if this function returns TRUE.
+ * @param uniqueValue Receives the unique value, if this function returns true.
* (output-only)
- * @return TRUE if all byte sequences reachable from the current state
+ * @return true if all byte sequences reachable from the current state
* map to the same value.
* @stable ICU 4.8
*/
inline UBool hasUniqueValue(int32_t &uniqueValue) const {
const uint8_t *pos=pos_;
// Skip the rest of a pending linear-match node.
- return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FALSE, uniqueValue);
+ return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue);
}
/**
@@ -321,7 +319,7 @@ class U_COMMON_API BytesTrie : public UMemory {
Iterator &reset();
/**
- * @return TRUE if there are more elements.
+ * @return true if there are more elements.
* @stable ICU 4.8
*/
UBool hasNext() const;
@@ -337,7 +335,7 @@ class U_COMMON_API BytesTrie : public UMemory {
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
- * @return TRUE if there is another element.
+ * @return true if there is another element.
* @stable ICU 4.8
*/
UBool next(UErrorCode &errorCode);
diff --git a/deps/icu-small/source/common/unicode/bytestriebuilder.h b/deps/icu-small/source/common/unicode/bytestriebuilder.h
index e58f18755ef959..eafe5a28c3ef05 100644
--- a/deps/icu-small/source/common/unicode/bytestriebuilder.h
+++ b/deps/icu-small/source/common/unicode/bytestriebuilder.h
@@ -101,9 +101,10 @@ class U_COMMON_API BytesTrieBuilder : public StringTrieBuilder {
* Multiple calls to buildStringPiece() return StringPieces referring to the
* builder's same byte array, without rebuilding.
* If buildStringPiece() is called after build(), the trie will be
- * re-serialized into a new array.
- * If build() is called after buildStringPiece(), the trie object will become
- * the owner of the previously returned array.
+ * re-serialized into a new array (because build() passes on ownership).
+ * If build() is called after buildStringPiece(), the trie object returned
+ * by build() will become the owner of the underlying string for the
+ * previously returned StringPiece.
* After clear() has been called, a new array will be used as well.
* @param buildOption Build option, see UStringTrieBuildOption.
* @param errorCode Standard ICU error code. Its input value must
@@ -139,7 +140,7 @@ class U_COMMON_API BytesTrieBuilder : public StringTrieBuilder {
virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t byteIndex, int32_t count) const;
virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, char16_t byte) const;
- virtual UBool matchNodesCanHaveValues() const { return FALSE; }
+ virtual UBool matchNodesCanHaveValues() const { return false; }
virtual int32_t getMaxBranchLinearSubNodeLength() const { return BytesTrie::kMaxBranchLinearSubNodeLength; }
virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinearMatch; }
diff --git a/deps/icu-small/source/common/unicode/caniter.h b/deps/icu-small/source/common/unicode/caniter.h
index 87c946c2b4db56..8ba4cc7daad3c1 100644
--- a/deps/icu-small/source/common/unicode/caniter.h
+++ b/deps/icu-small/source/common/unicode/caniter.h
@@ -25,11 +25,11 @@
*/
/** Should permutation skip characters with combining class zero
- * Should be either TRUE or FALSE. This is a compile time option
+ * Should be either true or false. This is a compile time option
* @stable ICU 2.4
*/
#ifndef CANITER_SKIP_ZEROES
-#define CANITER_SKIP_ZEROES TRUE
+#define CANITER_SKIP_ZEROES true
#endif
U_NAMESPACE_BEGIN
diff --git a/deps/icu-small/source/common/unicode/chariter.h b/deps/icu-small/source/common/unicode/chariter.h
index 7e4f446bb0f8a8..f7ecd8e0036ce2 100644
--- a/deps/icu-small/source/common/unicode/chariter.h
+++ b/deps/icu-small/source/common/unicode/chariter.h
@@ -65,7 +65,7 @@ U_NAMESPACE_BEGIN
* check for the end of the iteration. When there are no more
* characters in the text object:
*
- * - The hasNext() function returns FALSE.
+ * - The hasNext() function returns false.
* - nextPostInc() and next32PostInc() return DONE
* when one attempts to read beyond the end of the text object.
*
@@ -165,11 +165,11 @@ class U_COMMON_API ForwardCharacterIterator : public UObject {
virtual UChar32 next32PostInc(void) = 0;
/**
- * Returns FALSE if there are no more code units or code points
+ * Returns false if there are no more code units or code points
* at or after the current position in the iteration range.
* This is used with nextPostInc() or next32PostInc() in forward
* iteration.
- * @returns FALSE if there are no more code units or code points
+ * @returns false if there are no more code units or code points
* at or after the current position in the iteration range.
* @stable ICU 2.0
*/
@@ -535,12 +535,12 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
virtual UChar32 previous32(void) = 0;
/**
- * Returns FALSE if there are no more code units or code points
+ * Returns false if there are no more code units or code points
* before the current position in the iteration range.
* This is used with previous() or previous32() in backward
* iteration.
- * @return FALSE if there are no more code units or code points
- * before the current position in the iteration range, return TRUE otherwise.
+ * @return false if there are no more code units or code points
+ * before the current position in the iteration range, return true otherwise.
* @stable ICU 2.0
*/
virtual UBool hasPrevious() = 0;
diff --git a/deps/icu-small/source/common/unicode/docmain.h b/deps/icu-small/source/common/unicode/docmain.h
index 2b38692997dd9a..f09d7e1dc29cec 100644
--- a/deps/icu-small/source/common/unicode/docmain.h
+++ b/deps/icu-small/source/common/unicode/docmain.h
@@ -53,10 +53,10 @@
*
* Architecture (User's Guide)
*
*
*
@@ -149,7 +149,7 @@
*
*
* Number Range Formatting (includes currency and unit ranges) |
- * (no C API) |
+ * unumberrangeformatter.h |
* icu::number::NumberRangeFormatter |
*
*
diff --git a/deps/icu-small/source/common/unicode/dtintrv.h b/deps/icu-small/source/common/unicode/dtintrv.h
index 325faa3ccb92cb..7932ea660fa4dd 100644
--- a/deps/icu-small/source/common/unicode/dtintrv.h
+++ b/deps/icu-small/source/common/unicode/dtintrv.h
@@ -106,14 +106,14 @@ class U_COMMON_API DateInterval : public UObject {
/**
* Equality operator.
- * @return TRUE if the two DateIntervals are the same
+ * @return true if the two DateIntervals are the same
* @stable ICU 4.0
*/
virtual UBool operator==(const DateInterval& other) const;
/**
* Non-equality operator
- * @return TRUE if the two DateIntervals are not the same
+ * @return true if the two DateIntervals are not the same
* @stable ICU 4.0
*/
inline UBool operator!=(const DateInterval& other) const;
diff --git a/deps/icu-small/source/common/unicode/edits.h b/deps/icu-small/source/common/unicode/edits.h
index c3ceaccb3b3802..bfa07fa6765b73 100644
--- a/deps/icu-small/source/common/unicode/edits.h
+++ b/deps/icu-small/source/common/unicode/edits.h
@@ -159,7 +159,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @param outErrorCode Set to an error code if it does not contain one already
* and an error occurred while recording edits.
* Otherwise unchanged.
- * @return TRUE if U_FAILURE(outErrorCode)
+ * @return true if U_FAILURE(outErrorCode)
* @stable ICU 59
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const;
@@ -171,7 +171,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
*/
int32_t lengthDelta() const { return delta; }
/**
- * @return TRUE if there are any change edits
+ * @return true if there are any change edits
* @stable ICU 59
*/
UBool hasChanges() const { return numChanges != 0; }
@@ -207,8 +207,8 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
*/
Iterator() :
array(nullptr), index(0), length(0),
- remaining(0), onlyChanges_(FALSE), coarse(FALSE),
- dir(0), changed(FALSE), oldLength_(0), newLength_(0),
+ remaining(0), onlyChanges_(false), coarse(false),
+ dir(0), changed(false), oldLength_(0), newLength_(0),
srcIndex(0), replIndex(0), destIndex(0) {}
/**
* Copy constructor.
@@ -226,7 +226,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test,
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
- * @return TRUE if there is another edit
+ * @return true if there is another edit
* @stable ICU 59
*/
UBool next(UErrorCode &errorCode) { return next(onlyChanges_, errorCode); }
@@ -247,11 +247,11 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test,
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
- * @return TRUE if the edit for the source index was found
+ * @return true if the edit for the source index was found
* @stable ICU 59
*/
UBool findSourceIndex(int32_t i, UErrorCode &errorCode) {
- return findIndex(i, TRUE, errorCode) == 0;
+ return findIndex(i, true, errorCode) == 0;
}
/**
@@ -270,11 +270,11 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test,
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
- * @return TRUE if the edit for the destination index was found
+ * @return true if the edit for the destination index was found
* @stable ICU 60
*/
UBool findDestinationIndex(int32_t i, UErrorCode &errorCode) {
- return findIndex(i, FALSE, errorCode) == 0;
+ return findIndex(i, false, errorCode) == 0;
}
/**
@@ -328,8 +328,8 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
/**
* Returns whether the edit currently represented by the iterator is a change edit.
*
- * @return TRUE if this edit replaces oldLength() units with newLength() different ones.
- * FALSE if oldLength units remain unchanged.
+ * @return true if this edit replaces oldLength() units with newLength() different ones.
+ * false if oldLength units remain unchanged.
* @stable ICU 59
*/
UBool hasChange() const { return changed; }
@@ -347,8 +347,8 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* {@link #destinationIndex}, or in the replacement string, which starts at
* {@link #replacementIndex}.
*
- * @return the number of units in the modified string, if hasChange() is TRUE.
- * Same as oldLength if hasChange() is FALSE.
+ * @return the number of units in the modified string, if hasChange() is true.
+ * Same as oldLength if hasChange() is false.
* @stable ICU 59
*/
int32_t newLength() const { return newLength_; }
@@ -436,7 +436,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @stable ICU 59
*/
Iterator getCoarseChangesIterator() const {
- return Iterator(array, length, TRUE, TRUE);
+ return Iterator(array, length, true, true);
}
/**
@@ -448,7 +448,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @stable ICU 59
*/
Iterator getCoarseIterator() const {
- return Iterator(array, length, FALSE, TRUE);
+ return Iterator(array, length, false, true);
}
/**
@@ -460,7 +460,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @stable ICU 59
*/
Iterator getFineChangesIterator() const {
- return Iterator(array, length, TRUE, FALSE);
+ return Iterator(array, length, true, false);
}
/**
@@ -471,7 +471,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @stable ICU 59
*/
Iterator getFineIterator() const {
- return Iterator(array, length, FALSE, FALSE);
+ return Iterator(array, length, false, false);
}
/**
diff --git a/deps/icu-small/source/common/unicode/filteredbrk.h b/deps/icu-small/source/common/unicode/filteredbrk.h
index 42936763259e2d..8b07e39ae12bb6 100644
--- a/deps/icu-small/source/common/unicode/filteredbrk.h
+++ b/deps/icu-small/source/common/unicode/filteredbrk.h
@@ -85,8 +85,8 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
* by the iterator.
* @param string the string to suppress, such as "Mr."
* @param status error code
- * @return returns TRUE if the string was not present and now added,
- * FALSE if the call was a no-op because the string was already being suppressed.
+ * @return returns true if the string was not present and now added,
+ * false if the call was a no-op because the string was already being suppressed.
* @stable ICU 56
*/
virtual UBool suppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
@@ -98,8 +98,8 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
* locale data which may be suppressing certain strings.
* @param string the exception to remove
* @param status error code
- * @return returns TRUE if the string was present and now removed,
- * FALSE if the call was a no-op because the string was not being suppressed.
+ * @return returns true if the string was present and now removed,
+ * false if the call was a no-op because the string was not being suppressed.
* @stable ICU 56
*/
virtual UBool unsuppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
diff --git a/deps/icu-small/source/common/unicode/icudataver.h b/deps/icu-small/source/common/unicode/icudataver.h
index d5c728da880f8f..a82cb3d89d9d99 100644
--- a/deps/icu-small/source/common/unicode/icudataver.h
+++ b/deps/icu-small/source/common/unicode/icudataver.h
@@ -38,6 +38,6 @@
*
* @stable ICU 49
*/
-U_STABLE void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status);
+U_CAPI void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status);
#endif
diff --git a/deps/icu-small/source/common/unicode/icuplug.h b/deps/icu-small/source/common/unicode/icuplug.h
index 827cbe94b61cf8..2bd51ff8dfc050 100644
--- a/deps/icu-small/source/common/unicode/icuplug.h
+++ b/deps/icu-small/source/common/unicode/icuplug.h
@@ -208,7 +208,7 @@ typedef UPlugTokenReturn (U_EXPORT2 UPlugEntrypoint) (
* @param dontUnload set true if this plugin can't be unloaded
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
uplug_setPlugNoUnload(UPlugData *plug, UBool dontUnload);
/**
@@ -217,7 +217,7 @@ uplug_setPlugNoUnload(UPlugData *plug, UBool dontUnload);
* @param level the level of this plugin
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
uplug_setPlugLevel(UPlugData *plug, UPlugLevel level);
/**
@@ -226,7 +226,7 @@ uplug_setPlugLevel(UPlugData *plug, UPlugLevel level);
* @return the level of this plugin
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL UPlugLevel U_EXPORT2
+U_CAPI UPlugLevel U_EXPORT2
uplug_getPlugLevel(UPlugData *plug);
/**
@@ -236,7 +236,7 @@ uplug_getPlugLevel(UPlugData *plug);
* @return the lowest level of plug which can currently load
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL UPlugLevel U_EXPORT2
+U_CAPI UPlugLevel U_EXPORT2
uplug_getCurrentLevel(void);
@@ -245,7 +245,7 @@ uplug_getCurrentLevel(void);
* @return The error code of this plugin's load attempt.
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL UErrorCode U_EXPORT2
+U_CAPI UErrorCode U_EXPORT2
uplug_getPlugLoadStatus(UPlugData *plug);
/**
@@ -254,7 +254,7 @@ uplug_getPlugLoadStatus(UPlugData *plug);
* @param name the name of this plugin. The first UPLUG_NAME_MAX characters willi be copied into a new buffer.
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
uplug_setPlugName(UPlugData *plug, const char *name);
/**
@@ -263,7 +263,7 @@ uplug_setPlugName(UPlugData *plug, const char *name);
* @return the name of this plugin
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
uplug_getPlugName(UPlugData *plug);
/**
@@ -272,7 +272,7 @@ uplug_getPlugName(UPlugData *plug);
* @return the symbol name, or NULL
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
uplug_getSymbolName(UPlugData *plug);
/**
@@ -282,7 +282,7 @@ uplug_getSymbolName(UPlugData *plug);
* @return the library name, or NULL
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
uplug_getLibraryName(UPlugData *plug, UErrorCode *status);
/**
@@ -292,7 +292,7 @@ uplug_getLibraryName(UPlugData *plug, UErrorCode *status);
* @return the library, or NULL
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL void * U_EXPORT2
+U_CAPI void * U_EXPORT2
uplug_getLibrary(UPlugData *plug);
/**
@@ -301,7 +301,7 @@ uplug_getLibrary(UPlugData *plug);
* @return the context, or NULL if not set
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL void * U_EXPORT2
+U_CAPI void * U_EXPORT2
uplug_getContext(UPlugData *plug);
/**
@@ -310,7 +310,7 @@ uplug_getContext(UPlugData *plug);
* @param context new context to set
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
uplug_setContext(UPlugData *plug, void *context);
@@ -321,7 +321,7 @@ uplug_setContext(UPlugData *plug, void *context);
* @return configuration string, or else null.
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
uplug_getConfiguration(UPlugData *plug);
/**
@@ -339,7 +339,7 @@ uplug_getConfiguration(UPlugData *plug);
* @return the next oldest plugin, or NULL if no more.
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL UPlugData* U_EXPORT2
+U_CAPI UPlugData* U_EXPORT2
uplug_nextPlug(UPlugData *prior);
/**
@@ -354,7 +354,7 @@ uplug_nextPlug(UPlugData *prior);
* @return the new UPlugData associated with this plugin, or NULL if error.
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL UPlugData* U_EXPORT2
+U_CAPI UPlugData* U_EXPORT2
uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *config, UErrorCode *status);
@@ -368,7 +368,7 @@ uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *config, UE
* @return the new UPlugData associated with this plugin, or NULL if error.
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL UPlugData* U_EXPORT2
+U_CAPI UPlugData* U_EXPORT2
uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char *config, UErrorCode *status);
/**
@@ -378,7 +378,7 @@ uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char *conf
* @param status error result
* @internal ICU 4.4 Technology Preview
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
uplug_removePlug(UPlugData *plug, UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
diff --git a/deps/icu-small/source/common/unicode/idna.h b/deps/icu-small/source/common/unicode/idna.h
index 6dfcfe48db28f1..1305dc604842eb 100644
--- a/deps/icu-small/source/common/unicode/idna.h
+++ b/deps/icu-small/source/common/unicode/idna.h
@@ -95,7 +95,7 @@ class U_COMMON_API IDNA : public UObject {
/**
* Converts a single domain name label into its ASCII form for DNS lookup.
- * If any processing step fails, then info.hasErrors() will be TRUE and
+ * If any processing step fails, then info.hasErrors() will be true and
* the result might not be an ASCII string.
* The label might be modified according to the types of errors.
* Labels with severe errors will be left in (or turned into) their Unicode form.
@@ -119,7 +119,7 @@ class U_COMMON_API IDNA : public UObject {
/**
* Converts a single domain name label into its Unicode form for human-readable display.
- * If any processing step fails, then info.hasErrors() will be TRUE.
+ * If any processing step fails, then info.hasErrors() will be true.
* The label might be modified according to the types of errors.
*
* The UErrorCode indicates an error only in exceptional cases,
@@ -141,7 +141,7 @@ class U_COMMON_API IDNA : public UObject {
/**
* Converts a whole domain name into its ASCII form for DNS lookup.
- * If any processing step fails, then info.hasErrors() will be TRUE and
+ * If any processing step fails, then info.hasErrors() will be true and
* the result might not be an ASCII string.
* The domain name might be modified according to the types of errors.
* Labels with severe errors will be left in (or turned into) their Unicode form.
@@ -165,7 +165,7 @@ class U_COMMON_API IDNA : public UObject {
/**
* Converts a whole domain name into its Unicode form for human-readable display.
- * If any processing step fails, then info.hasErrors() will be TRUE.
+ * If any processing step fails, then info.hasErrors() will be true.
* The domain name might be modified according to the types of errors.
*
* The UErrorCode indicates an error only in exceptional cases,
@@ -273,10 +273,10 @@ class U_COMMON_API IDNAInfo : public UMemory {
* Constructor for stack allocation.
* @stable ICU 4.6
*/
- IDNAInfo() : errors(0), labelErrors(0), isTransDiff(FALSE), isBiDi(FALSE), isOkBiDi(TRUE) {}
+ IDNAInfo() : errors(0), labelErrors(0), isTransDiff(false), isBiDi(false), isOkBiDi(true) {}
/**
* Were there IDNA processing errors?
- * @return TRUE if there were processing errors
+ * @return true if there were processing errors
* @stable ICU 4.6
*/
UBool hasErrors() const { return errors!=0; }
@@ -288,7 +288,7 @@ class U_COMMON_API IDNAInfo : public UMemory {
*/
uint32_t getErrors() const { return errors; }
/**
- * Returns TRUE if transitional and nontransitional processing produce different results.
+ * Returns true if transitional and nontransitional processing produce different results.
* This is the case when the input label or domain name contains
* one or more deviation characters outside a Punycode label (see UTS #46).
*
@@ -297,7 +297,7 @@ class U_COMMON_API IDNAInfo : public UMemory {
* - With transitional processing, such characters are
* mapped (sharp s/sigma) or removed (joiner/nonjoiner).
*
- * @return TRUE if transitional and nontransitional processing produce different results
+ * @return true if transitional and nontransitional processing produce different results
* @stable ICU 4.6
*/
UBool isTransitionalDifferent() const { return isTransDiff; }
@@ -310,9 +310,9 @@ class U_COMMON_API IDNAInfo : public UMemory {
void reset() {
errors=labelErrors=0;
- isTransDiff=FALSE;
- isBiDi=FALSE;
- isOkBiDi=TRUE;
+ isTransDiff=false;
+ isBiDi=false;
+ isOkBiDi=true;
}
uint32_t errors, labelErrors;
diff --git a/deps/icu-small/source/common/unicode/localebuilder.h b/deps/icu-small/source/common/unicode/localebuilder.h
index c5836fe27021b3..27a894de101def 100644
--- a/deps/icu-small/source/common/unicode/localebuilder.h
+++ b/deps/icu-small/source/common/unicode/localebuilder.h
@@ -1,5 +1,5 @@
// © 2018 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html#License
+// License & terms of use: http://www.unicode.org/copyright.html
#ifndef __LOCALEBUILDER_H__
#define __LOCALEBUILDER_H__
@@ -92,11 +92,12 @@ class U_COMMON_API LocaleBuilder : public UObject {
/**
* Resets the LocaleBuilder to match the provided
* [Unicode Locale Identifier](http://www.unicode.org/reports/tr35/tr35.html#unicode_locale_id) .
- * Discards the existing state. the empty string cause the builder to be
- * reset, like {@link #clear}. Grandfathered tags are converted to their
- * canonical form before being processed. Otherwise, the language
- * tag
must be well-formed, or else the build() method will later
- * report an U_ILLEGAL_ARGUMENT_ERROR.
+ * Discards the existing state.
+ * The empty string causes the builder to be reset, like {@link #clear}.
+ * Legacy language tags (marked as “Type: grandfathered” in BCP 47)
+ * are converted to their canonical form before being processed.
+ * Otherwise, the language tag
must be well-formed,
+ * or else the build() method will later report an U_ILLEGAL_ARGUMENT_ERROR.
*
* This method clears the internal UErrorCode.
*
@@ -278,18 +279,16 @@ class U_COMMON_API LocaleBuilder : public UObject {
*/
Locale build(UErrorCode& status);
-#ifndef U_HIDE_DRAFT_API
/**
* Sets the UErrorCode if an error occurred while recording sets.
* Preserves older error codes in the outErrorCode.
* @param outErrorCode Set to an error code that occurred while setting subtags.
* Unchanged if there is no such error or if outErrorCode
* already contained an error.
- * @return TRUE if U_FAILURE(outErrorCode)
- * @draft ICU 65
+ * @return true if U_FAILURE(outErrorCode)
+ * @stable ICU 65
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const;
-#endif /* U_HIDE_DRAFT_API */
private:
friend class LocaleMatcher::Result;
diff --git a/deps/icu-small/source/common/unicode/localematcher.h b/deps/icu-small/source/common/unicode/localematcher.h
index 2e1a7a349f3983..63a68b0b7fb3d3 100644
--- a/deps/icu-small/source/common/unicode/localematcher.h
+++ b/deps/icu-small/source/common/unicode/localematcher.h
@@ -1,5 +1,5 @@
// © 2019 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html#License
+// License & terms of use: http://www.unicode.org/copyright.html
// localematcher.h
// created: 2019may08 Markus W. Scherer
@@ -20,26 +20,24 @@
* \brief C++ API: Locale matcher: User's desired locales vs. application's supported locales.
*/
-#ifndef U_FORCE_HIDE_DRAFT_API
-
/**
* Builder option for whether the language subtag or the script subtag is most important.
*
- * @see Builder#setFavorSubtag(ULocMatchFavorSubtag)
- * @draft ICU 65
+ * @see LocaleMatcher::Builder#setFavorSubtag(ULocMatchFavorSubtag)
+ * @stable ICU 65
*/
enum ULocMatchFavorSubtag {
/**
* Language differences are most important, then script differences, then region differences.
* (This is the default behavior.)
*
- * @draft ICU 65
+ * @stable ICU 65
*/
ULOCMATCH_FAVOR_LANGUAGE,
/**
* Makes script differences matter relatively more than language differences.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
ULOCMATCH_FAVOR_SCRIPT
};
@@ -51,14 +49,14 @@ typedef enum ULocMatchFavorSubtag ULocMatchFavorSubtag;
* Builder option for whether all desired locales are treated equally or
* earlier ones are preferred.
*
- * @see Builder#setDemotionPerDesiredLocale(ULocMatchDemotion)
- * @draft ICU 65
+ * @see LocaleMatcher::Builder#setDemotionPerDesiredLocale(ULocMatchDemotion)
+ * @stable ICU 65
*/
enum ULocMatchDemotion {
/**
* All desired locales are treated equally.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
ULOCMATCH_DEMOTION_NONE,
/**
@@ -85,7 +83,7 @@ enum ULocMatchDemotion {
* this is possible in future versions of the data.)
*
*
- * @draft ICU 65
+ * @stable ICU 65
*/
ULOCMATCH_DEMOTION_REGION
};
@@ -93,6 +91,8 @@ enum ULocMatchDemotion {
typedef enum ULocMatchDemotion ULocMatchDemotion;
#endif
+#ifndef U_FORCE_HIDE_DRAFT_API
+
/**
* Builder option for whether to include or ignore one-way (fallback) match data.
* The LocaleMatcher uses CLDR languageMatch data which includes fallback (oneway=true) entries.
@@ -107,7 +107,7 @@ typedef enum ULocMatchDemotion ULocMatchDemotion;
* if there is a decent match for the original UI language, we want to use it,
* but not if it is merely a fallback.
*
- * @see Builder#setDirection(ULocMatchDirection)
+ * @see LocaleMatcher::Builder#setDirection(ULocMatchDirection)
* @draft ICU 67
*/
enum ULocMatchDirection {
@@ -129,6 +129,8 @@ enum ULocMatchDirection {
typedef enum ULocMatchDirection ULocMatchDirection;
#endif
+#endif // U_FORCE_HIDE_DRAFT_API
+
struct UHashtable;
U_NAMESPACE_BEGIN
@@ -181,7 +183,7 @@ class XLikelySubtags;
*
*
This class is not intended for public subclassing.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
class U_COMMON_API LocaleMatcher : public UMemory {
public:
@@ -189,7 +191,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* Data for the best-matching pair of a desired and a supported locale.
* Movable but not copyable.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
class U_COMMON_API Result : public UMemory {
public:
@@ -198,14 +200,14 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* This object will have the same contents that the source object had.
*
* @param src Result to move contents from.
- * @draft ICU 65
+ * @stable ICU 65
*/
Result(Result &&src) U_NOEXCEPT;
/**
* Destructor.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
~Result();
@@ -214,28 +216,27 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* This object will have the same contents that the source object had.
*
* @param src Result to move contents from.
- * @draft ICU 65
+ * @stable ICU 65
*/
Result &operator=(Result &&src) U_NOEXCEPT;
-#ifndef U_HIDE_DRAFT_API
/**
* Returns the best-matching desired locale.
* nullptr if the list of desired locales is empty or if none matched well enough.
*
* @return the best-matching desired locale, or nullptr.
- * @draft ICU 65
+ * @stable ICU 65
*/
inline const Locale *getDesiredLocale() const { return desiredLocale; }
/**
* Returns the best-matching supported locale.
* If none matched well enough, this is the default locale.
- * The default locale is nullptr if the list of supported locales is empty and
- * no explicit default locale is set.
+ * The default locale is nullptr if Builder::setNoDefaultLocale() was called,
+ * or if the list of supported locales is empty and no explicit default locale is set.
*
* @return the best-matching supported locale, or nullptr.
- * @draft ICU 65
+ * @stable ICU 65
*/
inline const Locale *getSupportedLocale() const { return supportedLocale; }
@@ -244,7 +245,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* -1 if the list of desired locales is empty or if none matched well enough.
*
* @return the index of the best-matching desired locale, or -1.
- * @draft ICU 65
+ * @stable ICU 65
*/
inline int32_t getDesiredIndex() const { return desiredIndex; }
@@ -256,7 +257,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* -1 if the list of supported locales is empty or if none matched well enough.
*
* @return the index of the best-matching supported locale, or -1.
- * @draft ICU 65
+ * @stable ICU 65
*/
inline int32_t getSupportedIndex() const { return supportedIndex; }
@@ -270,10 +271,9 @@ class U_COMMON_API LocaleMatcher : public UMemory {
*
Example: desired=ar-SA-u-nu-latn, supported=ar-EG, resolved locale=ar-SA-u-nu-latn
*
* @return a locale combining the best-matching desired and supported locales.
- * @draft ICU 65
+ * @stable ICU 65
*/
Locale makeResolvedLocale(UErrorCode &errorCode) const;
-#endif // U_HIDE_DRAFT_API
private:
Result(const Locale *desired, const Locale *supported,
@@ -298,8 +298,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* LocaleMatcher builder.
* Movable but not copyable.
*
- * @see LocaleMatcher#builder()
- * @draft ICU 65
+ * @stable ICU 65
*/
class U_COMMON_API Builder : public UMemory {
public:
@@ -307,7 +306,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* Constructs a builder used in chaining parameters for building a LocaleMatcher.
*
* @return a new Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder() {}
@@ -316,14 +315,14 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* This builder will have the same contents that the source builder had.
*
* @param src Builder to move contents from.
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder(Builder &&src) U_NOEXCEPT;
/**
* Destructor.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
~Builder();
@@ -332,11 +331,10 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* This builder will have the same contents that the source builder had.
*
* @param src Builder to move contents from.
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &operator=(Builder &&src) U_NOEXCEPT;
-#ifndef U_HIDE_DRAFT_API
/**
* Parses an Accept-Language string
* (RFC 2616 Section 14.4),
@@ -346,7 +344,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
*
* @param locales the Accept-Language string of locales to set
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &setSupportedLocalesFromListString(StringPiece locales);
@@ -357,7 +355,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
*
* @param locales the list of locale
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &setSupportedLocales(Locale::Iterator &locales);
@@ -372,7 +370,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* @param begin Start of range.
* @param end Exclusive end of range.
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
template
Builder &setSupportedLocales(Iter begin, Iter end) {
@@ -397,7 +395,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* @param end Exclusive end of range.
* @param converter Converter from *begin to const Locale & or compatible.
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
template
Builder &setSupportedLocalesViaConverter(Iter begin, Iter end, Conv converter) {
@@ -415,17 +413,31 @@ class U_COMMON_API LocaleMatcher : public UMemory {
*
* @param locale another locale
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &addSupportedLocale(const Locale &locale);
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Sets no default locale.
+ * There will be no explicit or implicit default locale.
+ * If there is no good match, then the matcher will return nullptr for the
+ * best supported locale.
+ *
+ * @draft ICU 68
+ */
+ Builder &setNoDefaultLocale();
+#endif // U_HIDE_DRAFT_API
+
/**
* Sets the default locale; if nullptr, or if it is not set explicitly,
* then the first supported locale is used as the default locale.
+ * There is no default locale at all (nullptr will be returned instead)
+ * if setNoDefaultLocale() is called.
*
* @param defaultLocale the default locale (will be copied)
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &setDefaultLocale(const Locale *defaultLocale);
@@ -437,7 +449,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
*
* @param subtag the subtag to favor
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &setFavorSubtag(ULocMatchFavorSubtag subtag);
@@ -447,10 +459,11 @@ class U_COMMON_API LocaleMatcher : public UMemory {
*
* @param demotion the demotion per desired locale to set.
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &setDemotionPerDesiredLocale(ULocMatchDemotion demotion);
+#ifndef U_HIDE_DRAFT_API
/**
* Option for whether to include or ignore one-way (fallback) match data.
* By default, they are included.
@@ -465,6 +478,32 @@ class U_COMMON_API LocaleMatcher : public UMemory {
}
return *this;
}
+#endif // U_HIDE_DRAFT_API
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Sets the maximum distance for an acceptable match.
+ * The matcher will return a match for a pair of locales only if
+ * they match at least as well as the pair given here.
+ *
+ * For example, setMaxDistance(en-US, en-GB) limits matches to ones where the
+ * (desired, support) locales have a distance no greater than a region subtag difference.
+ * This is much stricter than the CLDR default.
+ *
+ * The details of locale matching are subject to changes in
+ * CLDR data and in the algorithm.
+ * Specifying a maximum distance in relative terms via a sample pair of locales
+ * insulates from changes that affect all distance metrics similarly,
+ * but some changes will necessarily affect relative distances between
+ * different pairs of locales.
+ *
+ * @param desired the desired locale for distance comparison.
+ * @param supported the supported locale for distance comparison.
+ * @return this Builder object
+ * @draft ICU 68
+ */
+ Builder &setMaxDistance(const Locale &desired, const Locale &supported);
+#endif // U_HIDE_DRAFT_API
/**
* Sets the UErrorCode if an error occurred while setting parameters.
@@ -473,8 +512,8 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* @param outErrorCode Set to an error code if it does not contain one already
* and an error occurred while setting parameters.
* Otherwise unchanged.
- * @return TRUE if U_FAILURE(outErrorCode)
- * @draft ICU 65
+ * @return true if U_FAILURE(outErrorCode)
+ * @stable ICU 65
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const;
@@ -485,11 +524,10 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test,
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
- * @return new LocaleMatcher.
- * @draft ICU 65
+ * @return LocaleMatcher
+ * @stable ICU 65
*/
LocaleMatcher build(UErrorCode &errorCode) const;
-#endif // U_HIDE_DRAFT_API
private:
friend class LocaleMatcher;
@@ -505,8 +543,11 @@ class U_COMMON_API LocaleMatcher : public UMemory {
int32_t thresholdDistance_ = -1;
ULocMatchDemotion demotion_ = ULOCMATCH_DEMOTION_REGION;
Locale *defaultLocale_ = nullptr;
+ bool withDefault_ = true;
ULocMatchFavorSubtag favor_ = ULOCMATCH_FAVOR_LANGUAGE;
ULocMatchDirection direction_ = ULOCMATCH_DIRECTION_WITH_ONE_WAY;
+ Locale *maxDistanceDesired_ = nullptr;
+ Locale *maxDistanceSupported_ = nullptr;
};
// FYI No public LocaleMatcher constructors in C++; use the Builder.
@@ -515,13 +556,13 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* Move copy constructor; might modify the source.
* This matcher will have the same settings that the source matcher had.
* @param src source matcher
- * @draft ICU 65
+ * @stable ICU 65
*/
LocaleMatcher(LocaleMatcher &&src) U_NOEXCEPT;
/**
* Destructor.
- * @draft ICU 65
+ * @stable ICU 65
*/
~LocaleMatcher();
@@ -531,11 +572,10 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* The behavior is undefined if *this and src are the same object.
* @param src source matcher
* @return *this
- * @draft ICU 65
+ * @stable ICU 65
*/
LocaleMatcher &operator=(LocaleMatcher &&src) U_NOEXCEPT;
-#ifndef U_HIDE_DRAFT_API
/**
* Returns the supported locale which best matches the desired locale.
*
@@ -544,7 +584,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
* @return the best-matching supported locale.
- * @draft ICU 65
+ * @stable ICU 65
*/
const Locale *getBestMatch(const Locale &desiredLocale, UErrorCode &errorCode) const;
@@ -556,7 +596,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
* @return the best-matching supported locale.
- * @draft ICU 65
+ * @stable ICU 65
*/
const Locale *getBestMatch(Locale::Iterator &desiredLocales, UErrorCode &errorCode) const;
@@ -572,7 +612,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
* @return the best-matching supported locale.
- * @draft ICU 65
+ * @stable ICU 65
*/
const Locale *getBestMatchForListString(StringPiece desiredLocaleList, UErrorCode &errorCode) const;
@@ -586,7 +626,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
* @return the best-matching pair of the desired and a supported locale.
- * @draft ICU 65
+ * @stable ICU 65
*/
Result getBestMatchResult(const Locale &desiredLocale, UErrorCode &errorCode) const;
@@ -600,9 +640,25 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
* @return the best-matching pair of a desired and a supported locale.
- * @draft ICU 65
+ * @stable ICU 65
*/
Result getBestMatchResult(Locale::Iterator &desiredLocales, UErrorCode &errorCode) const;
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns true if the pair of locales matches acceptably.
+ * This is influenced by Builder options such as setDirection(), setFavorSubtag(),
+ * and setMaxDistance().
+ *
+ * @param desired The desired locale.
+ * @param supported The supported locale.
+ * @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test,
+ * or else the function returns immediately. Check for U_FAILURE()
+ * on output or use with function chaining. (See User Guide for details.)
+ * @return true if the pair of locales matches acceptably.
+ * @draft ICU 68
+ */
+ UBool isMatch(const Locale &desired, const Locale &supported, UErrorCode &errorCode) const;
#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_INTERNAL_API
@@ -660,6 +716,5 @@ class U_COMMON_API LocaleMatcher : public UMemory {
U_NAMESPACE_END
-#endif // U_FORCE_HIDE_DRAFT_API
#endif // U_SHOW_CPLUSPLUS_API
#endif // __LOCALEMATCHER_H__
diff --git a/deps/icu-small/source/common/unicode/localpointer.h b/deps/icu-small/source/common/unicode/localpointer.h
index 61c3020918e578..2a65f2d382d2d8 100644
--- a/deps/icu-small/source/common/unicode/localpointer.h
+++ b/deps/icu-small/source/common/unicode/localpointer.h
@@ -88,13 +88,13 @@ class LocalPointerBase {
~LocalPointerBase() { /* delete ptr; */ }
/**
* NULL check.
- * @return TRUE if ==NULL
+ * @return true if ==NULL
* @stable ICU 4.4
*/
UBool isNull() const { return ptr==NULL; }
/**
* NULL check.
- * @return TRUE if !=NULL
+ * @return true if !=NULL
* @stable ICU 4.4
*/
UBool isValid() const { return ptr!=NULL; }
diff --git a/deps/icu-small/source/common/unicode/locid.h b/deps/icu-small/source/common/unicode/locid.h
index ee8697b0a57f3e..877c8014b0b3a7 100644
--- a/deps/icu-small/source/common/unicode/locid.h
+++ b/deps/icu-small/source/common/unicode/locid.h
@@ -253,7 +253,7 @@ class U_COMMON_API Locale : public UObject {
/**
* Construct a locale from language, country, variant.
* If an error occurs, then the constructed object will be "bogus"
- * (isBogus() will return TRUE).
+ * (isBogus() will return true).
*
* @param language Lowercase two-letter or three-letter ISO-639 code.
* This parameter can instead be an ICU style C locale (e.g. "en_US"),
@@ -393,13 +393,17 @@ class U_COMMON_API Locale : public UObject {
* If the specified language tag contains any ill-formed subtags,
* the first such subtag and all following subtags are ignored.
*
- * This implements the 'Language-Tag' production of BCP47, and so
- * supports grandfathered (regular and irregular) as well as private
- * use language tags. Private use tags are represented as 'x-whatever',
- * and grandfathered tags are converted to their canonical replacements
- * where they exist. Note that a few grandfathered tags have no modern
- * replacement, these will be converted using the fallback described in
+ * This implements the 'Language-Tag' production of BCP 47, and so
+ * supports legacy language tags (marked as “Type: grandfathered” in BCP 47)
+ * (regular and irregular) as well as private use language tags.
+ *
+ * Private use tags are represented as 'x-whatever',
+ * and legacy tags are converted to their canonical replacements where they exist.
+ *
+ * Note that a few legacy tags have no modern replacement;
+ * these will be converted using the fallback described in
* the first paragraph, so some information might be lost.
+ *
* @param tag the input BCP47 language tag.
* @param status error information if creating the Locale failed.
* @return the Locale for the specified BCP47 language tag.
@@ -795,14 +799,14 @@ class U_COMMON_API Locale : public UObject {
/**
* Returns whether this locale's script is written right-to-left.
* If there is no script subtag, then the likely script is used, see uloc_addLikelySubtags().
- * If no likely script is known, then FALSE is returned.
+ * If no likely script is known, then false is returned.
*
* A script is right-to-left according to the CLDR script metadata
* which corresponds to whether the script's letters have Bidi_Class=R or AL.
*
- * Returns TRUE for "ar" and "en-Hebr", FALSE for "zh" and "fa-Cyrl".
+ * Returns true for "ar" and "en-Hebr", false for "zh" and "fa-Cyrl".
*
- * @return TRUE if the locale's script is written right-to-left
+ * @return true if the locale's script is written right-to-left
* @stable ICU 54
*/
UBool isRightToLeft() const;
@@ -956,7 +960,7 @@ class U_COMMON_API Locale : public UObject {
/**
* Gets the bogus state. Locale object can be bogus if it doesn't exist
- * @return FALSE if it is a real locale, TRUE if it is a bogus locale
+ * @return false if it is a real locale, true if it is a bogus locale
* @stable ICU 2.1
*/
inline UBool isBogus(void) const;
@@ -1005,32 +1009,31 @@ class U_COMMON_API Locale : public UObject {
*/
virtual UClassID getDynamicClassID() const;
-#ifndef U_HIDE_DRAFT_API
/**
* A Locale iterator interface similar to a Java Iterator.
- * @draft ICU 65
+ * @stable ICU 65
*/
class U_COMMON_API Iterator /* not : public UObject because this is an interface/mixin class */ {
public:
- /** @draft ICU 65 */
+ /** @stable ICU 65 */
virtual ~Iterator();
/**
- * @return TRUE if next() can be called again.
- * @draft ICU 65
+ * @return true if next() can be called again.
+ * @stable ICU 65
*/
virtual UBool hasNext() const = 0;
/**
* @return the next locale.
- * @draft ICU 65
+ * @stable ICU 65
*/
virtual const Locale &next() = 0;
};
/**
* A generic Locale iterator implementation over Locale input iterators.
- * @draft ICU 65
+ * @stable ICU 65
*/
template
class RangeIterator : public Iterator, public UMemory {
@@ -1042,19 +1045,19 @@ class U_COMMON_API Locale : public UObject {
*
* @param begin Start of range.
* @param end Exclusive end of range.
- * @draft ICU 65
+ * @stable ICU 65
*/
RangeIterator(Iter begin, Iter end) : it_(begin), end_(end) {}
/**
- * @return TRUE if next() can be called again.
- * @draft ICU 65
+ * @return true if next() can be called again.
+ * @stable ICU 65
*/
UBool hasNext() const override { return it_ != end_; }
/**
* @return the next locale.
- * @draft ICU 65
+ * @stable ICU 65
*/
const Locale &next() override { return *it_++; }
@@ -1066,7 +1069,7 @@ class U_COMMON_API Locale : public UObject {
/**
* A generic Locale iterator implementation over Locale input iterators.
* Calls the converter to convert each *begin to a const Locale &.
- * @draft ICU 65
+ * @stable ICU 65
*/
template
class ConvertingIterator : public Iterator, public UMemory {
@@ -1079,20 +1082,20 @@ class U_COMMON_API Locale : public UObject {
* @param begin Start of range.
* @param end Exclusive end of range.
* @param converter Converter from *begin to const Locale & or compatible.
- * @draft ICU 65
+ * @stable ICU 65
*/
ConvertingIterator(Iter begin, Iter end, Conv converter) :
it_(begin), end_(end), converter_(converter) {}
/**
- * @return TRUE if next() can be called again.
- * @draft ICU 65
+ * @return true if next() can be called again.
+ * @stable ICU 65
*/
UBool hasNext() const override { return it_ != end_; }
/**
* @return the next locale.
- * @draft ICU 65
+ * @stable ICU 65
*/
const Locale &next() override { return converter_(*it_++); }
@@ -1101,7 +1104,6 @@ class U_COMMON_API Locale : public UObject {
const Iter end_;
Conv converter_;
};
-#endif // U_HIDE_DRAFT_API
protected: /* only protected for testing purposes. DO NOT USE. */
#ifndef U_HIDE_INTERNAL_API
diff --git a/deps/icu-small/source/common/unicode/messagepattern.h b/deps/icu-small/source/common/unicode/messagepattern.h
index 04f00a8757d783..98e7b70b1fcc13 100644
--- a/deps/icu-small/source/common/unicode/messagepattern.h
+++ b/deps/icu-small/source/common/unicode/messagepattern.h
@@ -265,7 +265,7 @@ typedef enum UMessagePatternArgType UMessagePatternArgType;
/**
* \def UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE
- * Returns TRUE if the argument type has a plural style part sequence and semantics,
+ * Returns true if the argument type has a plural style part sequence and semantics,
* for example UMSGPAT_ARG_TYPE_PLURAL and UMSGPAT_ARG_TYPE_SELECTORDINAL.
* @stable ICU 50
*/
@@ -523,14 +523,14 @@ class U_COMMON_API MessagePattern : public UObject {
/**
* @param other another object to compare with.
- * @return TRUE if this object is equivalent to the other one.
+ * @return true if this object is equivalent to the other one.
* @stable ICU 4.8
*/
UBool operator==(const MessagePattern &other) const;
/**
* @param other another object to compare with.
- * @return FALSE if this object is equivalent to the other one.
+ * @return false if this object is equivalent to the other one.
* @stable ICU 4.8
*/
inline UBool operator!=(const MessagePattern &other) const {
@@ -564,7 +564,7 @@ class U_COMMON_API MessagePattern : public UObject {
/**
* Does the parsed pattern have named arguments like {first_name}?
- * @return TRUE if the parsed pattern has at least one named argument.
+ * @return true if the parsed pattern has at least one named argument.
* @stable ICU 4.8
*/
UBool hasNamedArguments() const {
@@ -573,7 +573,7 @@ class U_COMMON_API MessagePattern : public UObject {
/**
* Does the parsed pattern have numbered arguments like {2}?
- * @return TRUE if the parsed pattern has at least one numbered argument.
+ * @return true if the parsed pattern has at least one numbered argument.
* @stable ICU 4.8
*/
UBool hasNumberedArguments() const {
@@ -664,7 +664,7 @@ class U_COMMON_API MessagePattern : public UObject {
* Compares the part's substring with the input string s.
* @param part a part of this MessagePattern.
* @param s a string.
- * @return TRUE if getSubstring(part).equals(s).
+ * @return true if getSubstring(part).equals(s).
* @stable ICU 4.8
*/
UBool partSubstringMatches(const Part &part, const UnicodeString &s) const {
@@ -785,7 +785,7 @@ class U_COMMON_API MessagePattern : public UObject {
* Indicates whether the Part type has a numeric value.
* If so, then that numeric value can be retrieved via MessagePattern.getNumericValue().
* @param type The Part type to be tested.
- * @return TRUE if the Part type has a numeric value.
+ * @return true if the Part type has a numeric value.
* @stable ICU 4.8
*/
static UBool hasNumericValue(UMessagePatternPartType type) {
@@ -794,14 +794,14 @@ class U_COMMON_API MessagePattern : public UObject {
/**
* @param other another object to compare with.
- * @return TRUE if this object is equivalent to the other one.
+ * @return true if this object is equivalent to the other one.
* @stable ICU 4.8
*/
UBool operator==(const Part &other) const;
/**
* @param other another object to compare with.
- * @return FALSE if this object is equivalent to the other one.
+ * @return false if this object is equivalent to the other one.
* @stable ICU 4.8
*/
inline UBool operator!=(const Part &other) const {
@@ -869,7 +869,7 @@ class U_COMMON_API MessagePattern : public UObject {
* Parses a number from the specified message substring.
* @param start start index into the message string
* @param limit limit index into the message string, must be startFALSE, only canonical
+ * If this argument is false
, only canonical
* decomposition will be performed.
* @param options the optional features to be enabled (0 for no options)
* @param result The composed string (on output).
@@ -256,7 +256,7 @@ class U_COMMON_API Normalizer : public UObject {
*
* @param source the string to be decomposed.
* @param compat Perform compatibility decomposition.
- * If this argument is FALSE
, only canonical
+ * If this argument is false
, only canonical
* decomposition will be performed.
* @param options the optional features to be enabled (0 for no options)
* @param result The decomposed string (on output).
@@ -315,7 +315,7 @@ class U_COMMON_API Normalizer : public UObject {
* never a "maybe".
* For NFD, NFKD, and FCD, both functions work exactly the same.
* For NFC and NFKC where quickCheck may return "maybe", this function will
- * perform further tests to arrive at a TRUE/FALSE result.
+ * perform further tests to arrive at a true/false result.
*
* @param src String that is to be tested if it is in a normalization format.
* @param mode Which normalization form to test for.
@@ -577,7 +577,7 @@ class U_COMMON_API Normalizer : public UObject {
int32_t endIndex(void) const;
/**
- * Returns TRUE when both iterators refer to the same character in the same
+ * Returns true when both iterators refer to the same character in the same
* input text.
*
* @param that a Normalizer object to compare this one to
@@ -587,7 +587,7 @@ class U_COMMON_API Normalizer : public UObject {
UBool operator==(const Normalizer& that) const;
/**
- * Returns FALSE when both iterators refer to the same character in the same
+ * Returns false when both iterators refer to the same character in the same
* input text.
*
* @param that a Normalizer object to compare this one to
@@ -655,8 +655,8 @@ class U_COMMON_API Normalizer : public UObject {
* It is possible to specify multiple options that are all turned on or off.
*
* @param option the option(s) whose value is/are to be set.
- * @param value the new setting for the option. Use TRUE
to
- * turn the option(s) on and FALSE
to turn it/them off.
+ * @param value the new setting for the option. Use true
to
+ * turn the option(s) on and false
to turn it/them off.
*
* @see #getOption
* @deprecated ICU 56 Use Normalizer2 instead.
@@ -666,11 +666,11 @@ class U_COMMON_API Normalizer : public UObject {
/**
* Determine whether an option is turned on or off.
- * If multiple options are specified, then the result is TRUE if any
+ * If multiple options are specified, then the result is true if any
* of them are set.
*
* @param option the option(s) that are to be checked
- * @return TRUE if any of the option(s) are set
+ * @return true if any of the option(s) are set
* @see #setOption
* @deprecated ICU 56 Use Normalizer2 instead.
*/
diff --git a/deps/icu-small/source/common/unicode/parsepos.h b/deps/icu-small/source/common/unicode/parsepos.h
index ae5754b8d75132..d6129fd4f1604f 100644
--- a/deps/icu-small/source/common/unicode/parsepos.h
+++ b/deps/icu-small/source/common/unicode/parsepos.h
@@ -97,14 +97,14 @@ class U_COMMON_API ParsePosition : public UObject {
/**
* Equality operator.
- * @return TRUE if the two parse positions are equal, FALSE otherwise.
+ * @return true if the two parse positions are equal, false otherwise.
* @stable ICU 2.0
*/
inline UBool operator==(const ParsePosition& that) const;
/**
* Equality operator.
- * @return TRUE if the two parse positions are not equal, FALSE otherwise.
+ * @return true if the two parse positions are not equal, false otherwise.
* @stable ICU 2.0
*/
inline UBool operator!=(const ParsePosition& that) const;
@@ -196,9 +196,9 @@ inline UBool
ParsePosition::operator==(const ParsePosition& copy) const
{
if(index != copy.index || errorIndex != copy.errorIndex)
- return FALSE;
+ return false;
else
- return TRUE;
+ return true;
}
inline UBool
diff --git a/deps/icu-small/source/common/unicode/putil.h b/deps/icu-small/source/common/unicode/putil.h
index 14bb99ccc545b2..f8c510dacc75fc 100644
--- a/deps/icu-small/source/common/unicode/putil.h
+++ b/deps/icu-small/source/common/unicode/putil.h
@@ -66,7 +66,7 @@
*
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2 u_getDataDirectory(void);
+U_CAPI const char* U_EXPORT2 u_getDataDirectory(void);
/**
@@ -88,7 +88,7 @@ U_STABLE const char* U_EXPORT2 u_getDataDirectory(void);
* @see u_init
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 u_setDataDirectory(const char *directory);
+U_CAPI void U_EXPORT2 u_setDataDirectory(const char *directory);
#ifndef U_HIDE_INTERNAL_API
/**
@@ -99,7 +99,7 @@ U_STABLE void U_EXPORT2 u_setDataDirectory(const char *directory);
* @return the time zone data override directory.
* @internal
*/
-U_INTERNAL const char * U_EXPORT2 u_getTimeZoneFilesDirectory(UErrorCode *status);
+U_CAPI const char * U_EXPORT2 u_getTimeZoneFilesDirectory(UErrorCode *status);
/**
* Set the time zone files override directory.
@@ -109,7 +109,7 @@ U_INTERNAL const char * U_EXPORT2 u_getTimeZoneFilesDirectory(UErrorCode *status
* will access the time zone data.
* @internal
*/
-U_INTERNAL void U_EXPORT2 u_setTimeZoneFilesDirectory(const char *path, UErrorCode *status);
+U_CAPI void U_EXPORT2 u_setTimeZoneFilesDirectory(const char *path, UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
@@ -155,7 +155,7 @@ U_INTERNAL void U_EXPORT2 u_setTimeZoneFilesDirectory(const char *path, UErrorCo
* @see U_CHARSET_FAMILY
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_charsToUChars(const char *cs, UChar *us, int32_t length);
/**
@@ -177,7 +177,7 @@ u_charsToUChars(const char *cs, UChar *us, int32_t length);
* @see U_CHARSET_FAMILY
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_UCharsToChars(const UChar *us, char *cs, int32_t length);
#endif
diff --git a/deps/icu-small/source/common/unicode/rbbi.h b/deps/icu-small/source/common/unicode/rbbi.h
index 7825f603a51c1b..65117f616cdf5b 100644
--- a/deps/icu-small/source/common/unicode/rbbi.h
+++ b/deps/icu-small/source/common/unicode/rbbi.h
@@ -32,6 +32,8 @@
#include "unicode/parseerr.h"
#include "unicode/schriter.h"
+struct UCPTrie;
+
U_NAMESPACE_BEGIN
/** @internal */
@@ -140,6 +142,11 @@ class U_COMMON_API RuleBasedBreakIterator /*U_FINAL*/ : public BreakIterator {
*/
UBool fDone;
+ /**
+ * Array of look-ahead tentative results.
+ */
+ int32_t *fLookAheadMatches;
+
//=======================================================================
// constructors
//=======================================================================
@@ -246,20 +253,20 @@ class U_COMMON_API RuleBasedBreakIterator /*U_FINAL*/ : public BreakIterator {
RuleBasedBreakIterator& operator=(const RuleBasedBreakIterator& that);
/**
- * Equality operator. Returns TRUE if both BreakIterators are of the
+ * Equality operator. Returns true if both BreakIterators are of the
* same class, have the same behavior, and iterate over the same text.
* @param that The BreakIterator to be compared for equality
- * @return TRUE if both BreakIterators are of the
+ * @return true if both BreakIterators are of the
* same class, have the same behavior, and iterate over the same text.
* @stable ICU 2.0
*/
virtual UBool operator==(const BreakIterator& that) const;
/**
- * Not-equal operator. If operator== returns TRUE, this returns FALSE,
+ * Not-equal operator. If operator== returns true, this returns false,
* and vice versa.
* @param that The BreakIterator to be compared for inequality
- * @return TRUE if both BreakIterators are not same.
+ * @return true if both BreakIterators are not same.
* @stable ICU 2.0
*/
inline UBool operator!=(const BreakIterator& that) const;
@@ -659,6 +666,28 @@ class U_COMMON_API RuleBasedBreakIterator /*U_FINAL*/ : public BreakIterator {
*/
int32_t handleNext();
+ /*
+ * Templatized version of handleNext() and handleSafePrevious().
+ *
+ * There will be exactly four instantiations, two each for 8 and 16 bit tables,
+ * two each for 8 and 16 bit trie.
+ * Having separate instantiations for the table types keeps conditional tests of
+ * the table type out of the inner loops, at the expense of replicated code.
+ *
+ * The template parameter for the Trie access function is a value, not a type.
+ * Doing it this way, the compiler will inline the Trie function in the
+ * expanded functions. (Both the 8 and 16 bit access functions have the same type
+ * signature)
+ */
+
+ typedef uint16_t (*PTrieFunc)(const UCPTrie *, UChar32);
+
+ template
+ int32_t handleSafePrevious(int32_t fromPosition);
+
+ template
+ int32_t handleNext();
+
/**
* This function returns the appropriate LanguageBreakEngine for a
@@ -681,7 +710,6 @@ class U_COMMON_API RuleBasedBreakIterator /*U_FINAL*/ : public BreakIterator {
* @internal
*/
void dumpTables();
-
#endif /* U_HIDE_INTERNAL_API */
};
diff --git a/deps/icu-small/source/common/unicode/resbund.h b/deps/icu-small/source/common/unicode/resbund.h
index 708a3423d2ae2b..63ffa506e77eec 100644
--- a/deps/icu-small/source/common/unicode/resbund.h
+++ b/deps/icu-small/source/common/unicode/resbund.h
@@ -286,7 +286,7 @@ class U_COMMON_API ResourceBundle : public UObject {
/**
* Checks whether the resource has another element to iterate over.
*
- * @return TRUE if there are more elements, FALSE if there is no more elements
+ * @return true if there are more elements, false if there is no more elements
* @stable ICU 2.0
*/
UBool
diff --git a/deps/icu-small/source/common/unicode/simpleformatter.h b/deps/icu-small/source/common/unicode/simpleformatter.h
index 9414bca3085ad4..6d9c04ace2359a 100644
--- a/deps/icu-small/source/common/unicode/simpleformatter.h
+++ b/deps/icu-small/source/common/unicode/simpleformatter.h
@@ -125,7 +125,7 @@ class U_COMMON_API SimpleFormatter U_FINAL : public UMemory {
* @param errorCode ICU error code in/out parameter.
* Must fulfill U_SUCCESS before the function call.
* Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax.
- * @return TRUE if U_SUCCESS(errorCode).
+ * @return true if U_SUCCESS(errorCode).
* @stable ICU 57
*/
UBool applyPattern(const UnicodeString &pattern, UErrorCode &errorCode) {
@@ -144,7 +144,7 @@ class U_COMMON_API SimpleFormatter U_FINAL : public UMemory {
* Must fulfill U_SUCCESS before the function call.
* Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax and
* too few or too many arguments.
- * @return TRUE if U_SUCCESS(errorCode).
+ * @return true if U_SUCCESS(errorCode).
* @stable ICU 57
*/
UBool applyPatternMinMaxArguments(const UnicodeString &pattern,
diff --git a/deps/icu-small/source/common/unicode/strenum.h b/deps/icu-small/source/common/unicode/strenum.h
index e813cd84b3413a..5d1600156e32e9 100644
--- a/deps/icu-small/source/common/unicode/strenum.h
+++ b/deps/icu-small/source/common/unicode/strenum.h
@@ -196,7 +196,7 @@ class U_COMMON_API StringEnumeration : public UObject {
* Compares this enumeration to other to check if both are equal
*
* @param that The other string enumeration to compare this object to
- * @return TRUE if the enumerations are equal. FALSE if not.
+ * @return true if the enumerations are equal. false if not.
* @stable ICU 3.6
*/
virtual UBool operator==(const StringEnumeration& that)const;
@@ -204,7 +204,7 @@ class U_COMMON_API StringEnumeration : public UObject {
* Compares this enumeration to other to check if both are not equal
*
* @param that The other string enumeration to compare this object to
- * @return TRUE if the enumerations are equal. FALSE if not.
+ * @return true if the enumerations are equal. false if not.
* @stable ICU 3.6
*/
virtual UBool operator!=(const StringEnumeration& that)const;
diff --git a/deps/icu-small/source/common/unicode/stringpiece.h b/deps/icu-small/source/common/unicode/stringpiece.h
index 19fbe2e22eb032..58053cfd5c3108 100644
--- a/deps/icu-small/source/common/unicode/stringpiece.h
+++ b/deps/icu-small/source/common/unicode/stringpiece.h
@@ -111,7 +111,6 @@ class U_COMMON_API StringPiece : public UMemory {
#endif
#endif // U_HIDE_DRAFT_API
-#ifndef U_HIDE_DRAFT_API
/**
* Constructs from some other implementation of a string piece class, from any
* C++ record type that has these two methods:
@@ -132,7 +131,7 @@ class U_COMMON_API StringPiece : public UMemory {
* as from std::u8string_view.
*
* @param str the other string piece
- * @draft ICU 65
+ * @stable ICU 65
*/
template (str.data())),
length_(static_cast(str.size())) {}
-#endif // U_HIDE_DRAFT_API
/**
* Constructs from a const char * pointer and a specified length.
@@ -209,7 +207,7 @@ class U_COMMON_API StringPiece : public UMemory {
int32_t length() const { return length_; }
/**
* Returns whether the string is empty.
- * @return TRUE if the string is empty
+ * @return true if the string is empty
* @stable ICU 4.2
*/
UBool empty() const { return length_ == 0; }
@@ -331,7 +329,7 @@ class U_COMMON_API StringPiece : public UMemory {
* Global operator == for StringPiece
* @param x The first StringPiece to compare.
* @param y The second StringPiece to compare.
- * @return TRUE if the string data is equal
+ * @return true if the string data is equal
* @stable ICU 4.8
*/
U_EXPORT UBool U_EXPORT2
@@ -341,7 +339,7 @@ operator==(const StringPiece& x, const StringPiece& y);
* Global operator != for StringPiece
* @param x The first StringPiece to compare.
* @param y The second StringPiece to compare.
- * @return TRUE if the string data is not equal
+ * @return true if the string data is not equal
* @stable ICU 4.8
*/
inline UBool operator!=(const StringPiece& x, const StringPiece& y) {
diff --git a/deps/icu-small/source/common/unicode/stringtriebuilder.h b/deps/icu-small/source/common/unicode/stringtriebuilder.h
index 2860cbf5513b8e..efd2d49206ca2d 100644
--- a/deps/icu-small/source/common/unicode/stringtriebuilder.h
+++ b/deps/icu-small/source/common/unicode/stringtriebuilder.h
@@ -279,10 +279,10 @@ class U_COMMON_API StringTrieBuilder : public UObject {
*/
class ValueNode : public Node {
public:
- ValueNode(int32_t initialHash) : Node(initialHash), hasValue(FALSE), value(0) {}
+ ValueNode(int32_t initialHash) : Node(initialHash), hasValue(false), value(0) {}
virtual UBool operator==(const Node &other) const;
void setValue(int32_t v) {
- hasValue=TRUE;
+ hasValue=true;
value=v;
hash=hash*37u+v;
}
diff --git a/deps/icu-small/source/common/unicode/ubidi.h b/deps/icu-small/source/common/unicode/ubidi.h
index f4875c8801efd6..63d0e45cb7f3c5 100644
--- a/deps/icu-small/source/common/unicode/ubidi.h
+++ b/deps/icu-small/source/common/unicode/ubidi.h
@@ -21,7 +21,10 @@
#include "unicode/utypes.h"
#include "unicode/uchar.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
*\file
@@ -496,7 +499,7 @@ typedef struct UBiDi UBiDi;
* @return An empty UBiDi
object.
* @stable ICU 2.0
*/
-U_STABLE UBiDi * U_EXPORT2
+U_CAPI UBiDi * U_EXPORT2
ubidi_open(void);
/**
@@ -533,7 +536,7 @@ ubidi_open(void);
* @return An empty UBiDi
object with preallocated memory.
* @stable ICU 2.0
*/
-U_STABLE UBiDi * U_EXPORT2
+U_CAPI UBiDi * U_EXPORT2
ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode);
/**
@@ -556,7 +559,7 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode);
* @see ubidi_setLine
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_close(UBiDi *pBiDi);
#if U_SHOW_CPLUSPLUS_API
@@ -594,7 +597,7 @@ U_NAMESPACE_END
* this "inverse Bidi" and that the current implementation provides only an
* approximation of "inverse Bidi".
*
- * With isInverse
set to TRUE
,
+ *
With isInverse
set to true
,
* this function changes the behavior of some of the subsequent functions
* in a way that they can be used for the inverse Bidi algorithm.
* Specifically, runs of text with numeric characters will be treated in a
@@ -607,12 +610,12 @@ U_NAMESPACE_END
* the runs of the logically ordered output.
*
* Calling this function with argument isInverse
set to
- * TRUE
is equivalent to calling
+ * true
is equivalent to calling
* ubidi_setReorderingMode
with argument
* reorderingMode
* set to #UBIDI_REORDER_INVERSE_NUMBERS_AS_L
.
* Calling this function with argument isInverse
set to
- * FALSE
is equivalent to calling
+ * false
is equivalent to calling
* ubidi_setReorderingMode
with argument
* reorderingMode
* set to #UBIDI_REORDER_DEFAULT
.
@@ -626,18 +629,18 @@ U_NAMESPACE_END
* @see ubidi_setReorderingMode
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_setInverse(UBiDi *pBiDi, UBool isInverse);
/**
* Is this Bidi object set to perform the inverse Bidi algorithm?
*
Note: calling this function after setting the reordering mode with
- * ubidi_setReorderingMode
will return TRUE
if the
+ * ubidi_setReorderingMode
will return true
if the
* reordering mode was set to #UBIDI_REORDER_INVERSE_NUMBERS_AS_L
,
- * FALSE
for all other values.
+ * false
for all other values.
*
* @param pBiDi is a UBiDi
object.
- * @return TRUE if the Bidi object is set to perform the inverse Bidi algorithm
+ * @return true if the Bidi object is set to perform the inverse Bidi algorithm
* by handling numbers as L.
*
* @see ubidi_setInverse
@@ -645,7 +648,7 @@ ubidi_setInverse(UBiDi *pBiDi, UBool isInverse);
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ubidi_isInverse(UBiDi *pBiDi);
/**
@@ -668,7 +671,7 @@ ubidi_isInverse(UBiDi *pBiDi);
* @see ubidi_setPara
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_orderParagraphsLTR(UBiDi *pBiDi, UBool orderParagraphsLTR);
/**
@@ -676,13 +679,13 @@ ubidi_orderParagraphsLTR(UBiDi *pBiDi, UBool orderParagraphsLTR);
* successive paragraphs progress from left to right?
*
* @param pBiDi is a UBiDi
object.
- * @return TRUE if the Bidi object is set to allocate level 0 to block
+ * @return true if the Bidi object is set to allocate level 0 to block
* separators.
*
* @see ubidi_orderParagraphsLTR
* @stable ICU 3.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ubidi_isOrderParagraphsLTR(UBiDi *pBiDi);
/**
@@ -714,7 +717,7 @@ typedef enum UBiDiReorderingMode {
* @stable ICU 3.6 */
UBIDI_REORDER_RUNS_ONLY,
/** Visual to Logical algorithm which handles numbers like L
- * (same algorithm as selected by ubidi_setInverse(TRUE)
.
+ * (same algorithm as selected by ubidi_setInverse(true)
.
* @see ubidi_setInverse
* @stable ICU 3.6 */
UBIDI_REORDER_INVERSE_NUMBERS_AS_L,
@@ -833,7 +836,7 @@ typedef enum UBiDiReorderingMode {
* reordered sequence (the option #UBIDI_INSERT_LRM_FOR_NUMERIC
can
* be used with function ubidi_writeReordered
to this end. This
* mode is equivalent to calling ubidi_setInverse()
with
- * argument isInverse
set to TRUE
.
+ * argument isInverse
set to true
.
*
* When the reordering mode is set to
* #UBIDI_REORDER_INVERSE_LIKE_DIRECT
, the "direct" Logical to Visual
@@ -886,7 +889,7 @@ typedef enum UBiDiReorderingMode {
* @see ubidi_writeReordered
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_setReorderingMode(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode);
/**
@@ -897,7 +900,7 @@ ubidi_setReorderingMode(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode);
* @see ubidi_setReorderingMode
* @stable ICU 3.6
*/
-U_STABLE UBiDiReorderingMode U_EXPORT2
+U_CAPI UBiDiReorderingMode U_EXPORT2
ubidi_getReorderingMode(UBiDi *pBiDi);
/**
@@ -935,7 +938,7 @@ typedef enum UBiDiReorderingOption {
*
* If this option is set in conjunction with reordering mode
* #UBIDI_REORDER_INVERSE_NUMBERS_AS_L
or with calling
- * ubidi_setInverse(TRUE)
, it implies
+ * ubidi_setInverse(true)
, it implies
* option #UBIDI_INSERT_LRM_FOR_NUMERIC
* in calls to function ubidi_writeReordered()
.
*
@@ -1016,7 +1019,7 @@ typedef enum UBiDiReorderingOption {
*
* When the UBIDI_OPTION_STREAMING
option is used,
* it is recommended to call ubidi_orderParagraphsLTR()
with
- * argument orderParagraphsLTR
set to TRUE
before
+ * argument orderParagraphsLTR
set to true
before
* calling ubidi_setPara
so that later paragraphs may be
* concatenated to previous paragraphs on the right.
*
@@ -1042,7 +1045,7 @@ typedef enum UBiDiReorderingOption {
* @see ubidi_getReorderingOptions
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_setReorderingOptions(UBiDi *pBiDi, uint32_t reorderingOptions);
/**
@@ -1053,7 +1056,7 @@ ubidi_setReorderingOptions(UBiDi *pBiDi, uint32_t reorderingOptions);
* @see ubidi_setReorderingOptions
* @stable ICU 3.6
*/
-U_STABLE uint32_t U_EXPORT2
+U_CAPI uint32_t U_EXPORT2
ubidi_getReorderingOptions(UBiDi *pBiDi);
/**
@@ -1140,7 +1143,7 @@ ubidi_getReorderingOptions(UBiDi *pBiDi);
* @see ubidi_setPara
* @stable ICU 4.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_setContext(UBiDi *pBiDi,
const UChar *prologue, int32_t proLength,
const UChar *epilogue, int32_t epiLength,
@@ -1228,7 +1231,7 @@ ubidi_setContext(UBiDi *pBiDi,
* @param pErrorCode must be a valid pointer to an error code value.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels,
UErrorCode *pErrorCode);
@@ -1279,7 +1282,7 @@ ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
* @see ubidi_getProcessedLength
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_setLine(const UBiDi *pParaBiDi,
int32_t start, int32_t limit,
UBiDi *pLineBiDi,
@@ -1300,7 +1303,7 @@ ubidi_setLine(const UBiDi *pParaBiDi,
* @see UBiDiDirection
* @stable ICU 2.0
*/
-U_STABLE UBiDiDirection U_EXPORT2
+U_CAPI UBiDiDirection U_EXPORT2
ubidi_getDirection(const UBiDi *pBiDi);
/**
@@ -1330,7 +1333,7 @@ ubidi_getDirection(const UBiDi *pBiDi);
* @see UBiDiDirection
* @stable ICU 4.6
*/
-U_STABLE UBiDiDirection U_EXPORT2
+U_CAPI UBiDiDirection U_EXPORT2
ubidi_getBaseDirection(const UChar *text, int32_t length );
/**
@@ -1344,7 +1347,7 @@ ubidi_getBaseDirection(const UChar *text, int32_t length );
* @see ubidi_setLine
* @stable ICU 2.0
*/
-U_STABLE const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
ubidi_getText(const UBiDi *pBiDi);
/**
@@ -1355,7 +1358,7 @@ ubidi_getText(const UBiDi *pBiDi);
* @return The length of the text that the UBiDi object was created for.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_getLength(const UBiDi *pBiDi);
/**
@@ -1373,7 +1376,7 @@ ubidi_getLength(const UBiDi *pBiDi);
* @see ubidi_getParagraphByIndex
* @stable ICU 2.0
*/
-U_STABLE UBiDiLevel U_EXPORT2
+U_CAPI UBiDiLevel U_EXPORT2
ubidi_getParaLevel(const UBiDi *pBiDi);
/**
@@ -1384,7 +1387,7 @@ ubidi_getParaLevel(const UBiDi *pBiDi);
* @return The number of paragraphs.
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_countParagraphs(UBiDi *pBiDi);
/**
@@ -1421,7 +1424,7 @@ ubidi_countParagraphs(UBiDi *pBiDi);
* @see ubidi_getProcessedLength
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_getParagraph(const UBiDi *pBiDi, int32_t charIndex, int32_t *pParaStart,
int32_t *pParaLimit, UBiDiLevel *pParaLevel,
UErrorCode *pErrorCode);
@@ -1453,7 +1456,7 @@ ubidi_getParagraph(const UBiDi *pBiDi, int32_t charIndex, int32_t *pParaStart,
*
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_getParagraphByIndex(const UBiDi *pBiDi, int32_t paraIndex,
int32_t *pParaStart, int32_t *pParaLimit,
UBiDiLevel *pParaLevel, UErrorCode *pErrorCode);
@@ -1473,7 +1476,7 @@ ubidi_getParagraphByIndex(const UBiDi *pBiDi, int32_t paraIndex,
* @see ubidi_getProcessedLength
* @stable ICU 2.0
*/
-U_STABLE UBiDiLevel U_EXPORT2
+U_CAPI UBiDiLevel U_EXPORT2
ubidi_getLevelAt(const UBiDi *pBiDi, int32_t charIndex);
/**
@@ -1494,7 +1497,7 @@ ubidi_getLevelAt(const UBiDi *pBiDi, int32_t charIndex);
* @see ubidi_getProcessedLength
* @stable ICU 2.0
*/
-U_STABLE const UBiDiLevel * U_EXPORT2
+U_CAPI const UBiDiLevel * U_EXPORT2
ubidi_getLevels(UBiDi *pBiDi, UErrorCode *pErrorCode);
/**
@@ -1521,7 +1524,7 @@ ubidi_getLevels(UBiDi *pBiDi, UErrorCode *pErrorCode);
* @see ubidi_getProcessedLength
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_getLogicalRun(const UBiDi *pBiDi, int32_t logicalPosition,
int32_t *pLogicalLimit, UBiDiLevel *pLevel);
@@ -1540,7 +1543,7 @@ ubidi_getLogicalRun(const UBiDi *pBiDi, int32_t logicalPosition,
* @return The number of runs.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_countRuns(UBiDi *pBiDi, UErrorCode *pErrorCode);
/**
@@ -1599,7 +1602,7 @@ ubidi_countRuns(UBiDi *pBiDi, UErrorCode *pErrorCode);
* to avoid these issues.
* @stable ICU 2.0
*/
-U_STABLE UBiDiDirection U_EXPORT2
+U_CAPI UBiDiDirection U_EXPORT2
ubidi_getVisualRun(UBiDi *pBiDi, int32_t runIndex,
int32_t *pLogicalStart, int32_t *pLength);
@@ -1640,7 +1643,7 @@ ubidi_getVisualRun(UBiDi *pBiDi, int32_t runIndex,
* @see ubidi_getProcessedLength
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_getVisualIndex(UBiDi *pBiDi, int32_t logicalIndex, UErrorCode *pErrorCode);
/**
@@ -1675,7 +1678,7 @@ ubidi_getVisualIndex(UBiDi *pBiDi, int32_t logicalIndex, UErrorCode *pErrorCode)
* @see ubidi_getResultLength
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_getLogicalIndex(UBiDi *pBiDi, int32_t visualIndex, UErrorCode *pErrorCode);
/**
@@ -1718,7 +1721,7 @@ ubidi_getLogicalIndex(UBiDi *pBiDi, int32_t visualIndex, UErrorCode *pErrorCode)
* @see ubidi_getResultLength
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_getLogicalMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode);
/**
@@ -1754,7 +1757,7 @@ ubidi_getLogicalMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode);
* @see ubidi_getResultLength
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode);
/**
@@ -1777,7 +1780,7 @@ ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode);
* The index map will result in indexMap[logicalIndex]==visualIndex
.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap);
/**
@@ -1800,7 +1803,7 @@ ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap
* The index map will result in indexMap[visualIndex]==logicalIndex
.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap);
/**
@@ -1835,7 +1838,7 @@ ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap)
* @see UBIDI_MAP_NOWHERE
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_invertMap(const int32_t *srcMap, int32_t *destMap, int32_t length);
/** option flags for ubidi_writeReordered() */
@@ -1940,7 +1943,7 @@ ubidi_invertMap(const int32_t *srcMap, int32_t *destMap, int32_t length);
* @see UBIDI_OPTION_STREAMING
* @stable ICU 3.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_getProcessedLength(const UBiDi *pBiDi);
/**
@@ -1970,7 +1973,7 @@ ubidi_getProcessedLength(const UBiDi *pBiDi);
* @see UBIDI_OPTION_REMOVE_CONTROLS
* @stable ICU 3.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_getResultLength(const UBiDi *pBiDi);
U_CDECL_BEGIN
@@ -2028,7 +2031,7 @@ U_CDECL_END
* @see UBiDiClassCallback
* @stable ICU 3.6
*/
-U_STABLE UCharDirection U_EXPORT2
+U_CAPI UCharDirection U_EXPORT2
ubidi_getCustomizedClass(UBiDi *pBiDi, UChar32 c);
/**
@@ -2058,7 +2061,7 @@ ubidi_getCustomizedClass(UBiDi *pBiDi, UChar32 c);
* @see ubidi_getClassCallback
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_setClassCallback(UBiDi *pBiDi, UBiDiClassCallback *newFn,
const void *newContext, UBiDiClassCallback **oldFn,
const void **oldContext, UErrorCode *pErrorCode);
@@ -2075,7 +2078,7 @@ ubidi_setClassCallback(UBiDi *pBiDi, UBiDiClassCallback *newFn,
* @see ubidi_setClassCallback
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubidi_getClassCallback(UBiDi *pBiDi, UBiDiClassCallback **fn, const void **context);
/**
@@ -2143,7 +2146,7 @@ ubidi_getClassCallback(UBiDi *pBiDi, UBiDiClassCallback **fn, const void **conte
* @see ubidi_getProcessedLength
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_writeReordered(UBiDi *pBiDi,
UChar *dest, int32_t destSize,
uint16_t options,
@@ -2195,7 +2198,7 @@ ubidi_writeReordered(UBiDi *pBiDi,
* @return The length of the output string.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubidi_writeReverse(const UChar *src, int32_t srcLength,
UChar *dest, int32_t destSize,
uint16_t options,
diff --git a/deps/icu-small/source/common/unicode/ubiditransform.h b/deps/icu-small/source/common/unicode/ubiditransform.h
index 5c08ed5df0fd90..2dd7564010de17 100644
--- a/deps/icu-small/source/common/unicode/ubiditransform.h
+++ b/deps/icu-small/source/common/unicode/ubiditransform.h
@@ -21,7 +21,10 @@
#include "unicode/utypes.h"
#include "unicode/ubidi.h"
#include "unicode/uchar.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -147,10 +150,10 @@ typedef struct UBiDiTransform UBiDiTransform;
* calling ubidi_setPara
with
* paraLevel == UBIDI_DEFAULT_RTL
,
* : this is equivalent to
- * calling ubidi_setInverse(UBiDi*, TRUE)
and then
+ * calling ubidi_setInverse(UBiDi*, true)
and then
* ubidi_setPara
with paraLevel == UBIDI_LTR
,
* : this is equivalent to
- * calling ubidi_setInverse(UBiDi*, TRUE)
and then
+ * calling ubidi_setInverse(UBiDi*, true)
and then
* ubidi_setPara
with paraLevel == UBIDI_RTL
.
*
* All combinations that involve the Visual RTL scheme are unsupported by
@@ -245,7 +248,7 @@ typedef struct UBiDiTransform UBiDiTransform;
* @see u_shapeArabic
* @stable ICU 58
*/
-U_STABLE uint32_t U_EXPORT2
+U_CAPI uint32_t U_EXPORT2
ubiditransform_transform(UBiDiTransform *pBiDiTransform,
const UChar *src, int32_t srcLength,
UChar *dest, int32_t destSize,
@@ -291,14 +294,14 @@ ubiditransform_transform(UBiDiTransform *pBiDiTransform,
* @return An empty UBiDiTransform
object.
* @stable ICU 58
*/
-U_STABLE UBiDiTransform* U_EXPORT2
+U_CAPI UBiDiTransform* U_EXPORT2
ubiditransform_open(UErrorCode *pErrorCode);
/**
* Deallocates the given UBiDiTransform
object.
* @stable ICU 58
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubiditransform_close(UBiDiTransform *pBidiTransform);
#if U_SHOW_CPLUSPLUS_API
diff --git a/deps/icu-small/source/common/unicode/ubrk.h b/deps/icu-small/source/common/unicode/ubrk.h
index 73c1553b243957..37189a85984b68 100644
--- a/deps/icu-small/source/common/unicode/ubrk.h
+++ b/deps/icu-small/source/common/unicode/ubrk.h
@@ -13,7 +13,10 @@
#include "unicode/utypes.h"
#include "unicode/uloc.h"
#include "unicode/utext.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* A text-break iterator.
@@ -238,7 +241,7 @@ typedef enum USentenceBreakTag {
* @see ubrk_openRules
* @stable ICU 2.0
*/
-U_STABLE UBreakIterator* U_EXPORT2
+U_CAPI UBreakIterator* U_EXPORT2
ubrk_open(UBreakIteratorType type,
const char *locale,
const UChar *text,
@@ -260,7 +263,7 @@ ubrk_open(UBreakIteratorType type,
* @see ubrk_open
* @stable ICU 2.2
*/
-U_STABLE UBreakIterator* U_EXPORT2
+U_CAPI UBreakIterator* U_EXPORT2
ubrk_openRules(const UChar *rules,
int32_t rulesLength,
const UChar *text,
@@ -288,7 +291,7 @@ ubrk_openRules(const UChar *rules,
* @see ubrk_getBinaryRules
* @stable ICU 59
*/
-U_STABLE UBreakIterator* U_EXPORT2
+U_CAPI UBreakIterator* U_EXPORT2
ubrk_openBinaryRules(const uint8_t *binaryRules, int32_t rulesLength,
const UChar * text, int32_t textLength,
UErrorCode * status);
@@ -311,7 +314,7 @@ ubrk_openBinaryRules(const uint8_t *binaryRules, int32_t rulesLength,
* @return pointer to the new clone
* @stable ICU 2.0
*/
-U_STABLE UBreakIterator * U_EXPORT2
+U_CAPI UBreakIterator * U_EXPORT2
ubrk_safeClone(
const UBreakIterator *bi,
void *stackBuffer,
@@ -334,7 +337,7 @@ ubrk_safeClone(
* @param bi The break iterator to close.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubrk_close(UBreakIterator *bi);
#if U_SHOW_CPLUSPLUS_API
@@ -368,7 +371,7 @@ U_NAMESPACE_END
* @param status The error code
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubrk_setText(UBreakIterator* bi,
const UChar* text,
int32_t textLength,
@@ -392,7 +395,7 @@ ubrk_setText(UBreakIterator* bi,
* @param status The error code
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubrk_setUText(UBreakIterator* bi,
UText* text,
UErrorCode* status);
@@ -407,7 +410,7 @@ ubrk_setUText(UBreakIterator* bi,
* \ref ubrk_first, or \ref ubrk_last.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_current(const UBreakIterator *bi);
/**
@@ -419,7 +422,7 @@ ubrk_current(const UBreakIterator *bi);
* @see ubrk_previous
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_next(UBreakIterator *bi);
/**
@@ -431,7 +434,7 @@ ubrk_next(UBreakIterator *bi);
* @see ubrk_next
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_previous(UBreakIterator *bi);
/**
@@ -441,7 +444,7 @@ ubrk_previous(UBreakIterator *bi);
* @see ubrk_last
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_first(UBreakIterator *bi);
/**
@@ -453,7 +456,7 @@ ubrk_first(UBreakIterator *bi);
* @see ubrk_first
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_last(UBreakIterator *bi);
/**
@@ -465,7 +468,7 @@ ubrk_last(UBreakIterator *bi);
* @see ubrk_following
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_preceding(UBreakIterator *bi,
int32_t offset);
@@ -478,7 +481,7 @@ ubrk_preceding(UBreakIterator *bi,
* @see ubrk_preceding
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_following(UBreakIterator *bi,
int32_t offset);
@@ -491,7 +494,7 @@ ubrk_following(UBreakIterator *bi,
* @see ubrk_countAvailable
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
ubrk_getAvailable(int32_t index);
/**
@@ -502,7 +505,7 @@ ubrk_getAvailable(int32_t index);
* @see ubrk_getAvailable
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_countAvailable(void);
@@ -515,7 +518,7 @@ ubrk_countAvailable(void);
* @return True if "offset" is a boundary position.
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ubrk_isBoundary(UBreakIterator *bi, int32_t offset);
/**
@@ -527,7 +530,7 @@ ubrk_isBoundary(UBreakIterator *bi, int32_t offset);
* For word break iterators, the possible values are defined in enum UWordBreak.
* @stable ICU 2.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_getRuleStatus(UBreakIterator *bi);
/**
@@ -547,7 +550,7 @@ ubrk_getRuleStatus(UBreakIterator *bi);
* the most recent boundary returned by the break iterator.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_getRuleStatusVec(UBreakIterator *bi, int32_t *fillInVec, int32_t capacity, UErrorCode *status);
/**
@@ -559,7 +562,7 @@ ubrk_getRuleStatusVec(UBreakIterator *bi, int32_t *fillInVec, int32_t capacity,
* @return locale string
* @stable ICU 2.8
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
ubrk_getLocaleByType(const UBreakIterator *bi, ULocDataLocaleType type, UErrorCode* status);
/**
@@ -587,7 +590,7 @@ ubrk_getLocaleByType(const UBreakIterator *bi, ULocDataLocaleType type, UErrorCo
*
* @stable ICU 49
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ubrk_refreshUText(UBreakIterator *bi,
UText *text,
UErrorCode *status);
@@ -618,7 +621,7 @@ ubrk_refreshUText(UBreakIterator *bi,
* @see ubrk_openBinaryRules
* @stable ICU 59
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ubrk_getBinaryRules(UBreakIterator *bi,
uint8_t * binaryRules, int32_t rulesCapacity,
UErrorCode * status);
diff --git a/deps/icu-small/source/common/unicode/ucasemap.h b/deps/icu-small/source/common/unicode/ucasemap.h
index 6b253e3d638475..d1c1b483ab337e 100644
--- a/deps/icu-small/source/common/unicode/ucasemap.h
+++ b/deps/icu-small/source/common/unicode/ucasemap.h
@@ -22,10 +22,13 @@
#define __UCASEMAP_H__
#include "unicode/utypes.h"
-#include "unicode/localpointer.h"
#include "unicode/stringoptions.h"
#include "unicode/ustring.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: Unicode case mapping functions using a UCaseMap service object.
@@ -69,7 +72,7 @@ typedef struct UCaseMap UCaseMap; /**< C typedef for struct UCaseMap. @stable IC
* @see U_TITLECASE_NO_BREAK_ADJUSTMENT
* @stable ICU 3.4
*/
-U_STABLE UCaseMap * U_EXPORT2
+U_CAPI UCaseMap * U_EXPORT2
ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
/**
@@ -77,7 +80,7 @@ ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
* @param csm Object to be closed.
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucasemap_close(UCaseMap *csm);
#if U_SHOW_CPLUSPLUS_API
@@ -105,7 +108,7 @@ U_NAMESPACE_END
* @return locale ID
* @stable ICU 3.4
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucasemap_getLocale(const UCaseMap *csm);
/**
@@ -114,7 +117,7 @@ ucasemap_getLocale(const UCaseMap *csm);
* @return options bit set
* @stable ICU 3.4
*/
-U_STABLE uint32_t U_EXPORT2
+U_CAPI uint32_t U_EXPORT2
ucasemap_getOptions(const UCaseMap *csm);
/**
@@ -128,7 +131,7 @@ ucasemap_getOptions(const UCaseMap *csm);
* @see ucasemap_open
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
/**
@@ -142,7 +145,7 @@ ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
* @see ucasemap_open
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode);
#if !UCONFIG_NO_BREAK_ITERATION
@@ -154,7 +157,7 @@ ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode);
* @return titlecasing break iterator
* @stable ICU 3.8
*/
-U_STABLE const UBreakIterator * U_EXPORT2
+U_CAPI const UBreakIterator * U_EXPORT2
ucasemap_getBreakIterator(const UCaseMap *csm);
/**
@@ -177,7 +180,7 @@ ucasemap_getBreakIterator(const UCaseMap *csm);
* @see ucasemap_utf8ToTitle
* @stable ICU 3.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode);
/**
@@ -226,7 +229,7 @@ ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode
* @see u_strToTitle
* @stable ICU 3.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucasemap_toTitle(UCaseMap *csm,
UChar *dest, int32_t destCapacity,
const UChar *src, int32_t srcLength,
@@ -257,7 +260,7 @@ ucasemap_toTitle(UCaseMap *csm,
* @see u_strToLower
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucasemap_utf8ToLower(const UCaseMap *csm,
char *dest, int32_t destCapacity,
const char *src, int32_t srcLength,
@@ -286,7 +289,7 @@ ucasemap_utf8ToLower(const UCaseMap *csm,
* @see u_strToUpper
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucasemap_utf8ToUpper(const UCaseMap *csm,
char *dest, int32_t destCapacity,
const char *src, int32_t srcLength,
@@ -338,7 +341,7 @@ ucasemap_utf8ToUpper(const UCaseMap *csm,
* @see U_TITLECASE_NO_BREAK_ADJUSTMENT
* @stable ICU 3.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucasemap_utf8ToTitle(UCaseMap *csm,
char *dest, int32_t destCapacity,
const char *src, int32_t srcLength,
@@ -376,7 +379,7 @@ ucasemap_utf8ToTitle(UCaseMap *csm,
* @see U_FOLD_CASE_EXCLUDE_SPECIAL_I
* @stable ICU 3.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucasemap_utf8FoldCase(const UCaseMap *csm,
char *dest, int32_t destCapacity,
const char *src, int32_t srcLength,
diff --git a/deps/icu-small/source/common/unicode/ucat.h b/deps/icu-small/source/common/unicode/ucat.h
index f9c18b47d6c9b8..a177639a76bfcb 100644
--- a/deps/icu-small/source/common/unicode/ucat.h
+++ b/deps/icu-small/source/common/unicode/ucat.h
@@ -103,7 +103,7 @@ typedef UResourceBundle* u_nl_catd;
*
* @stable ICU 2.6
*/
-U_STABLE u_nl_catd U_EXPORT2
+U_CAPI u_nl_catd U_EXPORT2
u_catopen(const char* name, const char* locale, UErrorCode* ec);
/**
@@ -114,7 +114,7 @@ u_catopen(const char* name, const char* locale, UErrorCode* ec);
*
* @stable ICU 2.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_catclose(u_nl_catd catd);
/**
@@ -149,7 +149,7 @@ u_catclose(u_nl_catd catd);
*
* @stable ICU 2.6
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
u_catgets(u_nl_catd catd, int32_t set_num, int32_t msg_num,
const UChar* s,
int32_t* len, UErrorCode* ec);
diff --git a/deps/icu-small/source/common/unicode/uchar.h b/deps/icu-small/source/common/unicode/uchar.h
index 3b55b2326dfc1f..1e0f82e706c482 100644
--- a/deps/icu-small/source/common/unicode/uchar.h
+++ b/deps/icu-small/source/common/unicode/uchar.h
@@ -80,7 +80,7 @@ U_CDECL_BEGIN
* and the ICU User Guide chapter on Properties (http://icu-project.org/userguide/properties.html).
*
* Many properties are accessible via generic functions that take a UProperty selector.
- * - u_hasBinaryProperty() returns a binary value (TRUE/FALSE) per property and code point.
+ * - u_hasBinaryProperty() returns a binary value (true/false) per property and code point.
* - u_getIntPropertyValue() returns an integer value per property and code point.
* For each supported enumerated or catalog property, there is
* an enum type for all of the property's values, and
@@ -2586,8 +2586,8 @@ typedef enum UVerticalOrientation {
* @param c Code point to test.
* @param which UProperty selector constant, identifies which binary property to check.
* Must be UCHAR_BINARY_START<=which(remainingMatchLength_ + 2) << kState64RemainingShift) |
@@ -123,14 +122,13 @@ class U_COMMON_API UCharsTrie : public UMemory {
* @see getState64
* @see resetToState
* @see reset
- * @draft ICU 65
+ * @stable ICU 65
*/
UCharsTrie &resetToState64(uint64_t state) {
remainingMatchLength_ = static_cast(state >> kState64RemainingShift) - 2;
pos_ = uchars_ + (state & kState64PosMask);
return *this;
}
-#endif /* U_HIDE_DRAFT_API */
/**
* UCharsTrie state object, for saving a trie's current state
@@ -268,16 +266,16 @@ class U_COMMON_API UCharsTrie : public UMemory {
/**
* Determines whether all strings reachable from the current state
* map to the same value.
- * @param uniqueValue Receives the unique value, if this function returns TRUE.
+ * @param uniqueValue Receives the unique value, if this function returns true.
* (output-only)
- * @return TRUE if all strings reachable from the current state
+ * @return true if all strings reachable from the current state
* map to the same value.
* @stable ICU 4.8
*/
inline UBool hasUniqueValue(int32_t &uniqueValue) const {
const char16_t *pos=pos_;
// Skip the rest of a pending linear-match node.
- return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FALSE, uniqueValue);
+ return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue);
}
/**
@@ -335,7 +333,7 @@ class U_COMMON_API UCharsTrie : public UMemory {
Iterator &reset();
/**
- * @return TRUE if there are more elements.
+ * @return true if there are more elements.
* @stable ICU 4.8
*/
UBool hasNext() const;
@@ -351,7 +349,7 @@ class U_COMMON_API UCharsTrie : public UMemory {
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
- * @return TRUE if there is another element.
+ * @return true if there is another element.
* @stable ICU 4.8
*/
UBool next(UErrorCode &errorCode);
@@ -371,7 +369,7 @@ class U_COMMON_API UCharsTrie : public UMemory {
UBool truncateAndStop() {
pos_=NULL;
value_=-1; // no real value for str
- return TRUE;
+ return true;
}
const char16_t *branchNext(const char16_t *pos, int32_t length, UErrorCode &errorCode);
diff --git a/deps/icu-small/source/common/unicode/ucharstriebuilder.h b/deps/icu-small/source/common/unicode/ucharstriebuilder.h
index 540dcc047fd563..15657702f9d024 100644
--- a/deps/icu-small/source/common/unicode/ucharstriebuilder.h
+++ b/deps/icu-small/source/common/unicode/ucharstriebuilder.h
@@ -101,9 +101,10 @@ class U_COMMON_API UCharsTrieBuilder : public StringTrieBuilder {
* Multiple calls to buildUnicodeString() set the UnicodeStrings to the
* builder's same char16_t array, without rebuilding.
* If buildUnicodeString() is called after build(), the trie will be
- * re-serialized into a new array.
- * If build() is called after buildUnicodeString(), the trie object will become
- * the owner of the previously returned array.
+ * re-serialized into a new array (because build() passes on ownership).
+ * If build() is called after buildUnicodeString(), the trie object returned
+ * by build() will become the owner of the underlying data for the
+ * previously returned UnicodeString.
* After clear() has been called, a new array will be used as well.
* @param buildOption Build option, see UStringTrieBuildOption.
* @param result A UnicodeString which will be set to the char16_t-serialized
@@ -147,7 +148,7 @@ class U_COMMON_API UCharsTrieBuilder : public StringTrieBuilder {
virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t unitIndex, int32_t count) const;
virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, char16_t unit) const;
- virtual UBool matchNodesCanHaveValues() const { return TRUE; }
+ virtual UBool matchNodesCanHaveValues() const { return true; }
virtual int32_t getMaxBranchLinearSubNodeLength() const { return UCharsTrie::kMaxBranchLinearSubNodeLength; }
virtual int32_t getMinLinearMatch() const { return UCharsTrie::kMinLinearMatch; }
diff --git a/deps/icu-small/source/common/unicode/uchriter.h b/deps/icu-small/source/common/unicode/uchriter.h
index bee842cc259f07..84309b2416d136 100644
--- a/deps/icu-small/source/common/unicode/uchriter.h
+++ b/deps/icu-small/source/common/unicode/uchriter.h
@@ -274,11 +274,11 @@ class U_COMMON_API UCharCharacterIterator : public CharacterIterator {
virtual UChar32 next32PostInc(void);
/**
- * Returns FALSE if there are no more code units or code points
+ * Returns false if there are no more code units or code points
* at or after the current position in the iteration range.
* This is used with nextPostInc() or next32PostInc() in forward
* iteration.
- * @return FALSE if there are no more code units or code points
+ * @return false if there are no more code units or code points
* at or after the current position in the iteration range.
* @stable ICU 2.0
*/
@@ -303,11 +303,11 @@ class U_COMMON_API UCharCharacterIterator : public CharacterIterator {
virtual UChar32 previous32(void);
/**
- * Returns FALSE if there are no more code units or code points
+ * Returns false if there are no more code units or code points
* before the current position in the iteration range.
* This is used with previous() or previous32() in backward
* iteration.
- * @return FALSE if there are no more code units or code points
+ * @return false if there are no more code units or code points
* before the current position in the iteration range.
* @stable ICU 2.0
*/
diff --git a/deps/icu-small/source/common/unicode/uclean.h b/deps/icu-small/source/common/unicode/uclean.h
index ab0cd6da6ba780..f03593964a4edd 100644
--- a/deps/icu-small/source/common/unicode/uclean.h
+++ b/deps/icu-small/source/common/unicode/uclean.h
@@ -49,7 +49,7 @@
*
* @stable ICU 2.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_init(UErrorCode *status);
#ifndef U_HIDE_SYSTEM_API
@@ -98,7 +98,7 @@ u_init(UErrorCode *status);
* @stable ICU 2.0
* @system
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_cleanup(void);
U_CDECL_BEGIN
@@ -148,7 +148,7 @@ typedef void U_CALLCONV UMemFreeFn (const void *context, void *mem);
* @stable ICU 2.8
* @system
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_setMemoryFunctions(const void *context, UMemAllocFn * U_CALLCONV_FPTR a, UMemReallocFn * U_CALLCONV_FPTR r, UMemFreeFn * U_CALLCONV_FPTR f,
UErrorCode *status);
diff --git a/deps/icu-small/source/common/unicode/ucnv.h b/deps/icu-small/source/common/unicode/ucnv.h
index ec7c5f350b4973..58f271cfb5adf2 100644
--- a/deps/icu-small/source/common/unicode/ucnv.h
+++ b/deps/icu-small/source/common/unicode/ucnv.h
@@ -51,7 +51,10 @@
#include "unicode/ucnv_err.h"
#include "unicode/uenum.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
#if !defined(USET_DEFINED) && !defined(U_IN_DOXYGEN)
@@ -308,7 +311,7 @@ U_CDECL_END
* lexically follows name2.
* @stable ICU 2.0
*/
-U_STABLE int U_EXPORT2
+U_CAPI int U_EXPORT2
ucnv_compareNames(const char *name1, const char *name2);
@@ -362,7 +365,7 @@ ucnv_compareNames(const char *name1, const char *name2);
* @see ucnv_compareNames
* @stable ICU 2.0
*/
-U_STABLE UConverter* U_EXPORT2
+U_CAPI UConverter* U_EXPORT2
ucnv_open(const char *converterName, UErrorCode *err);
@@ -392,7 +395,7 @@ ucnv_open(const char *converterName, UErrorCode *err);
* @see ucnv_compareNames
* @stable ICU 2.0
*/
-U_STABLE UConverter* U_EXPORT2
+U_CAPI UConverter* U_EXPORT2
ucnv_openU(const UChar *name,
UErrorCode *err);
@@ -460,7 +463,7 @@ ucnv_openU(const UChar *name,
* @see UConverterPlatform
* @stable ICU 2.0
*/
-U_STABLE UConverter* U_EXPORT2
+U_CAPI UConverter* U_EXPORT2
ucnv_openCCSID(int32_t codepage,
UConverterPlatform platform,
UErrorCode * err);
@@ -476,7 +479,7 @@ ucnv_openCCSID(int32_t codepage,
* The name will NOT be looked up in the alias mechanism, nor will the converter be
* stored in the converter cache or the alias table. The only way to open further converters
* is call this function multiple times, or use the ucnv_safeClone() function to clone a
- * 'master' converter.
+ * 'primary' converter.
*
* A future version of ICU may add alias table lookups and/or caching
* to this function.
@@ -495,7 +498,7 @@ ucnv_openCCSID(int32_t codepage,
* @see ucnv_close
* @stable ICU 2.2
*/
-U_STABLE UConverter* U_EXPORT2
+U_CAPI UConverter* U_EXPORT2
ucnv_openPackage(const char *packageName, const char *converterName, UErrorCode *err);
/**
@@ -537,7 +540,7 @@ ucnv_openPackage(const char *packageName, const char *converterName, UErrorCode
* @return pointer to the new clone
* @stable ICU 2.0
*/
-U_STABLE UConverter * U_EXPORT2
+U_CAPI UConverter * U_EXPORT2
ucnv_safeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
@@ -566,7 +569,7 @@ ucnv_safeClone(const UConverter *cnv,
* @see ucnv_openCCSID
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_close(UConverter * converter);
#if U_SHOW_CPLUSPLUS_API
@@ -605,7 +608,7 @@ U_NAMESPACE_END
* @see ucnv_setSubstChars
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_getSubstChars(const UConverter *converter,
char *subChars,
int8_t *len,
@@ -630,7 +633,7 @@ ucnv_getSubstChars(const UConverter *converter,
* @see ucnv_getSubstChars
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_setSubstChars(UConverter *converter,
const char *subChars,
int8_t len,
@@ -663,7 +666,7 @@ ucnv_setSubstChars(UConverter *converter,
* @see ucnv_getSubstChars
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_setSubstString(UConverter *cnv,
const UChar *s,
int32_t length,
@@ -682,7 +685,7 @@ ucnv_setSubstString(UConverter *cnv,
* U_INDEX_OUTOFBOUNDS_ERROR will be returned.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_getInvalidChars(const UConverter *converter,
char *errBytes,
int8_t *len,
@@ -701,7 +704,7 @@ ucnv_getInvalidChars(const UConverter *converter,
* U_INDEX_OUTOFBOUNDS_ERROR will be returned.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_getInvalidUChars(const UConverter *converter,
UChar *errUChars,
int8_t *len,
@@ -714,7 +717,7 @@ ucnv_getInvalidUChars(const UConverter *converter,
* @param converter the Unicode converter
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_reset(UConverter *converter);
/**
@@ -725,7 +728,7 @@ ucnv_reset(UConverter *converter);
* @param converter the Unicode converter
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_resetToUnicode(UConverter *converter);
/**
@@ -736,7 +739,7 @@ ucnv_resetToUnicode(UConverter *converter);
* @param converter the Unicode converter
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_resetFromUnicode(UConverter *converter);
/**
@@ -789,7 +792,7 @@ ucnv_resetFromUnicode(UConverter *converter);
* @see ucnv_getMinCharSize
* @stable ICU 2.0
*/
-U_STABLE int8_t U_EXPORT2
+U_CAPI int8_t U_EXPORT2
ucnv_getMaxCharSize(const UConverter *converter);
/**
@@ -822,7 +825,7 @@ ucnv_getMaxCharSize(const UConverter *converter);
* @see ucnv_getMaxCharSize
* @stable ICU 2.0
*/
-U_STABLE int8_t U_EXPORT2
+U_CAPI int8_t U_EXPORT2
ucnv_getMinCharSize(const UConverter *converter);
/**
@@ -839,7 +842,7 @@ ucnv_getMinCharSize(const UConverter *converter);
* @see ucnv_getName
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_getDisplayName(const UConverter *converter,
const char *displayLocale,
UChar *displayName,
@@ -856,7 +859,7 @@ ucnv_getDisplayName(const UConverter *converter,
* @see ucnv_getDisplayName
* @stable ICU 2.0
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucnv_getName(const UConverter *converter, UErrorCode *err);
/**
@@ -882,7 +885,7 @@ ucnv_getName(const UConverter *converter, UErrorCode *err);
* @see ucnv_getPlatform
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_getCCSID(const UConverter *converter,
UErrorCode *err);
@@ -896,7 +899,7 @@ ucnv_getCCSID(const UConverter *converter,
* @return The codepage platform
* @stable ICU 2.0
*/
-U_STABLE UConverterPlatform U_EXPORT2
+U_CAPI UConverterPlatform U_EXPORT2
ucnv_getPlatform(const UConverter *converter,
UErrorCode *err);
@@ -908,14 +911,14 @@ ucnv_getPlatform(const UConverter *converter,
* @return the type of the converter
* @stable ICU 2.0
*/
-U_STABLE UConverterType U_EXPORT2
+U_CAPI UConverterType U_EXPORT2
ucnv_getType(const UConverter * converter);
/**
* Gets the "starter" (lead) bytes for converters of type MBCS.
* Will fill in an U_ILLEGAL_ARGUMENT_ERROR if converter passed in
* is not MBCS. Fills in an array of type UBool, with the value of the byte
- * as offset to the array. For example, if (starters[0x20] == TRUE) at return,
+ * as offset to the array. For example, if (starters[0x20] == true) at return,
* it means that the byte 0x20 is a starter byte in this converter.
* Context pointers are always owned by the caller.
*
@@ -926,7 +929,7 @@ ucnv_getType(const UConverter * converter);
* @see ucnv_getType
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_getStarters(const UConverter* converter,
UBool starters[256],
UErrorCode* err);
@@ -997,7 +1000,7 @@ typedef enum UConverterUnicodeSet {
* @see uset_close
* @stable ICU 2.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_getUnicodeSet(const UConverter *cnv,
USet *setFillIn,
UConverterUnicodeSet whichSet,
@@ -1014,7 +1017,7 @@ ucnv_getUnicodeSet(const UConverter *cnv,
* @see ucnv_setToUCallBack
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_getToUCallBack (const UConverter * converter,
UConverterToUCallback *action,
const void **context);
@@ -1030,7 +1033,7 @@ ucnv_getToUCallBack (const UConverter * converter,
* @see ucnv_setFromUCallBack
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_getFromUCallBack (const UConverter * converter,
UConverterFromUCallback *action,
const void **context);
@@ -1050,7 +1053,7 @@ ucnv_getFromUCallBack (const UConverter * converter,
* @see ucnv_getToUCallBack
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_setToUCallBack (UConverter * converter,
UConverterToUCallback newAction,
const void* newContext,
@@ -1073,7 +1076,7 @@ ucnv_setToUCallBack (UConverter * converter,
* @see ucnv_getFromUCallBack
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_setFromUCallBack (UConverter * converter,
UConverterFromUCallback newAction,
const void *newContext,
@@ -1100,7 +1103,7 @@ ucnv_setFromUCallBack (UConverter * converter,
* consumed. At that point, the caller should reset the source and
* sourceLimit pointers to point to the next chunk.
*
- * At the end of the stream (flush==TRUE), the input is completely consumed
+ * At the end of the stream (flush==true), the input is completely consumed
* when *source==sourceLimit and no error code is set.
* The converter object is then automatically reset by this function.
* (This means that a converter need not be reset explicitly between data
@@ -1125,9 +1128,9 @@ ucnv_setFromUCallBack (UConverter * converter,
* e.g: offsets[3] is equal to 6, it means that the target[3] was a result of transcoding source[6]
* For output data carried across calls, and other data without a specific source character
* (such as from escape sequences or callbacks) -1 will be placed for offsets.
- * @param flush set to TRUE if the current source buffer is the last available
- * chunk of the source, FALSE otherwise. Note that if a failing status is returned,
- * this function may have to be called multiple times with flush set to TRUE until
+ * @param flush set to true if the current source buffer is the last available
+ * chunk of the source, false otherwise. Note that if a failing status is returned,
+ * this function may have to be called multiple times with flush set to true until
* the source buffer is consumed.
* @param err the error status. U_ILLEGAL_ARGUMENT_ERROR will be set if the
* converter is NULL.
@@ -1139,7 +1142,7 @@ ucnv_setFromUCallBack (UConverter * converter,
* @see ucnv_setToUCallBack
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_fromUnicode (UConverter * converter,
char **target,
const char *targetLimit,
@@ -1169,7 +1172,7 @@ ucnv_fromUnicode (UConverter * converter,
* consumed. At that point, the caller should reset the source and
* sourceLimit pointers to point to the next chunk.
*
- * At the end of the stream (flush==TRUE), the input is completely consumed
+ * At the end of the stream (flush==true), the input is completely consumed
* when *source==sourceLimit and no error code is set
* The converter object is then automatically reset by this function.
* (This means that a converter need not be reset explicitly between data
@@ -1193,9 +1196,9 @@ ucnv_fromUnicode (UConverter * converter,
* e.g: offsets[3] is equal to 6, it means that the target[3] was a result of transcoding source[6]
* For output data carried across calls, and other data without a specific source character
* (such as from escape sequences or callbacks) -1 will be placed for offsets.
- * @param flush set to TRUE if the current source buffer is the last available
- * chunk of the source, FALSE otherwise. Note that if a failing status is returned,
- * this function may have to be called multiple times with flush set to TRUE until
+ * @param flush set to true if the current source buffer is the last available
+ * chunk of the source, false otherwise. Note that if a failing status is returned,
+ * this function may have to be called multiple times with flush set to true until
* the source buffer is consumed.
* @param err the error status. U_ILLEGAL_ARGUMENT_ERROR will be set if the
* converter is NULL.
@@ -1208,7 +1211,7 @@ ucnv_fromUnicode (UConverter * converter,
* @see ucnv_getNextUChar
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_toUnicode(UConverter *converter,
UChar **target,
const UChar *targetLimit,
@@ -1245,7 +1248,7 @@ ucnv_toUnicode(UConverter *converter,
* @see UCNV_GET_MAX_BYTES_FOR_STRING
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_fromUChars(UConverter *cnv,
char *dest, int32_t destCapacity,
const UChar *src, int32_t srcLength,
@@ -1277,7 +1280,7 @@ ucnv_fromUChars(UConverter *cnv,
* @see ucnv_convert
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_toUChars(UConverter *cnv,
UChar *dest, int32_t destCapacity,
const char *src, int32_t srcLength,
@@ -1295,7 +1298,7 @@ ucnv_toUChars(UConverter *cnv,
* - Convenient.
*
* Limitations compared to ucnv_toUnicode():
- * - Always assumes flush=TRUE.
+ * - Always assumes flush=true.
* This makes ucnv_getNextUChar() unsuitable for "streaming" conversion,
* that is, for where the input is supplied in multiple buffers,
* because ucnv_getNextUChar() will assume the end of the input at the end
@@ -1306,7 +1309,7 @@ ucnv_toUChars(UConverter *cnv,
* ucnv_getNextUChar() uses the current state of the converter
* (unlike ucnv_toUChars() which always resets first).
* However, if ucnv_getNextUChar() is called after ucnv_toUnicode()
- * stopped in the middle of a character sequence (with flush=FALSE),
+ * stopped in the middle of a character sequence (with flush=false),
* then ucnv_getNextUChar() will always use the slower ucnv_toUnicode()
* internally until the next character boundary.
* (This is new in ICU 2.6. In earlier releases, ucnv_getNextUChar() had to
@@ -1353,7 +1356,7 @@ ucnv_toUChars(UConverter *cnv,
* @see ucnv_convert
* @stable ICU 2.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
ucnv_getNextUChar(UConverter * converter,
const char **source,
const char * sourceLimit,
@@ -1385,7 +1388,7 @@ ucnv_getNextUChar(UConverter * converter,
*
* ucnv_convertEx() also provides further convenience:
* - an option to reset the converters at the beginning
- * (if reset==TRUE, see parameters;
+ * (if reset==true, see parameters;
* also sets *pivotTarget=*pivotSource=pivotStart)
* - allow NUL-terminated input
* (only a single NUL byte, will not work for charsets with multi-byte NULs)
@@ -1442,7 +1445,7 @@ ucnv_getNextUChar(UConverter * converter,
* &target, u8+capacity,
* &s, s+length,
* NULL, NULL, NULL, NULL,
- * TRUE, TRUE,
+ * true, true,
* pErrorCode);
*
* myReleaseCachedUTF8Converter(utf8Cnv);
@@ -1474,7 +1477,7 @@ ucnv_getNextUChar(UConverter * converter,
* It must be pivotStart<=*pivotSource<=*pivotTarget<=pivotLimit
* and pivotStartNULL is returned. Owned by the library.
* @stable ICU 2.0
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucnv_getStandardName(const char *name, const char *standard, UErrorCode *pErrorCode);
/**
@@ -1853,7 +1856,7 @@ ucnv_getStandardName(const char *name, const char *standard, UErrorCode *pErrorC
* @see ucnv_getStandardName
* @stable ICU 2.4
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucnv_getCanonicalName(const char *alias, const char *standard, UErrorCode *pErrorCode);
/**
@@ -1870,7 +1873,7 @@ ucnv_getCanonicalName(const char *alias, const char *standard, UErrorCode *pErro
* @see ucnv_setDefaultName
* @stable ICU 2.0
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucnv_getDefaultName(void);
#ifndef U_HIDE_SYSTEM_API
@@ -1890,7 +1893,7 @@ ucnv_getDefaultName(void);
* @system
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_setDefaultName(const char *name);
#endif /* U_HIDE_SYSTEM_API */
@@ -1911,18 +1914,18 @@ ucnv_setDefaultName(const char *name);
* @see ucnv_isAmbiguous
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_fixFileSeparator(const UConverter *cnv, UChar *source, int32_t sourceLen);
/**
* Determines if the converter contains ambiguous mappings of the same
* character or not.
* @param cnv the converter to be tested
- * @return TRUE if the converter contains ambiguous mapping of the same
- * character, FALSE otherwise.
+ * @return true if the converter contains ambiguous mapping of the same
+ * character, false otherwise.
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucnv_isAmbiguous(const UConverter *cnv);
/**
@@ -1935,12 +1938,12 @@ ucnv_isAmbiguous(const UConverter *cnv);
* http://www.icu-project.org/userguide/conversion-data.html#ucmformat
*
* @param cnv The converter to set the fallback mapping usage on.
- * @param usesFallback TRUE if the user wants the converter to take advantage of the fallback
- * mapping, FALSE otherwise.
+ * @param usesFallback true if the user wants the converter to take advantage of the fallback
+ * mapping, false otherwise.
* @stable ICU 2.0
* @see ucnv_usesFallback
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_setFallback(UConverter *cnv, UBool usesFallback);
/**
@@ -1948,11 +1951,11 @@ ucnv_setFallback(UConverter *cnv, UBool usesFallback);
* This flag has restrictions, see ucnv_setFallback().
*
* @param cnv The converter to be tested
- * @return TRUE if the converter uses fallback, FALSE otherwise.
+ * @return true if the converter uses fallback, false otherwise.
* @stable ICU 2.0
* @see ucnv_setFallback
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucnv_usesFallback(const UConverter *cnv);
/**
@@ -1984,7 +1987,7 @@ ucnv_usesFallback(const UConverter *cnv);
* @return The name of the encoding detected. NULL if encoding is not detected.
* @stable ICU 2.4
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
ucnv_detectUnicodeSignature(const char* source,
int32_t sourceLength,
int32_t *signatureLength,
@@ -2001,7 +2004,7 @@ ucnv_detectUnicodeSignature(const char* source,
* @return The number of UChars in the state. -1 if an error is encountered.
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_fromUCountPending(const UConverter* cnv, UErrorCode* status);
/**
@@ -2015,7 +2018,7 @@ ucnv_fromUCountPending(const UConverter* cnv, UErrorCode* status);
* @return The number of chars in the state. -1 if an error is encountered.
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status);
/**
@@ -2027,13 +2030,13 @@ ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status);
* but a UTF-32 converter encodes each code point with 4 bytes.
* Note: This method is not intended to be used to determine whether the charset has a
* fixed ratio of bytes to Unicode codes units for any particular Unicode encoding form.
- * FALSE is returned with the UErrorCode if error occurs or cnv is NULL.
+ * false is returned with the UErrorCode if error occurs or cnv is NULL.
* @param cnv The converter to be tested
* @param status ICU error code in/out paramter
- * @return TRUE if the converter is fixed-width
+ * @return true if the converter is fixed-width
* @stable ICU 4.8
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status);
#endif
diff --git a/deps/icu-small/source/common/unicode/ucnv_cb.h b/deps/icu-small/source/common/unicode/ucnv_cb.h
index 632cc0b35f26c5..18240990dbaed9 100644
--- a/deps/icu-small/source/common/unicode/ucnv_cb.h
+++ b/deps/icu-small/source/common/unicode/ucnv_cb.h
@@ -84,7 +84,7 @@
* @see ucnv_cbFromUWriteSub
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_cbFromUWriteBytes (UConverterFromUnicodeArgs *args,
const char* source,
int32_t length,
@@ -104,7 +104,7 @@ ucnv_cbFromUWriteBytes (UConverterFromUnicodeArgs *args,
* @see ucnv_cbFromUWriteBytes
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_cbFromUWriteSub (UConverterFromUnicodeArgs *args,
int32_t offsetIndex,
UErrorCode * err);
@@ -121,7 +121,7 @@ ucnv_cbFromUWriteSub (UConverterFromUnicodeArgs *args,
* @see ucnv_cbToUWriteSub
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args,
+U_CAPI void U_EXPORT2 ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args,
const UChar** source,
const UChar* sourceLimit,
int32_t offsetIndex,
@@ -140,7 +140,7 @@ U_STABLE void U_EXPORT2 ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args,
* @see ucnv_cbToUWriteSub
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 ucnv_cbToUWriteUChars (UConverterToUnicodeArgs *args,
+U_CAPI void U_EXPORT2 ucnv_cbToUWriteUChars (UConverterToUnicodeArgs *args,
const UChar* source,
int32_t length,
int32_t offsetIndex,
@@ -156,7 +156,7 @@ U_STABLE void U_EXPORT2 ucnv_cbToUWriteUChars (UConverterToUnicodeArgs *args,
* @see ucnv_cbToUWriteUChars
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 ucnv_cbToUWriteSub (UConverterToUnicodeArgs *args,
+U_CAPI void U_EXPORT2 ucnv_cbToUWriteSub (UConverterToUnicodeArgs *args,
int32_t offsetIndex,
UErrorCode * err);
#endif
diff --git a/deps/icu-small/source/common/unicode/ucnv_err.h b/deps/icu-small/source/common/unicode/ucnv_err.h
index 08c96c14407c22..bff90f0ba1e1d4 100644
--- a/deps/icu-small/source/common/unicode/ucnv_err.h
+++ b/deps/icu-small/source/common/unicode/ucnv_err.h
@@ -193,7 +193,7 @@ typedef enum {
*/
typedef struct {
uint16_t size; /**< The size of this struct. @stable ICU 2.0 */
- UBool flush; /**< The internal state of converter will be reset and data flushed if set to TRUE. @stable ICU 2.0 */
+ UBool flush; /**< The internal state of converter will be reset and data flushed if set to true. @stable ICU 2.0 */
UConverter *converter; /**< Pointer to the converter that is opened and to which this struct is passed as an argument. @stable ICU 2.0 */
const UChar *source; /**< Pointer to the source source buffer. @stable ICU 2.0 */
const UChar *sourceLimit; /**< Pointer to the limit (end + 1) of source buffer. @stable ICU 2.0 */
@@ -209,7 +209,7 @@ typedef struct {
*/
typedef struct {
uint16_t size; /**< The size of this struct @stable ICU 2.0 */
- UBool flush; /**< The internal state of converter will be reset and data flushed if set to TRUE. @stable ICU 2.0 */
+ UBool flush; /**< The internal state of converter will be reset and data flushed if set to true. @stable ICU 2.0 */
UConverter *converter; /**< Pointer to the converter that is opened and to which this struct is passed as an argument. @stable ICU 2.0 */
const char *source; /**< Pointer to the source source buffer. @stable ICU 2.0 */
const char *sourceLimit; /**< Pointer to the limit (end + 1) of source buffer. @stable ICU 2.0 */
@@ -233,7 +233,7 @@ typedef struct {
* @param err This should always be set to a failure status prior to calling.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP (
+U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP (
const void *context,
UConverterFromUnicodeArgs *fromUArgs,
const UChar* codeUnits,
@@ -257,7 +257,7 @@ U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP (
* @param err This should always be set to a failure status prior to calling.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (
+U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (
const void *context,
UConverterToUnicodeArgs *toUArgs,
const char* codeUnits,
@@ -284,7 +284,7 @@ U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (
* otherwise this value will be set to a failure status.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP (
+U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP (
const void *context,
UConverterFromUnicodeArgs *fromUArgs,
const UChar* codeUnits,
@@ -314,7 +314,7 @@ U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP (
* @see ucnv_setSubstChars
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (
+U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (
const void *context,
UConverterFromUnicodeArgs *fromUArgs,
const UChar* codeUnits,
@@ -370,7 +370,7 @@ U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (
* otherwise this value will be set to a failure status.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (
+U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (
const void *context,
UConverterFromUnicodeArgs *fromUArgs,
const UChar* codeUnits,
@@ -398,7 +398,7 @@ U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (
* otherwise this value will be set to a failure status.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP (
+U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP (
const void *context,
UConverterToUnicodeArgs *toUArgs,
const char* codeUnits,
@@ -424,7 +424,7 @@ U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP (
* otherwise this value will be set to a failure status.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE (
+U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE (
const void *context,
UConverterToUnicodeArgs *toUArgs,
const char* codeUnits,
@@ -450,7 +450,7 @@ U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE (
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_ESCAPE (
+U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_ESCAPE (
const void *context,
UConverterToUnicodeArgs *toUArgs,
const char* codeUnits,
diff --git a/deps/icu-small/source/common/unicode/ucnvsel.h b/deps/icu-small/source/common/unicode/ucnvsel.h
index 5fee53f179ace7..b84bc86bed2659 100644
--- a/deps/icu-small/source/common/unicode/ucnvsel.h
+++ b/deps/icu-small/source/common/unicode/ucnvsel.h
@@ -29,7 +29,10 @@
#include "unicode/utf16.h"
#include "unicode/uenum.h"
#include "unicode/ucnv.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -72,7 +75,7 @@ typedef struct UConverterSelector UConverterSelector;
*
* @stable ICU 4.2
*/
-U_STABLE UConverterSelector* U_EXPORT2
+U_CAPI UConverterSelector* U_EXPORT2
ucnvsel_open(const char* const* converterList, int32_t converterListSize,
const USet* excludedCodePoints,
const UConverterUnicodeSet whichSet, UErrorCode* status);
@@ -90,7 +93,7 @@ ucnvsel_open(const char* const* converterList, int32_t converterListSize,
*
* @stable ICU 4.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnvsel_close(UConverterSelector *sel);
#if U_SHOW_CPLUSPLUS_API
@@ -127,7 +130,7 @@ U_NAMESPACE_END
*
* @stable ICU 4.2
*/
-U_STABLE UConverterSelector* U_EXPORT2
+U_CAPI UConverterSelector* U_EXPORT2
ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* status);
/**
@@ -144,7 +147,7 @@ ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* statu
*
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnvsel_serialize(const UConverterSelector* sel,
void* buffer, int32_t bufferCapacity, UErrorCode* status);
@@ -162,7 +165,7 @@ ucnvsel_serialize(const UConverterSelector* sel,
*
* @stable ICU 4.2
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
ucnvsel_selectForString(const UConverterSelector* sel,
const UChar *s, int32_t length, UErrorCode *status);
@@ -180,7 +183,7 @@ ucnvsel_selectForString(const UConverterSelector* sel,
*
* @stable ICU 4.2
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
ucnvsel_selectForUTF8(const UConverterSelector* sel,
const char *s, int32_t length, UErrorCode *status);
diff --git a/deps/icu-small/source/common/unicode/ucptrie.h b/deps/icu-small/source/common/unicode/ucptrie.h
index be06a227928286..b95491b183e9af 100644
--- a/deps/icu-small/source/common/unicode/ucptrie.h
+++ b/deps/icu-small/source/common/unicode/ucptrie.h
@@ -8,11 +8,13 @@
#define __UCPTRIE_H__
#include "unicode/utypes.h"
-
-#include "unicode/localpointer.h"
#include "unicode/ucpmap.h"
#include "unicode/utf8.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
U_CDECL_BEGIN
/**
@@ -580,11 +582,11 @@ enum {
// Do not conditionalize with #ifndef U_HIDE_INTERNAL_API, needed for public API
/** @internal */
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucptrie_internalSmallIndex(const UCPTrie *trie, UChar32 c);
/** @internal */
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucptrie_internalSmallU8Index(const UCPTrie *trie, int32_t lt1, uint8_t t2, uint8_t t3);
/**
@@ -592,7 +594,7 @@ ucptrie_internalSmallU8Index(const UCPTrie *trie, int32_t lt1, uint8_t t2, uint8
* Do not call directly.
* @internal
*/
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucptrie_internalU8PrevIndex(const UCPTrie *trie, UChar32 c,
const uint8_t *start, const uint8_t *src);
diff --git a/deps/icu-small/source/common/unicode/ucurr.h b/deps/icu-small/source/common/unicode/ucurr.h
index 7149e7adf13067..4e115cd01e0fb6 100644
--- a/deps/icu-small/source/common/unicode/ucurr.h
+++ b/deps/icu-small/source/common/unicode/ucurr.h
@@ -78,7 +78,7 @@ typedef enum UCurrencyUsage UCurrencyUsage;
* invalid.
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucurr_forLocale(const char* locale,
UChar* buff,
int32_t buffCapacity,
@@ -113,7 +113,29 @@ typedef enum UCurrNameStyle {
*
* @stable ICU 61
*/
- UCURR_NARROW_SYMBOL_NAME
+ UCURR_NARROW_SYMBOL_NAME,
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Selector for getName() indicating the formal currency symbol.
+ * The formal currency symbol is similar to the regular currency
+ * symbol, but it always takes the form used in formal settings
+ * such as banking; for example, "NT$" instead of "$" for TWD in zh-TW.
+ *
+ * @draft ICU 68
+ */
+ UCURR_FORMAL_SYMBOL_NAME,
+
+ /**
+ * Selector for getName() indicating the variant currency symbol.
+ * The variant symbol for a currency is an alternative symbol
+ * that is not necessarily as widely used as the regular symbol.
+ *
+ * @draft ICU 68
+ */
+ UCURR_VARIANT_SYMBOL_NAME
+#endif // U_HIDE_DRAFT_API
+
} UCurrNameStyle;
#if !UCONFIG_NO_SERVICE
@@ -133,7 +155,7 @@ typedef const void* UCurrRegistryKey;
* if there was an error.
* @stable ICU 2.6
*/
-U_STABLE UCurrRegistryKey U_EXPORT2
+U_CAPI UCurrRegistryKey U_EXPORT2
ucurr_register(const UChar* isoCode,
const char* locale,
UErrorCode* status);
@@ -145,10 +167,10 @@ ucurr_register(const UChar* isoCode,
* restored.
* @param key the registry key returned by a previous call to ucurr_register
* @param status the in/out status code, no special meanings are assigned
- * @return TRUE if the currency for this key was successfully unregistered
+ * @return true if the currency for this key was successfully unregistered
* @stable ICU 2.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucurr_unregister(UCurrRegistryKey key, UErrorCode* status);
#endif /* UCONFIG_NO_SERVICE */
@@ -159,7 +181,7 @@ ucurr_unregister(UCurrRegistryKey key, UErrorCode* status);
* @param currency null-terminated 3-letter ISO 4217 code
* @param locale locale in which to display currency
* @param nameStyle selector for which kind of name to return
- * @param isChoiceFormat always set to FALSE, or can be NULL;
+ * @param isChoiceFormat always set to false, or can be NULL;
* display names are static strings;
* since ICU 4.4, ChoiceFormat patterns are no longer supported
* @param len fill-in parameter to receive length of result
@@ -169,7 +191,7 @@ ucurr_unregister(UCurrRegistryKey key, UErrorCode* status);
* returned.
* @stable ICU 2.6
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ucurr_getName(const UChar* currency,
const char* locale,
UCurrNameStyle nameStyle,
@@ -183,7 +205,7 @@ ucurr_getName(const UChar* currency,
* currency object in the en_US locale is "US dollar" or "US dollars".
* @param currency null-terminated 3-letter ISO 4217 code
* @param locale locale in which to display currency
- * @param isChoiceFormat always set to FALSE, or can be NULL;
+ * @param isChoiceFormat always set to false, or can be NULL;
* display names are static strings;
* since ICU 4.4, ChoiceFormat patterns are no longer supported
* @param pluralCount plural count
@@ -194,7 +216,7 @@ ucurr_getName(const UChar* currency,
* returned.
* @stable ICU 4.2
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ucurr_getPluralName(const UChar* currency,
const char* locale,
UBool* isChoiceFormat,
@@ -219,7 +241,7 @@ ucurr_getPluralName(const UChar* currency,
* displayed, or 0 if there is an error
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucurr_getDefaultFractionDigits(const UChar* currency,
UErrorCode* ec);
@@ -240,7 +262,7 @@ ucurr_getDefaultFractionDigits(const UChar* currency,
* displayed, or 0 if there is an error
* @stable ICU 54
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucurr_getDefaultFractionDigitsForUsage(const UChar* currency,
const UCurrencyUsage usage,
UErrorCode* ec);
@@ -255,7 +277,7 @@ ucurr_getDefaultFractionDigitsForUsage(const UChar* currency,
* or 0.0 if there is an error
* @stable ICU 3.0
*/
-U_STABLE double U_EXPORT2
+U_CAPI double U_EXPORT2
ucurr_getRoundingIncrement(const UChar* currency,
UErrorCode* ec);
@@ -269,7 +291,7 @@ ucurr_getRoundingIncrement(const UChar* currency,
* or 0.0 if there is an error
* @stable ICU 54
*/
-U_STABLE double U_EXPORT2
+U_CAPI double U_EXPORT2
ucurr_getRoundingIncrementForUsage(const UChar* currency,
const UCurrencyUsage usage,
UErrorCode* ec);
@@ -326,7 +348,7 @@ typedef enum UCurrCurrencyType {
* @param pErrorCode Error code
* @stable ICU 3.2
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
/**
@@ -351,11 +373,11 @@ ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
* @param errorCode
* ICU error code
*
- * @return TRUE if the given ISO 4217 3-letter code is supported on the specified date range.
+ * @return true if the given ISO 4217 3-letter code is supported on the specified date range.
*
* @stable ICU 4.8
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucurr_isAvailable(const UChar* isoCode,
UDate from,
UDate to,
@@ -375,7 +397,7 @@ ucurr_isAvailable(const UChar* isoCode,
* values are invalid.
* @stable ICU 4.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucurr_countCurrencies(const char* locale,
UDate date,
UErrorCode* ec);
@@ -399,7 +421,7 @@ ucurr_countCurrencies(const char* locale,
* invalid.
* @stable ICU 4.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucurr_forLocaleAndDate(const char* locale,
UDate date,
int32_t index,
@@ -423,7 +445,7 @@ ucurr_forLocaleAndDate(const char* locale,
* @return a string enumeration over keyword values for the given key and the locale.
* @stable ICU 4.2
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
ucurr_getKeywordValuesForLocale(const char* key,
const char* locale,
UBool commonlyUsed,
@@ -438,7 +460,7 @@ ucurr_getKeywordValuesForLocale(const char* key,
* @return The ISO 4217 numeric code of the currency
* @stable ICU 49
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucurr_getNumericCode(const UChar* currency);
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/deps/icu-small/source/common/unicode/udata.h b/deps/icu-small/source/common/unicode/udata.h
index 8236877b443d3d..88c0dded118d00 100644
--- a/deps/icu-small/source/common/unicode/udata.h
+++ b/deps/icu-small/source/common/unicode/udata.h
@@ -20,7 +20,10 @@
#define __UDATA_H__
#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
U_CDECL_BEGIN
@@ -166,8 +169,8 @@ typedef struct UDataMemory UDataMemory;
* @param pInfo A pointer to the UDataInfo
structure
* of data that has been loaded and will be returned
* by udata_openChoice()
if this function
- * returns TRUE
.
- * @return TRUE if the current data memory is acceptable
+ * returns true
.
+ * @return true if the current data memory is acceptable
* @stable ICU 2.0
*/
typedef UBool U_CALLCONV
@@ -197,7 +200,7 @@ UDataMemoryIsAcceptable(void *context,
* @see udata_openChoice
* @stable ICU 2.0
*/
-U_STABLE UDataMemory * U_EXPORT2
+U_CAPI UDataMemory * U_EXPORT2
udata_open(const char *path, const char *type, const char *name,
UErrorCode *pErrorCode);
@@ -239,7 +242,7 @@ udata_open(const char *path, const char *type, const char *name,
* This may be NULL
or empty.
* @param name A string that specifies the name of the data.
* @param isAcceptable This function is called to verify that loaded data
- * is useful for the client code. If it returns FALSE
+ * is useful for the client code. If it returns false
* for all data items, then udata_openChoice()
* will return with an error.
* @param context Arbitrary parameter to be passed into isAcceptable.
@@ -249,7 +252,7 @@ udata_open(const char *path, const char *type, const char *name,
* to get a pointer to the actual data.
* @stable ICU 2.0
*/
-U_STABLE UDataMemory * U_EXPORT2
+U_CAPI UDataMemory * U_EXPORT2
udata_openChoice(const char *path, const char *type, const char *name,
UDataMemoryIsAcceptable *isAcceptable, void *context,
UErrorCode *pErrorCode);
@@ -261,7 +264,7 @@ udata_openChoice(const char *path, const char *type, const char *name,
* @param pData The pointer to data memory object
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udata_close(UDataMemory *pData);
/**
@@ -273,7 +276,7 @@ udata_close(UDataMemory *pData);
* @param pData The pointer to data memory object
* @stable ICU 2.0
*/
-U_STABLE const void * U_EXPORT2
+U_CAPI const void * U_EXPORT2
udata_getMemory(UDataMemory *pData);
/**
@@ -294,7 +297,7 @@ udata_getMemory(UDataMemory *pData);
* adjusted and only part of the structure will be filled.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
/**
@@ -303,7 +306,7 @@ udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
* area in memory.
*
* ICU data must be at least 8-aligned, and should be 16-aligned.
- * See http://userguide.icu-project.org/icudata
+ * See https://unicode-org.github.io/icu/userguide/icudata
*
* The format of this data is that of the icu common data file, as is
* generated by the pkgdata tool with mode=common or mode=dll.
@@ -340,7 +343,7 @@ udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
* @param err outgoing error status U_USING_DEFAULT_WARNING, U_UNSUPPORTED_ERROR
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udata_setCommonData(const void *data, UErrorCode *err);
@@ -350,7 +353,7 @@ udata_setCommonData(const void *data, UErrorCode *err);
* pointer.
*
* ICU data must be at least 8-aligned, and should be 16-aligned.
- * See http://userguide.icu-project.org/icudata
+ * See https://unicode-org.github.io/icu/userguide/icudata
*
* The format of this data is that of the icu common data file, like 'icudt26l.dat'
* or the corresponding shared library (DLL) file.
@@ -371,7 +374,7 @@ udata_setCommonData(const void *data, UErrorCode *err);
* @see udata_setCommonData
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udata_setAppData(const char *packageName, const void *data, UErrorCode *err);
/**
@@ -410,7 +413,7 @@ typedef enum UDataFileAccess {
* @see UDataFileAccess
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udata_setFileAccess(UDataFileAccess access, UErrorCode *status);
U_CDECL_END
diff --git a/deps/icu-small/source/common/unicode/udisplaycontext.h b/deps/icu-small/source/common/unicode/udisplaycontext.h
index 398481c6812247..6e1421798054f6 100644
--- a/deps/icu-small/source/common/unicode/udisplaycontext.h
+++ b/deps/icu-small/source/common/unicode/udisplaycontext.h
@@ -156,7 +156,8 @@ enum UDisplayContext {
UDISPCTX_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 0,
/**
* A possible setting for SUBSTITUTE_HANDLING:
- * Returns a null value when no data is available.
+ * Returns a null value with error code set to U_ILLEGAL_ARGUMENT_ERROR when no
+ * data is available.
* @stable ICU 58
*/
UDISPCTX_NO_SUBSTITUTE = (UDISPCTX_TYPE_SUBSTITUTE_HANDLING<<8) + 1
diff --git a/deps/icu-small/source/common/unicode/uenum.h b/deps/icu-small/source/common/unicode/uenum.h
index eb8ecdf88b6ec5..f1c506934bec87 100644
--- a/deps/icu-small/source/common/unicode/uenum.h
+++ b/deps/icu-small/source/common/unicode/uenum.h
@@ -20,13 +20,14 @@
#define __UENUM_H
#include "unicode/utypes.h"
-#include "unicode/localpointer.h"
#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+
U_NAMESPACE_BEGIN
class StringEnumeration;
U_NAMESPACE_END
-#endif
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -49,7 +50,7 @@ typedef struct UEnumeration UEnumeration;
* @param en UEnumeration structure pointer
* @stable ICU 2.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uenum_close(UEnumeration* en);
#if U_SHOW_CPLUSPLUS_API
@@ -85,7 +86,7 @@ U_NAMESPACE_END
* @return number of elements in the iterator
* @stable ICU 2.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uenum_count(UEnumeration* en, UErrorCode* status);
/**
@@ -109,7 +110,7 @@ uenum_count(UEnumeration* en, UErrorCode* status);
* traversed, returns NULL.
* @stable ICU 2.2
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
uenum_unext(UEnumeration* en,
int32_t* resultLength,
UErrorCode* status);
@@ -142,7 +143,7 @@ uenum_unext(UEnumeration* en,
* traversed, returns NULL.
* @stable ICU 2.2
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uenum_next(UEnumeration* en,
int32_t* resultLength,
UErrorCode* status);
@@ -156,7 +157,7 @@ uenum_next(UEnumeration* en,
* the iterator is out of sync with its service.
* @stable ICU 2.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uenum_reset(UEnumeration* en, UErrorCode* status);
#if U_SHOW_CPLUSPLUS_API
@@ -170,7 +171,7 @@ uenum_reset(UEnumeration* en, UErrorCode* status);
* @return a UEnumeration wrapping the adopted StringEnumeration.
* @stable ICU 4.2
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode* ec);
#endif
@@ -186,7 +187,7 @@ uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode* ec)
* @see uenum_close
* @stable ICU 50
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
UErrorCode* ec);
@@ -201,7 +202,7 @@ uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
* @see uenum_close
* @stable ICU 50
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uenum_openCharStringsEnumeration(const char* const strings[], int32_t count,
UErrorCode* ec);
diff --git a/deps/icu-small/source/common/unicode/uidna.h b/deps/icu-small/source/common/unicode/uidna.h
index cb79ba8545008e..1f75562555c3c2 100644
--- a/deps/icu-small/source/common/unicode/uidna.h
+++ b/deps/icu-small/source/common/unicode/uidna.h
@@ -23,9 +23,13 @@
#if !UCONFIG_NO_IDNA
-#include "unicode/localpointer.h"
+#include
#include "unicode/parseerr.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: Internationalizing Domain Names in Applications (IDNA)
@@ -138,7 +142,7 @@ typedef struct UIDNA UIDNA; /**< C typedef for struct UIDNA. @stable ICU 4.6 */
* @return the UTS #46 UIDNA instance, if successful
* @stable ICU 4.6
*/
-U_STABLE UIDNA * U_EXPORT2
+U_CAPI UIDNA * U_EXPORT2
uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode);
/**
@@ -146,7 +150,7 @@ uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode);
* @param idna UIDNA instance to be closed
* @stable ICU 4.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uidna_close(UIDNA *idna);
#if U_SHOW_CPLUSPLUS_API
@@ -182,7 +186,7 @@ typedef struct UIDNAInfo {
/** sizeof(UIDNAInfo) @stable ICU 4.6 */
int16_t size;
/**
- * Set to TRUE if transitional and nontransitional processing produce different results.
+ * Set to true if transitional and nontransitional processing produce different results.
* For details see C++ IDNAInfo::isTransitionalDifferent().
* @stable ICU 4.6
*/
@@ -204,7 +208,7 @@ typedef struct UIDNAInfo {
*/
#define UIDNA_INFO_INITIALIZER { \
(int16_t)sizeof(UIDNAInfo), \
- FALSE, FALSE, \
+ false, false, \
0, 0, 0 }
/**
@@ -230,7 +234,7 @@ typedef struct UIDNAInfo {
* @return destination string length
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uidna_labelToASCII(const UIDNA *idna,
const UChar *label, int32_t length,
UChar *dest, int32_t capacity,
@@ -257,7 +261,7 @@ uidna_labelToASCII(const UIDNA *idna,
* @return destination string length
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uidna_labelToUnicode(const UIDNA *idna,
const UChar *label, int32_t length,
UChar *dest, int32_t capacity,
@@ -286,7 +290,7 @@ uidna_labelToUnicode(const UIDNA *idna,
* @return destination string length
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uidna_nameToASCII(const UIDNA *idna,
const UChar *name, int32_t length,
UChar *dest, int32_t capacity,
@@ -313,7 +317,7 @@ uidna_nameToASCII(const UIDNA *idna,
* @return destination string length
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uidna_nameToUnicode(const UIDNA *idna,
const UChar *name, int32_t length,
UChar *dest, int32_t capacity,
@@ -338,7 +342,7 @@ uidna_nameToUnicode(const UIDNA *idna,
* @return destination string length
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uidna_labelToASCII_UTF8(const UIDNA *idna,
const char *label, int32_t length,
char *dest, int32_t capacity,
@@ -361,7 +365,7 @@ uidna_labelToASCII_UTF8(const UIDNA *idna,
* @return destination string length
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uidna_labelToUnicodeUTF8(const UIDNA *idna,
const char *label, int32_t length,
char *dest, int32_t capacity,
@@ -384,7 +388,7 @@ uidna_labelToUnicodeUTF8(const UIDNA *idna,
* @return destination string length
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uidna_nameToASCII_UTF8(const UIDNA *idna,
const char *name, int32_t length,
char *dest, int32_t capacity,
@@ -407,7 +411,7 @@ uidna_nameToASCII_UTF8(const UIDNA *idna,
* @return destination string length
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uidna_nameToUnicodeUTF8(const UIDNA *idna,
const char *name, int32_t length,
char *dest, int32_t capacity,
diff --git a/deps/icu-small/source/common/unicode/uiter.h b/deps/icu-small/source/common/unicode/uiter.h
index 3b8537204cecfa..7dbe1266668f24 100644
--- a/deps/icu-small/source/common/unicode/uiter.h
+++ b/deps/icu-small/source/common/unicode/uiter.h
@@ -492,7 +492,7 @@ struct UCharIterator {
* @see UnicodeString::char32At()
* @stable ICU 2.1
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
uiter_current32(UCharIterator *iter);
/**
@@ -509,7 +509,7 @@ uiter_current32(UCharIterator *iter);
* @see U16_NEXT
* @stable ICU 2.1
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
uiter_next32(UCharIterator *iter);
/**
@@ -526,7 +526,7 @@ uiter_next32(UCharIterator *iter);
* @see U16_PREV
* @stable ICU 2.1
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
uiter_previous32(UCharIterator *iter);
/**
@@ -547,7 +547,7 @@ uiter_previous32(UCharIterator *iter);
* @see UITER_NO_STATE
* @stable ICU 2.6
*/
-U_STABLE uint32_t U_EXPORT2
+U_CAPI uint32_t U_EXPORT2
uiter_getState(const UCharIterator *iter);
/**
@@ -565,7 +565,7 @@ uiter_getState(const UCharIterator *iter);
* @see UCharIteratorSetState
* @stable ICU 2.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uiter_setState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode);
/**
@@ -590,7 +590,7 @@ uiter_setState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode);
* @see UCharIterator
* @stable ICU 2.1
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uiter_setString(UCharIterator *iter, const UChar *s, int32_t length);
/**
@@ -613,7 +613,7 @@ uiter_setString(UCharIterator *iter, const UChar *s, int32_t length);
* @see uiter_setString
* @stable ICU 2.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uiter_setUTF16BE(UCharIterator *iter, const char *s, int32_t length);
/**
@@ -649,7 +649,7 @@ uiter_setUTF16BE(UCharIterator *iter, const char *s, int32_t length);
* @see UCharIterator
* @stable ICU 2.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uiter_setUTF8(UCharIterator *iter, const char *s, int32_t length);
#if U_SHOW_CPLUSPLUS_API
@@ -674,7 +674,7 @@ uiter_setUTF8(UCharIterator *iter, const char *s, int32_t length);
* @see UCharIterator
* @stable ICU 2.1
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uiter_setCharacterIterator(UCharIterator *iter, icu::CharacterIterator *charIter);
/**
@@ -699,7 +699,7 @@ uiter_setCharacterIterator(UCharIterator *iter, icu::CharacterIterator *charIter
* @see UCharIterator
* @stable ICU 2.1
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uiter_setReplaceable(UCharIterator *iter, const icu::Replaceable *rep);
#endif
diff --git a/deps/icu-small/source/common/unicode/uldnames.h b/deps/icu-small/source/common/unicode/uldnames.h
index 3a3c0a06573c36..10f0e91e5526e4 100644
--- a/deps/icu-small/source/common/unicode/uldnames.h
+++ b/deps/icu-small/source/common/unicode/uldnames.h
@@ -16,10 +16,13 @@
*/
#include "unicode/utypes.h"
-#include "unicode/localpointer.h"
#include "unicode/uscript.h"
#include "unicode/udisplaycontext.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* Enum used in LocaleDisplayNames::createInstance.
* @stable ICU 4.4
@@ -65,7 +68,7 @@ typedef struct ULocaleDisplayNames ULocaleDisplayNames;
* @param pErrorCode the status code
* @stable ICU 4.4
*/
-U_STABLE ULocaleDisplayNames * U_EXPORT2
+U_CAPI ULocaleDisplayNames * U_EXPORT2
uldn_open(const char * locale,
UDialectHandling dialectHandling,
UErrorCode *pErrorCode);
@@ -75,7 +78,7 @@ uldn_open(const char * locale,
* @param ldn the ULocaleDisplayNames instance to be closed
* @stable ICU 4.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uldn_close(ULocaleDisplayNames *ldn);
#if U_SHOW_CPLUSPLUS_API
@@ -106,7 +109,7 @@ U_NAMESPACE_END
* @return the display locale
* @stable ICU 4.4
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
uldn_getLocale(const ULocaleDisplayNames *ldn);
/**
@@ -115,7 +118,7 @@ uldn_getLocale(const ULocaleDisplayNames *ldn);
* @return the dialect handling enum
* @stable ICU 4.4
*/
-U_STABLE UDialectHandling U_EXPORT2
+U_CAPI UDialectHandling U_EXPORT2
uldn_getDialectHandling(const ULocaleDisplayNames *ldn);
/* names for entire locales */
@@ -131,7 +134,7 @@ uldn_getDialectHandling(const ULocaleDisplayNames *ldn);
* greater than maxResultSize, the returned name will be truncated.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uldn_localeDisplayName(const ULocaleDisplayNames *ldn,
const char *locale,
UChar *result,
@@ -151,7 +154,7 @@ uldn_localeDisplayName(const ULocaleDisplayNames *ldn,
* greater than maxResultSize, the returned name will be truncated.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uldn_languageDisplayName(const ULocaleDisplayNames *ldn,
const char *lang,
UChar *result,
@@ -169,7 +172,7 @@ uldn_languageDisplayName(const ULocaleDisplayNames *ldn,
* greater than maxResultSize, the returned name will be truncated.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uldn_scriptDisplayName(const ULocaleDisplayNames *ldn,
const char *script,
UChar *result,
@@ -187,7 +190,7 @@ uldn_scriptDisplayName(const ULocaleDisplayNames *ldn,
* greater than maxResultSize, the returned name will be truncated.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uldn_scriptCodeDisplayName(const ULocaleDisplayNames *ldn,
UScriptCode scriptCode,
UChar *result,
@@ -205,7 +208,7 @@ uldn_scriptCodeDisplayName(const ULocaleDisplayNames *ldn,
* greater than maxResultSize, the returned name will be truncated.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uldn_regionDisplayName(const ULocaleDisplayNames *ldn,
const char *region,
UChar *result,
@@ -223,7 +226,7 @@ uldn_regionDisplayName(const ULocaleDisplayNames *ldn,
* greater than maxResultSize, the returned name will be truncated.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uldn_variantDisplayName(const ULocaleDisplayNames *ldn,
const char *variant,
UChar *result,
@@ -241,7 +244,7 @@ uldn_variantDisplayName(const ULocaleDisplayNames *ldn,
* greater than maxResultSize, the returned name will be truncated.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uldn_keyDisplayName(const ULocaleDisplayNames *ldn,
const char *key,
UChar *result,
@@ -260,7 +263,7 @@ uldn_keyDisplayName(const ULocaleDisplayNames *ldn,
* greater than maxResultSize, the returned name will be truncated.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
const char *key,
const char *value,
@@ -282,7 +285,7 @@ uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
* @return a ULocaleDisplayNames instance
* @stable ICU 51
*/
-U_STABLE ULocaleDisplayNames * U_EXPORT2
+U_CAPI ULocaleDisplayNames * U_EXPORT2
uldn_openForContext(const char * locale, UDisplayContext *contexts,
int32_t length, UErrorCode *pErrorCode);
@@ -296,7 +299,7 @@ uldn_openForContext(const char * locale, UDisplayContext *contexts,
* @return the UDisplayContextValue for the specified type.
* @stable ICU 51
*/
-U_STABLE UDisplayContext U_EXPORT2
+U_CAPI UDisplayContext U_EXPORT2
uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type,
UErrorCode *pErrorCode);
diff --git a/deps/icu-small/source/common/unicode/uloc.h b/deps/icu-small/source/common/unicode/uloc.h
index a10ab526cec141..56fb4c9b3769e0 100644
--- a/deps/icu-small/source/common/unicode/uloc.h
+++ b/deps/icu-small/source/common/unicode/uloc.h
@@ -371,7 +371,7 @@ typedef enum {
* @system
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uloc_getDefault(void);
/**
@@ -391,7 +391,7 @@ uloc_getDefault(void);
* @system
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uloc_setDefault(const char* localeID,
UErrorCode* status);
#endif /* U_HIDE_SYSTEM_API */
@@ -408,7 +408,7 @@ uloc_setDefault(const char* localeID,
* than languageCapacity, the returned language code will be truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getLanguage(const char* localeID,
char* language,
int32_t languageCapacity,
@@ -426,7 +426,7 @@ uloc_getLanguage(const char* localeID,
* than scriptCapacity, the returned language code will be truncated.
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getScript(const char* localeID,
char* script,
int32_t scriptCapacity,
@@ -444,7 +444,7 @@ uloc_getScript(const char* localeID,
* than countryCapacity, the returned country code will be truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getCountry(const char* localeID,
char* country,
int32_t countryCapacity,
@@ -462,7 +462,7 @@ uloc_getCountry(const char* localeID,
* than variantCapacity, the returned variant code will be truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getVariant(const char* localeID,
char* variant,
int32_t variantCapacity,
@@ -485,7 +485,7 @@ uloc_getVariant(const char* localeID,
* than nameCapacity, the returned full name will be truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getName(const char* localeID,
char* name,
int32_t nameCapacity,
@@ -508,7 +508,7 @@ uloc_getName(const char* localeID,
* than nameCapacity, the returned full name will be truncated.
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_canonicalize(const char* localeID,
char* name,
int32_t nameCapacity,
@@ -521,7 +521,7 @@ uloc_canonicalize(const char* localeID,
* @return language the ISO language code for localeID
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uloc_getISO3Language(const char* localeID);
@@ -532,7 +532,7 @@ uloc_getISO3Language(const char* localeID);
* @return country the ISO country code for localeID
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uloc_getISO3Country(const char* localeID);
/**
@@ -546,26 +546,31 @@ uloc_getISO3Country(const char* localeID);
* @return country the Win32 LCID for localeID
* @stable ICU 2.0
*/
-U_STABLE uint32_t U_EXPORT2
+U_CAPI uint32_t U_EXPORT2
uloc_getLCID(const char* localeID);
/**
* Gets the language name suitable for display for the specified locale.
*
* @param locale the locale to get the ISO language code with
- * @param displayLocale Specifies the locale to be used to display the name. In other words,
- * if the locale's language code is "en", passing Locale::getFrench() for
- * inLocale would result in "Anglais", while passing Locale::getGerman()
- * for inLocale would result in "Englisch".
+ * @param displayLocale Specifies the locale to be used to display the name. In
+ * other words, if the locale's language code is "en", passing
+ * Locale::getFrench() for inLocale would result in "Anglais",
+ * while passing Locale::getGerman() for inLocale would result
+ * in "Englisch".
* @param language the displayable language code for localeID
* @param languageCapacity the size of the language buffer to store the
- * displayable language code with
- * @param status error information if retrieving the displayable language code failed
- * @return the actual buffer size needed for the displayable language code. If it's greater
- * than languageCapacity, the returned language code will be truncated.
+ * displayable language code with.
+ * @param status error information if retrieving the displayable language code
+ * failed. U_USING_DEFAULT_WARNING indicates that no data was
+ * found from the locale resources and a case canonicalized
+ * language code is placed into language as fallback.
+ * @return the actual buffer size needed for the displayable language code. If
+ * it's greater than languageCapacity, the returned language
+ * code will be truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getDisplayLanguage(const char* locale,
const char* displayLocale,
UChar* language,
@@ -575,20 +580,26 @@ uloc_getDisplayLanguage(const char* locale,
/**
* Gets the script name suitable for display for the specified locale.
*
- * @param locale the locale to get the displayable script code with. NULL may be used to specify the default.
- * @param displayLocale Specifies the locale to be used to display the name. In other words,
- * if the locale's language code is "en", passing Locale::getFrench() for
- * inLocale would result in "", while passing Locale::getGerman()
- * for inLocale would result in "". NULL may be used to specify the default.
- * @param script the displayable script for the localeID
- * @param scriptCapacity the size of the script buffer to store the
- * displayable script code with
- * @param status error information if retrieving the displayable script code failed
- * @return the actual buffer size needed for the displayable script code. If it's greater
- * than scriptCapacity, the returned displayable script code will be truncated.
+ * @param locale the locale to get the displayable script code with. NULL may be
+ * used to specify the default.
+ * @param displayLocale Specifies the locale to be used to display the name. In
+ * other words, if the locale's language code is "en", passing
+ * Locale::getFrench() for inLocale would result in "", while
+ * passing Locale::getGerman() for inLocale would result in "".
+ * NULL may be used to specify the default.
+ * @param script the displayable script for the localeID.
+ * @param scriptCapacity the size of the script buffer to store the displayable
+ * script code with.
+ * @param status error information if retrieving the displayable script code
+ * failed. U_USING_DEFAULT_WARNING indicates that no data was
+ * found from the locale resources and a case canonicalized
+ * script code is placed into script as fallback.
+ * @return the actual buffer size needed for the displayable script code. If
+ * it's greater than scriptCapacity, the returned displayable
+ * script code will be truncated.
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getDisplayScript(const char* locale,
const char* displayLocale,
UChar* script,
@@ -597,23 +608,30 @@ uloc_getDisplayScript(const char* locale,
/**
* Gets the country name suitable for display for the specified locale.
- * Warning: this is for the region part of a valid locale ID; it cannot just be the region code (like "FR").
- * To get the display name for a region alone, or for other options, use ULocaleDisplayNames instead.
- *
- * @param locale the locale to get the displayable country code with. NULL may be used to specify the default.
- * @param displayLocale Specifies the locale to be used to display the name. In other words,
- * if the locale's language code is "en", passing Locale::getFrench() for
- * inLocale would result in "Anglais", while passing Locale::getGerman()
- * for inLocale would result in "Englisch". NULL may be used to specify the default.
- * @param country the displayable country code for localeID
+ * Warning: this is for the region part of a valid locale ID; it cannot just be
+ * the region code (like "FR"). To get the display name for a region alone, or
+ * for other options, use ULocaleDisplayNames instead.
+ *
+ * @param locale the locale to get the displayable country code with. NULL may
+ * be used to specify the default.
+ * @param displayLocale Specifies the locale to be used to display the name. In
+ * other words, if the locale's language code is "en", passing
+ * Locale::getFrench() for inLocale would result in "Anglais",
+ * while passing Locale::getGerman() for inLocale would result
+ * in "Englisch". NULL may be used to specify the default.
+ * @param country the displayable country code for localeID.
* @param countryCapacity the size of the country buffer to store the
- * displayable country code with
- * @param status error information if retrieving the displayable country code failed
- * @return the actual buffer size needed for the displayable country code. If it's greater
- * than countryCapacity, the returned displayable country code will be truncated.
+ * displayable country code with.
+ * @param status error information if retrieving the displayable country code
+ * failed. U_USING_DEFAULT_WARNING indicates that no data was
+ * found from the locale resources and a case canonicalized
+ * country code is placed into country as fallback.
+ * @return the actual buffer size needed for the displayable country code. If
+ * it's greater than countryCapacity, the returned displayable
+ * country code will be truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getDisplayCountry(const char* locale,
const char* displayLocale,
UChar* country,
@@ -624,20 +642,26 @@ uloc_getDisplayCountry(const char* locale,
/**
* Gets the variant name suitable for display for the specified locale.
*
- * @param locale the locale to get the displayable variant code with. NULL may be used to specify the default.
- * @param displayLocale Specifies the locale to be used to display the name. In other words,
- * if the locale's language code is "en", passing Locale::getFrench() for
- * inLocale would result in "Anglais", while passing Locale::getGerman()
- * for inLocale would result in "Englisch". NULL may be used to specify the default.
- * @param variant the displayable variant code for localeID
+ * @param locale the locale to get the displayable variant code with. NULL may
+ * be used to specify the default.
+ * @param displayLocale Specifies the locale to be used to display the name. In
+ * other words, if the locale's language code is "en", passing
+ * Locale::getFrench() for inLocale would result in "Anglais",
+ * while passing Locale::getGerman() for inLocale would result
+ * in "Englisch". NULL may be used to specify the default.
+ * @param variant the displayable variant code for localeID.
* @param variantCapacity the size of the variant buffer to store the
- * displayable variant code with
- * @param status error information if retrieving the displayable variant code failed
- * @return the actual buffer size needed for the displayable variant code. If it's greater
- * than variantCapacity, the returned displayable variant code will be truncated.
+ * displayable variant code with.
+ * @param status error information if retrieving the displayable variant code
+ * failed. U_USING_DEFAULT_WARNING indicates that no data was
+ * found from the locale resources and a case canonicalized
+ * variant code is placed into variant as fallback.
+ * @return the actual buffer size needed for the displayable variant code. If
+ * it's greater than variantCapacity, the returned displayable
+ * variant code will be truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getDisplayVariant(const char* locale,
const char* displayLocale,
UChar* variant,
@@ -645,8 +669,8 @@ uloc_getDisplayVariant(const char* locale,
UErrorCode* status);
/**
- * Gets the keyword name suitable for display for the specified locale.
- * E.g: for the locale string de_DE\@collation=PHONEBOOK, this API gets the display
+ * Gets the keyword name suitable for display for the specified locale. E.g:
+ * for the locale string de_DE\@collation=PHONEBOOK, this API gets the display
* string for the keyword collation.
* Usage:
*
@@ -680,11 +704,13 @@ uloc_getDisplayVariant(const char* locale,
* result without writing any of the result string (pre-flighting).
* @param status error information if retrieving the displayable string failed.
* Should not be NULL and should not indicate failure on entry.
+ * U_USING_DEFAULT_WARNING indicates that no data was found from the locale
+ * resources and the keyword is placed into dest as fallback.
* @return the actual buffer size needed for the displayable variant code.
* @see #uloc_openKeywords
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getDisplayKeyword(const char* keyword,
const char* displayLocale,
UChar* dest,
@@ -707,10 +733,12 @@ uloc_getDisplayKeyword(const char* keyword,
* result without writing any of the result string (pre-flighting).
* @param status error information if retrieving the displayable string failed.
* Should not be NULL and must not indicate failure on entry.
+ * U_USING_DEFAULT_WARNING indicates that no data was found from the locale
+ * resources and the value of the keyword is placed into dest as fallback.
* @return the actual buffer size needed for the displayable variant code.
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getDisplayKeywordValue( const char* locale,
const char* keyword,
const char* displayLocale,
@@ -733,7 +761,7 @@ uloc_getDisplayKeywordValue( const char* locale,
* than maxResultSize, the returned displayable name will be truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getDisplayName(const char* localeID,
const char* inLocaleID,
UChar* result,
@@ -757,7 +785,7 @@ uloc_getDisplayName(const char* localeID,
* @return a specified locale name of all available locales
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uloc_getAvailable(int32_t n);
/**
@@ -766,21 +794,19 @@ uloc_getAvailable(int32_t n);
* @return the size of the locale list
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2 uloc_countAvailable(void);
-
-#ifndef U_HIDE_DRAFT_API
+U_CAPI int32_t U_EXPORT2 uloc_countAvailable(void);
/**
* Types for uloc_getAvailableByType and uloc_countAvailableByType.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
typedef enum ULocAvailableType {
/**
* Locales that return data when passed to ICU APIs,
* but not including legacy or alias locales.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
ULOC_AVAILABLE_DEFAULT,
@@ -798,7 +824,7 @@ typedef enum ULocAvailableType {
* ULOC_AVAILABLE_DEFAULT. To get both sets at the same time, use
* ULOC_AVAILABLE_WITH_LEGACY_ALIASES.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
ULOC_AVAILABLE_ONLY_LEGACY_ALIASES,
@@ -806,7 +832,7 @@ typedef enum ULocAvailableType {
* The union of the locales in ULOC_AVAILABLE_DEFAULT and
* ULOC_AVAILABLE_ONLY_LEGACY_ALIAS.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
ULOC_AVAILABLE_WITH_LEGACY_ALIASES,
@@ -827,13 +853,11 @@ typedef enum ULocAvailableType {
* @param type Type choice from ULocAvailableType.
* @param status Set if an error occurred.
* @return a UEnumeration owned by the caller, or nullptr on failure.
- * @draft ICU 65
+ * @stable ICU 65
*/
-U_DRAFT UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uloc_openAvailableByType(ULocAvailableType type, UErrorCode* status);
-#endif // U_HIDE_DRAFT_API
-
/**
*
* Gets a list of all available 2-letter language codes defined in ISO 639,
@@ -845,7 +869,7 @@ uloc_openAvailableByType(ULocAvailableType type, UErrorCode* status);
* @return a list of all available language codes
* @stable ICU 2.0
*/
-U_STABLE const char* const* U_EXPORT2
+U_CAPI const char* const* U_EXPORT2
uloc_getISOLanguages(void);
/**
@@ -857,7 +881,7 @@ uloc_getISOLanguages(void);
* @return a list of all available country codes
* @stable ICU 2.0
*/
-U_STABLE const char* const* U_EXPORT2
+U_CAPI const char* const* U_EXPORT2
uloc_getISOCountries(void);
/**
@@ -873,7 +897,7 @@ uloc_getISOCountries(void);
* @return The length of the parent locale ID.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getParent(const char* localeID,
char* parent,
int32_t parentCapacity,
@@ -904,7 +928,7 @@ uloc_getParent(const char* localeID,
* than nameCapacity, the returned full name will be truncated.
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getBaseName(const char* localeID,
char* name,
int32_t nameCapacity,
@@ -919,7 +943,7 @@ uloc_getBaseName(const char* localeID,
* @return enumeration of keywords or NULL if there are no keywords.
* @stable ICU 2.8
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uloc_openKeywords(const char* localeID,
UErrorCode* status);
@@ -936,7 +960,7 @@ uloc_openKeywords(const char* localeID,
* @return the length of keyword value
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getKeywordValue(const char* localeID,
const char* keywordName,
char* buffer, int32_t bufferCapacity,
@@ -973,7 +997,7 @@ uloc_getKeywordValue(const char* localeID,
* @see uloc_getKeywordValue
* @stable ICU 3.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_setKeywordValue(const char* keywordName,
const char* keywordValue,
char* buffer, int32_t bufferCapacity,
@@ -982,18 +1006,18 @@ uloc_setKeywordValue(const char* keywordName,
/**
* Returns whether the locale's script is written right-to-left.
* If there is no script subtag, then the likely script is used, see uloc_addLikelySubtags().
- * If no likely script is known, then FALSE is returned.
+ * If no likely script is known, then false is returned.
*
* A script is right-to-left according to the CLDR script metadata
* which corresponds to whether the script's letters have Bidi_Class=R or AL.
*
- * Returns TRUE for "ar" and "en-Hebr", FALSE for "zh" and "fa-Cyrl".
+ * Returns true for "ar" and "en-Hebr", false for "zh" and "fa-Cyrl".
*
* @param locale input locale ID
- * @return TRUE if the locale's script is written right-to-left
+ * @return true if the locale's script is written right-to-left
* @stable ICU 54
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uloc_isRightToLeft(const char *locale);
/**
@@ -1017,7 +1041,7 @@ typedef enum {
* @return an enum indicating the layout orientation for characters.
* @stable ICU 4.0
*/
-U_STABLE ULayoutType U_EXPORT2
+U_CAPI ULayoutType U_EXPORT2
uloc_getCharacterOrientation(const char* localeId,
UErrorCode *status);
@@ -1029,7 +1053,7 @@ uloc_getCharacterOrientation(const char* localeId,
* @return an enum indicating the layout orientation for lines.
* @stable ICU 4.0
*/
-U_STABLE ULayoutType U_EXPORT2
+U_CAPI ULayoutType U_EXPORT2
uloc_getLineOrientation(const char* localeId,
UErrorCode *status);
@@ -1076,7 +1100,7 @@ typedef enum {
* @return length needed for the locale.
* @stable ICU 3.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_acceptLanguageFromHTTP(char *result, int32_t resultAvailable,
UAcceptResult *outResult,
const char *httpAcceptLanguage,
@@ -1101,7 +1125,7 @@ uloc_acceptLanguageFromHTTP(char *result, int32_t resultAvailable,
* @return length needed for the locale.
* @stable ICU 3.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_acceptLanguage(char *result, int32_t resultAvailable,
UAcceptResult *outResult, const char **acceptList,
int32_t acceptListCount,
@@ -1121,7 +1145,7 @@ uloc_acceptLanguage(char *result, int32_t resultAvailable,
* @return actual the actual size of the locale ID, not including NUL-termination
* @stable ICU 3.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_getLocaleForLCID(uint32_t hostID, char *locale, int32_t localeCapacity,
UErrorCode *status);
@@ -1159,7 +1183,7 @@ uloc_getLocaleForLCID(uint32_t hostID, char *locale, int32_t localeCapacity,
* On error, the return value is -1.
* @stable ICU 4.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_addLikelySubtags(const char* localeID,
char* maximizedLocaleID,
int32_t maximizedLocaleIDCapacity,
@@ -1199,7 +1223,7 @@ uloc_addLikelySubtags(const char* localeID,
* On error, the return value is -1.
* @stable ICU 4.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_minimizeSubtags(const char* localeID,
char* minimizedLocaleID,
int32_t minimizedLocaleIDCapacity,
@@ -1210,13 +1234,17 @@ uloc_minimizeSubtags(const char* localeID,
* If the specified language tag contains any ill-formed subtags,
* the first such subtag and all following subtags are ignored.
*
- * This implements the 'Language-Tag' production of BCP47, and so
- * supports grandfathered (regular and irregular) as well as private
- * use language tags. Private use tags are represented as 'x-whatever',
- * and grandfathered tags are converted to their canonical replacements
- * where they exist. Note that a few grandfathered tags have no modern
- * replacement, these will be converted using the fallback described in
+ * This implements the 'Language-Tag' production of BCP 47, and so
+ * supports legacy language tags (marked as “Type: grandfathered” in BCP 47)
+ * (regular and irregular) as well as private use language tags.
+ *
+ * Private use tags are represented as 'x-whatever',
+ * and legacy tags are converted to their canonical replacements where they exist.
+ *
+ * Note that a few legacy tags have no modern replacement;
+ * these will be converted using the fallback described in
* the first paragraph, so some information might be lost.
+ *
* @param langtag the input BCP47 language tag.
* @param localeID the output buffer receiving a locale ID for the
* specified BCP47 language tag.
@@ -1228,7 +1256,7 @@ uloc_minimizeSubtags(const char* localeID,
* @return the length of the locale ID.
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_forLanguageTag(const char* langtag,
char* localeID,
int32_t localeIDCapacity,
@@ -1238,10 +1266,10 @@ uloc_forLanguageTag(const char* langtag,
/**
* Returns a well-formed language tag for this locale ID.
*
- * Note: When strict
is FALSE, any locale
+ * Note: When strict
is false, any locale
* fields which do not satisfy the BCP47 syntax requirement will
* be omitted from the result. When strict
is
- * TRUE, this function sets U_ILLEGAL_ARGUMENT_ERROR to the
+ * true, this function sets U_ILLEGAL_ARGUMENT_ERROR to the
* err
if any locale fields do not satisfy the
* BCP47 syntax requirement.
* @param localeID the input locale ID
@@ -1256,7 +1284,7 @@ uloc_forLanguageTag(const char* langtag,
* @return The length of the BCP47 language tag.
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uloc_toLanguageTag(const char* localeID,
char* langtag,
int32_t langtagCapacity,
@@ -1284,7 +1312,7 @@ uloc_toLanguageTag(const char* localeID,
* @see uloc_toLegacyKey
* @stable ICU 54
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uloc_toUnicodeLocaleKey(const char* keyword);
/**
@@ -1315,7 +1343,7 @@ uloc_toUnicodeLocaleKey(const char* keyword);
* @see uloc_toLegacyType
* @stable ICU 54
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uloc_toUnicodeLocaleType(const char* keyword, const char* value);
/**
@@ -1330,7 +1358,7 @@ uloc_toUnicodeLocaleType(const char* keyword, const char* value);
* @see toUnicodeLocaleKey
* @stable ICU 54
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uloc_toLegacyKey(const char* keyword);
/**
@@ -1359,7 +1387,7 @@ uloc_toLegacyKey(const char* keyword);
* @see toUnicodeLocaleType
* @stable ICU 54
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uloc_toLegacyType(const char* keyword, const char* value);
#endif /*_ULOC*/
diff --git a/deps/icu-small/source/common/unicode/umachine.h b/deps/icu-small/source/common/unicode/umachine.h
index ff5deb8d01786a..219d1ee1911d02 100644
--- a/deps/icu-small/source/common/unicode/umachine.h
+++ b/deps/icu-small/source/common/unicode/umachine.h
@@ -49,12 +49,13 @@
* ANSI C headers:
* stddef.h defines wchar_t
*/
+#include
#include
/*==========================================================================*/
-/* For C wrappers, we use the symbol U_STABLE. */
+/* For C wrappers, we use the symbol U_CAPI. */
/* This works properly if the includer is C or C++. */
-/* Functions are declared U_STABLE return-type U_EXPORT2 function-name()... */
+/* Functions are declared U_CAPI return-type U_EXPORT2 function-name()... */
/*==========================================================================*/
/**
@@ -107,15 +108,15 @@
/** This is used to declare a function as a public ICU C API @stable ICU 2.0*/
#define U_CAPI U_CFUNC U_EXPORT
-/** This is used to declare a function as a stable public ICU C API*/
+/** Obsolete/same as U_CAPI; was used to declare a function as a stable public ICU C API*/
#define U_STABLE U_CAPI
-/** This is used to declare a function as a draft public ICU C API */
+/** Obsolete/same as U_CAPI; was used to declare a function as a draft public ICU C API */
#define U_DRAFT U_CAPI
/** This is used to declare a function as a deprecated public ICU C API */
#define U_DEPRECATED U_CAPI U_ATTRIBUTE_DEPRECATED
-/** This is used to declare a function as an obsolete public ICU C API */
+/** Obsolete/same as U_CAPI; was used to declare a function as an obsolete public ICU C API */
#define U_OBSOLETE U_CAPI
-/** This is used to declare a function as an internal ICU C API */
+/** Obsolete/same as U_CAPI; was used to declare a function as an internal ICU C API */
#define U_INTERNAL U_CAPI
/**
@@ -170,11 +171,11 @@
/**
* \def UPRV_BLOCK_MACRO_END
- * Defined as "while (FALSE)" by default.
+ * Defined as "while (false)" by default.
* @internal
*/
#ifndef UPRV_BLOCK_MACRO_END
-#define UPRV_BLOCK_MACRO_END while (FALSE)
+#define UPRV_BLOCK_MACRO_END while (false)
#endif
/*==========================================================================*/
@@ -257,18 +258,59 @@
/* Boolean data type */
/*==========================================================================*/
-/** The ICU boolean type @stable ICU 2.0 */
+/**
+ * The ICU boolean type, a signed-byte integer.
+ * ICU-specific for historical reasons: The C and C++ standards used to not define type bool.
+ * Also provides a fixed type definition, as opposed to
+ * type bool whose details (e.g., sizeof) may vary by compiler and between C and C++.
+ *
+ * @stable ICU 2.0
+ */
typedef int8_t UBool;
+/**
+ * \def U_DEFINE_FALSE_AND_TRUE
+ * Normally turns off defining macros FALSE=0 & TRUE=1 in public ICU headers.
+ * These obsolete macros sometimes break compilation of other code that
+ * defines enum constants or similar with these names.
+ * C++ has long defined bool/false/true.
+ * C99 also added definitions for these, although as macros; see stdbool.h.
+ *
+ * You may transitionally define U_DEFINE_FALSE_AND_TRUE=1 if you need time to migrate code.
+ *
+ * @internal ICU 68
+ */
+#ifdef U_DEFINE_FALSE_AND_TRUE
+ // Use the predefined value.
+#elif defined(U_COMBINED_IMPLEMENTATION) || \
+ defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || \
+ defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || \
+ defined(U_TOOLUTIL_IMPLEMENTATION)
+ // Inside ICU: Keep FALSE & TRUE available.
+# define U_DEFINE_FALSE_AND_TRUE 1
+#else
+ // Outside ICU: Avoid collision with non-macro definitions of FALSE & TRUE.
+# define U_DEFINE_FALSE_AND_TRUE 0
+#endif
+
+#if U_DEFINE_FALSE_AND_TRUE || defined(U_IN_DOXYGEN)
#ifndef TRUE
-/** The TRUE value of a UBool @stable ICU 2.0 */
+/**
+ * The TRUE value of a UBool.
+ *
+ * @deprecated ICU 68 Use standard "true" instead.
+ */
# define TRUE 1
#endif
#ifndef FALSE
-/** The FALSE value of a UBool @stable ICU 2.0 */
+/**
+ * The FALSE value of a UBool.
+ *
+ * @deprecated ICU 68 Use standard "false" instead.
+ */
# define FALSE 0
#endif
-
+#endif // U_DEFINE_FALSE_AND_TRUE
/*==========================================================================*/
/* Unicode data types */
diff --git a/deps/icu-small/source/common/unicode/umutablecptrie.h b/deps/icu-small/source/common/unicode/umutablecptrie.h
index f2af36477d5300..5325d58147ab1f 100644
--- a/deps/icu-small/source/common/unicode/umutablecptrie.h
+++ b/deps/icu-small/source/common/unicode/umutablecptrie.h
@@ -9,11 +9,14 @@
#include "unicode/utypes.h"
-#include "unicode/localpointer.h"
#include "unicode/ucpmap.h"
#include "unicode/ucptrie.h"
#include "unicode/utf8.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
U_CDECL_BEGIN
/**
diff --git a/deps/icu-small/source/common/unicode/unimatch.h b/deps/icu-small/source/common/unicode/unimatch.h
index 2d3c5210c38e25..10efd3d007a5ca 100644
--- a/deps/icu-small/source/common/unicode/unimatch.h
+++ b/deps/icu-small/source/common/unicode/unimatch.h
@@ -115,11 +115,11 @@ class U_COMMON_API UnicodeMatcher /* not : public UObject because this is an int
* considered for matching will be text.charAt(limit-1) in the
* forward direction or text.charAt(limit+1) in the backward
* direction.
- * @param incremental if TRUE, then assume further characters may
+ * @param incremental if true, then assume further characters may
* be inserted at limit and check for partial matching. Otherwise
* assume the text as given is complete.
* @return a match degree value indicating a full match, a partial
- * match, or a mismatch. If incremental is FALSE then
+ * match, or a mismatch. If incremental is false then
* U_PARTIAL_MATCH should never be returned.
* @stable ICU 2.4
*/
@@ -134,17 +134,17 @@ class U_COMMON_API UnicodeMatcher /* not : public UObject because this is an int
* will produce another matcher that is equal to this one.
* @param result the string to receive the pattern. Previous
* contents will be deleted.
- * @param escapeUnprintable if TRUE then convert unprintable
+ * @param escapeUnprintable if true then convert unprintable
* character to their hex escape representations, \\uxxxx or
* \\Uxxxxxxxx. Unprintable characters are those other than
* U+000A, U+0020..U+007E.
* @stable ICU 2.4
*/
virtual UnicodeString& toPattern(UnicodeString& result,
- UBool escapeUnprintable = FALSE) const = 0;
+ UBool escapeUnprintable = false) const = 0;
/**
- * Returns TRUE if this matcher will match a character c, where c
+ * Returns true if this matcher will match a character c, where c
* & 0xFF == v, at offset, in the forward direction (with limit >
* offset). This is used by RuleBasedTransliterator for
* indexing.
diff --git a/deps/icu-small/source/common/unicode/uniset.h b/deps/icu-small/source/common/unicode/uniset.h
index 18cc9376442a2f..4179507af18e6f 100644
--- a/deps/icu-small/source/common/unicode/uniset.h
+++ b/deps/icu-small/source/common/unicode/uniset.h
@@ -325,7 +325,7 @@ class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
* A bogus set has no value. It is different from an empty set.
* It can be used to indicate that no set value is available.
*
- * @return TRUE if the set is bogus/invalid, FALSE otherwise
+ * @return true if the set is bogus/invalid, false otherwise
* @see setToBogus()
* @stable ICU 4.0
*/
@@ -333,7 +333,7 @@ class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
/**
* Make this UnicodeSet object invalid.
- * The string will test TRUE with isBogus().
+ * The string will test true with isBogus().
*
* A bogus set has no value. It is different from an empty set.
* It can be used to indicate that no set value is available.
@@ -563,7 +563,7 @@ class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
/**
* Determines whether the set has been frozen (made immutable) or not.
* See the ICU4J Freezable interface for details.
- * @return TRUE/FALSE for whether the set has been frozen
+ * @return true/false for whether the set has been frozen
* @see freeze
* @see cloneAsThawed
* @stable ICU 3.8
@@ -700,14 +700,14 @@ class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
* A frozen set will not be modified.
* @param result the string to receive the rules. Previous
* contents will be deleted.
- * @param escapeUnprintable if TRUE then convert unprintable
+ * @param escapeUnprintable if true then convert unprintable
* character to their hex escape representations, \\uxxxx or
* \\Uxxxxxxxx. Unprintable characters are those other than
* U+000A, U+0020..U+007E.
* @stable ICU 2.0
*/
virtual UnicodeString& toPattern(UnicodeString& result,
- UBool escapeUnprintable = FALSE) const;
+ UBool escapeUnprintable = false) const;
/**
* Modifies this set to contain those code points which have the given value
@@ -1636,7 +1636,7 @@ class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
static const UnicodeSet* getInclusions(int32_t src, UErrorCode &status);
/**
- * A filter that returns TRUE if the given code point should be
+ * A filter that returns true if the given code point should be
* included in the UnicodeSet being constructed.
*/
typedef UBool (*Filter)(UChar32 codePoint, void* context);
diff --git a/deps/icu-small/source/common/unicode/unistr.h b/deps/icu-small/source/common/unicode/unistr.h
index da79053765acf6..456389f265fea0 100644
--- a/deps/icu-small/source/common/unicode/unistr.h
+++ b/deps/icu-small/source/common/unicode/unistr.h
@@ -45,7 +45,7 @@ struct UConverter; // unicode/ucnv.h
/**
* \ingroup ustring_ustrlen
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strlen(const UChar *s);
#endif
@@ -113,9 +113,9 @@ class UnicodeStringAppendable; // unicode/appendable.h
* @stable ICU 2.0
*/
#if !U_CHAR16_IS_TYPEDEF
-# define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, u ## cs, _length)
+# define UNICODE_STRING(cs, _length) icu::UnicodeString(true, u ## cs, _length)
#else
-# define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, (const char16_t*)u ## cs, _length)
+# define UNICODE_STRING(cs, _length) icu::UnicodeString(true, (const char16_t*)u ## cs, _length)
#endif
/**
@@ -227,7 +227,7 @@ class UnicodeStringAppendable; // unicode/appendable.h
* The UnicodeString class is not suitable for subclassing.
*
* For an overview of Unicode strings in C and C++ see the
- * [User Guide Strings chapter](http://userguide.icu-project.org/strings#TOC-Strings-in-C-C-).
+ * [User Guide Strings chapter](https://unicode-org.github.io/icu/userguide/strings#strings-in-cc).
*
* In ICU, a Unicode string consists of 16-bit Unicode *code units*.
* A Unicode character may be stored with either one code unit
@@ -285,7 +285,7 @@ class UnicodeStringAppendable; // unicode/appendable.h
* significant performance improvements.
* Also, the internal buffer is accessible via special functions.
* For details see the
- * [User Guide Strings chapter](http://userguide.icu-project.org/strings#TOC-Maximizing-Performance-with-the-UnicodeString-Storage-Model).
+ * [User Guide Strings chapter](https://unicode-org.github.io/icu/userguide/strings#maximizing-performance-with-the-unicodestring-storage-model).
*
* @see utf.h
* @see CharacterIterator
@@ -320,8 +320,8 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Equality operator. Performs only bitwise comparison.
* @param text The UnicodeString to compare to this one.
- * @return TRUE if `text` contains the same characters as this one,
- * FALSE otherwise.
+ * @return true if `text` contains the same characters as this one,
+ * false otherwise.
* @stable ICU 2.0
*/
inline UBool operator== (const UnicodeString& text) const;
@@ -329,8 +329,8 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Inequality operator. Performs only bitwise comparison.
* @param text The UnicodeString to compare to this one.
- * @return FALSE if `text` contains the same characters as this one,
- * TRUE otherwise.
+ * @return false if `text` contains the same characters as this one,
+ * true otherwise.
* @stable ICU 2.0
*/
inline UBool operator!= (const UnicodeString& text) const;
@@ -338,8 +338,8 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Greater than operator. Performs only bitwise comparison.
* @param text The UnicodeString to compare to this one.
- * @return TRUE if the characters in this are bitwise
- * greater than the characters in `text`, FALSE otherwise
+ * @return true if the characters in this are bitwise
+ * greater than the characters in `text`, false otherwise
* @stable ICU 2.0
*/
inline UBool operator> (const UnicodeString& text) const;
@@ -347,8 +347,8 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Less than operator. Performs only bitwise comparison.
* @param text The UnicodeString to compare to this one.
- * @return TRUE if the characters in this are bitwise
- * less than the characters in `text`, FALSE otherwise
+ * @return true if the characters in this are bitwise
+ * less than the characters in `text`, false otherwise
* @stable ICU 2.0
*/
inline UBool operator< (const UnicodeString& text) const;
@@ -356,8 +356,8 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Greater than or equal operator. Performs only bitwise comparison.
* @param text The UnicodeString to compare to this one.
- * @return TRUE if the characters in this are bitwise
- * greater than or equal to the characters in `text`, FALSE otherwise
+ * @return true if the characters in this are bitwise
+ * greater than or equal to the characters in `text`, false otherwise
* @stable ICU 2.0
*/
inline UBool operator>= (const UnicodeString& text) const;
@@ -365,8 +365,8 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Less than or equal operator. Performs only bitwise comparison.
* @param text The UnicodeString to compare to this one.
- * @return TRUE if the characters in this are bitwise
- * less than or equal to the characters in `text`, FALSE otherwise
+ * @return true if the characters in this are bitwise
+ * less than or equal to the characters in `text`, false otherwise
* @stable ICU 2.0
*/
inline UBool operator<= (const UnicodeString& text) const;
@@ -855,8 +855,8 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Determine if this starts with the characters in `text`
* @param text The text to match.
- * @return TRUE if this starts with the characters in `text`,
- * FALSE otherwise
+ * @return true if this starts with the characters in `text`,
+ * false otherwise
* @stable ICU 2.0
*/
inline UBool startsWith(const UnicodeString& text) const;
@@ -867,8 +867,8 @@ class U_COMMON_API UnicodeString : public Replaceable
* @param srcText The text to match.
* @param srcStart the offset into `srcText` to start matching
* @param srcLength the number of characters in `srcText` to match
- * @return TRUE if this starts with the characters in `text`,
- * FALSE otherwise
+ * @return true if this starts with the characters in `text`,
+ * false otherwise
* @stable ICU 2.0
*/
inline UBool startsWith(const UnicodeString& srcText,
@@ -879,8 +879,8 @@ class U_COMMON_API UnicodeString : public Replaceable
* Determine if this starts with the characters in `srcChars`
* @param srcChars The characters to match.
* @param srcLength the number of characters in `srcChars`
- * @return TRUE if this starts with the characters in `srcChars`,
- * FALSE otherwise
+ * @return true if this starts with the characters in `srcChars`,
+ * false otherwise
* @stable ICU 2.0
*/
inline UBool startsWith(ConstChar16Ptr srcChars,
@@ -892,7 +892,7 @@ class U_COMMON_API UnicodeString : public Replaceable
* @param srcChars The characters to match.
* @param srcStart the offset into `srcText` to start matching
* @param srcLength the number of characters in `srcChars` to match
- * @return TRUE if this ends with the characters in `srcChars`, FALSE otherwise
+ * @return true if this ends with the characters in `srcChars`, false otherwise
* @stable ICU 2.0
*/
inline UBool startsWith(const char16_t *srcChars,
@@ -902,8 +902,8 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Determine if this ends with the characters in `text`
* @param text The text to match.
- * @return TRUE if this ends with the characters in `text`,
- * FALSE otherwise
+ * @return true if this ends with the characters in `text`,
+ * false otherwise
* @stable ICU 2.0
*/
inline UBool endsWith(const UnicodeString& text) const;
@@ -914,8 +914,8 @@ class U_COMMON_API UnicodeString : public Replaceable
* @param srcText The text to match.
* @param srcStart the offset into `srcText` to start matching
* @param srcLength the number of characters in `srcText` to match
- * @return TRUE if this ends with the characters in `text`,
- * FALSE otherwise
+ * @return true if this ends with the characters in `text`,
+ * false otherwise
* @stable ICU 2.0
*/
inline UBool endsWith(const UnicodeString& srcText,
@@ -926,8 +926,8 @@ class U_COMMON_API UnicodeString : public Replaceable
* Determine if this ends with the characters in `srcChars`
* @param srcChars The characters to match.
* @param srcLength the number of characters in `srcChars`
- * @return TRUE if this ends with the characters in `srcChars`,
- * FALSE otherwise
+ * @return true if this ends with the characters in `srcChars`,
+ * false otherwise
* @stable ICU 2.0
*/
inline UBool endsWith(ConstChar16Ptr srcChars,
@@ -939,8 +939,8 @@ class U_COMMON_API UnicodeString : public Replaceable
* @param srcChars The characters to match.
* @param srcStart the offset into `srcText` to start matching
* @param srcLength the number of characters in `srcChars` to match
- * @return TRUE if this ends with the characters in `srcChars`,
- * FALSE otherwise
+ * @return true if this ends with the characters in `srcChars`,
+ * false otherwise
* @stable ICU 2.0
*/
inline UBool endsWith(const char16_t *srcChars,
@@ -1804,7 +1804,7 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Determine if this string is empty.
- * @return TRUE if this string contains 0 characters, FALSE otherwise.
+ * @return true if this string contains 0 characters, false otherwise.
* @stable ICU 2.0
*/
inline UBool isEmpty(void) const;
@@ -1832,12 +1832,12 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Determine if this object contains a valid string.
* A bogus string has no value. It is different from an empty string,
- * although in both cases isEmpty() returns TRUE and length() returns 0.
+ * although in both cases isEmpty() returns true and length() returns 0.
* setToBogus() and isBogus() can be used to indicate that no string value is available.
* For a bogus string, getBuffer() and getTerminatedBuffer() return NULL, and
* length() returns 0.
*
- * @return TRUE if the string is bogus/invalid, FALSE otherwise
+ * @return true if the string is bogus/invalid, false otherwise
* @see setToBogus()
* @stable ICU 2.0
*/
@@ -2067,7 +2067,7 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Make this UnicodeString object invalid.
- * The string will test TRUE with isBogus().
+ * The string will test true with isBogus().
*
* A bogus string has no value. It is different from an empty string.
* It can be used to indicate that no string value is available.
@@ -2459,7 +2459,7 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Replaceable API
- * @return TRUE if it has MetaData
+ * @return true if it has MetaData
* @stable ICU 2.4
*/
virtual UBool hasMetaData() const;
@@ -2590,7 +2590,7 @@ class U_COMMON_API UnicodeString : public Replaceable
* @param targetLength the desired length of the string
* @param padChar the character to use for padding. Defaults to
* space (U+0020)
- * @return TRUE if the text was padded, FALSE otherwise.
+ * @return true if the text was padded, false otherwise.
* @stable ICU 2.0
*/
UBool padLeading(int32_t targetLength,
@@ -2604,7 +2604,7 @@ class U_COMMON_API UnicodeString : public Replaceable
* @param targetLength the desired length of the string
* @param padChar the character to use for padding. Defaults to
* space (U+0020)
- * @return TRUE if the text was padded, FALSE otherwise.
+ * @return true if the text was padded, false otherwise.
* @stable ICU 2.0
*/
UBool padTrailing(int32_t targetLength,
@@ -2613,7 +2613,7 @@ class U_COMMON_API UnicodeString : public Replaceable
/**
* Truncate this UnicodeString to the `targetLength`.
* @param targetLength the desired length of this UnicodeString.
- * @return TRUE if the text was truncated, FALSE otherwise
+ * @return true if the text was truncated, false otherwise
* @stable ICU 2.0
*/
inline UBool truncate(int32_t targetLength);
@@ -3615,7 +3615,7 @@ class U_COMMON_API UnicodeString : public Replaceable
void unBogus();
// implements assigment operator, copy constructor, and fastCopyFrom()
- UnicodeString ©From(const UnicodeString &src, UBool fastCopy=FALSE);
+ UnicodeString ©From(const UnicodeString &src, UBool fastCopy=false);
// Copies just the fields without memory management.
void copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) U_NOEXCEPT;
@@ -3668,13 +3668,13 @@ class U_COMMON_API UnicodeString : public Replaceable
* the buffer is refCounted (shared), and refCount>1, or
* the buffer is too small.
*
- * Return FALSE if memory could not be allocated.
+ * Return false if memory could not be allocated.
*/
UBool cloneArrayIfNeeded(int32_t newCapacity = -1,
int32_t growCapacity = -1,
- UBool doCopyArray = TRUE,
+ UBool doCopyArray = true,
int32_t **pBufferToDelete = 0,
- UBool forceClone = FALSE);
+ UBool forceClone = false);
/**
* Common function for UnicodeString case mappings.
@@ -4732,12 +4732,12 @@ UnicodeString::truncate(int32_t targetLength)
if(isBogus() && targetLength == 0) {
// truncate(0) of a bogus string makes the string empty and non-bogus
unBogus();
- return FALSE;
+ return false;
} else if((uint32_t)targetLength < (uint32_t)length()) {
setLength(targetLength);
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
diff --git a/deps/icu-small/source/common/unicode/unorm.h b/deps/icu-small/source/common/unicode/unorm.h
index 09dd366a968c1b..c3c57582d449d5 100644
--- a/deps/icu-small/source/common/unicode/unorm.h
+++ b/deps/icu-small/source/common/unicode/unorm.h
@@ -274,7 +274,7 @@ unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength,
* never a "maybe".
* For NFD, NFKD, and FCD, both functions work exactly the same.
* For NFC and NFKC where quickCheck may return "maybe", this function will
- * perform further tests to arrive at a TRUE/FALSE result.
+ * perform further tests to arrive at a true/false result.
*
* @param src String that is to be tested if it is in a normalization format.
* @param srcLength Length of source to test, or -1 if NUL-terminated.
@@ -358,10 +358,10 @@ unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength,
* It is useful for operations like a normalizing transliterator, where one would
* not want to replace a piece of text if it is not modified.
*
- * If doNormalize==TRUE and pNeededToNormalize!=NULL then *pNeeded... is set TRUE
+ * If doNormalize==true and pNeededToNormalize!=NULL then *pNeeded... is set true
* if the normalization was necessary.
*
- * If doNormalize==FALSE then *pNeededToNormalize will be set to FALSE.
+ * If doNormalize==false then *pNeededToNormalize will be set to false.
*
* If the buffer overflows, then *pNeededToNormalize will be undefined;
* essentially, whenever U_FAILURE is true (like in buffer overflows), this result
@@ -373,11 +373,11 @@ unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength,
* @param mode The normalization mode.
* @param options The normalization options, ORed together (0 for no options).
* @param doNormalize Indicates if the source text up to the next boundary
- * is to be normalized (TRUE) or just copied (FALSE).
+ * is to be normalized (true) or just copied (false).
* @param pNeededToNormalize Output flag indicating if the normalization resulted in
* different text from the input.
* Not defined if an error occurs including buffer overflow.
- * Always FALSE if !doNormalize.
+ * Always false if !doNormalize.
* @param pErrorCode ICU error code in/out parameter.
* Must fulfill U_SUCCESS before the function call.
* @return Length of output (number of UChars) when successful or buffer overflow.
@@ -406,11 +406,11 @@ unorm_next(UCharIterator *src,
* @param mode The normalization mode.
* @param options The normalization options, ORed together (0 for no options).
* @param doNormalize Indicates if the source text up to the next boundary
- * is to be normalized (TRUE) or just copied (FALSE).
+ * is to be normalized (true) or just copied (false).
* @param pNeededToNormalize Output flag indicating if the normalization resulted in
* different text from the input.
* Not defined if an error occurs including buffer overflow.
- * Always FALSE if !doNormalize.
+ * Always false if !doNormalize.
* @param pErrorCode ICU error code in/out parameter.
* Must fulfill U_SUCCESS before the function call.
* @return Length of output (number of UChars) when successful or buffer overflow.
diff --git a/deps/icu-small/source/common/unicode/unorm2.h b/deps/icu-small/source/common/unicode/unorm2.h
index a9bd02f256361f..24417b7103c12e 100644
--- a/deps/icu-small/source/common/unicode/unorm2.h
+++ b/deps/icu-small/source/common/unicode/unorm2.h
@@ -31,10 +31,13 @@
*/
#include "unicode/utypes.h"
-#include "unicode/localpointer.h"
#include "unicode/stringoptions.h"
#include "unicode/uset.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* Constants for normalization modes.
* For details about standard Unicode normalization forms
@@ -132,7 +135,7 @@ typedef struct UNormalizer2 UNormalizer2; /**< C typedef for struct UNormalizer
* @return the requested Normalizer2, if successful
* @stable ICU 49
*/
-U_STABLE const UNormalizer2 * U_EXPORT2
+U_CAPI const UNormalizer2 * U_EXPORT2
unorm2_getNFCInstance(UErrorCode *pErrorCode);
/**
@@ -146,7 +149,7 @@ unorm2_getNFCInstance(UErrorCode *pErrorCode);
* @return the requested Normalizer2, if successful
* @stable ICU 49
*/
-U_STABLE const UNormalizer2 * U_EXPORT2
+U_CAPI const UNormalizer2 * U_EXPORT2
unorm2_getNFDInstance(UErrorCode *pErrorCode);
/**
@@ -160,7 +163,7 @@ unorm2_getNFDInstance(UErrorCode *pErrorCode);
* @return the requested Normalizer2, if successful
* @stable ICU 49
*/
-U_STABLE const UNormalizer2 * U_EXPORT2
+U_CAPI const UNormalizer2 * U_EXPORT2
unorm2_getNFKCInstance(UErrorCode *pErrorCode);
/**
@@ -174,7 +177,7 @@ unorm2_getNFKCInstance(UErrorCode *pErrorCode);
* @return the requested Normalizer2, if successful
* @stable ICU 49
*/
-U_STABLE const UNormalizer2 * U_EXPORT2
+U_CAPI const UNormalizer2 * U_EXPORT2
unorm2_getNFKDInstance(UErrorCode *pErrorCode);
/**
@@ -188,7 +191,7 @@ unorm2_getNFKDInstance(UErrorCode *pErrorCode);
* @return the requested Normalizer2, if successful
* @stable ICU 49
*/
-U_STABLE const UNormalizer2 * U_EXPORT2
+U_CAPI const UNormalizer2 * U_EXPORT2
unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode);
/**
@@ -212,7 +215,7 @@ unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode);
* @return the requested UNormalizer2, if successful
* @stable ICU 4.4
*/
-U_STABLE const UNormalizer2 * U_EXPORT2
+U_CAPI const UNormalizer2 * U_EXPORT2
unorm2_getInstance(const char *packageName,
const char *name,
UNormalization2Mode mode,
@@ -233,7 +236,7 @@ unorm2_getInstance(const char *packageName,
* @return the requested UNormalizer2, if successful
* @stable ICU 4.4
*/
-U_STABLE UNormalizer2 * U_EXPORT2
+U_CAPI UNormalizer2 * U_EXPORT2
unorm2_openFiltered(const UNormalizer2 *norm2, const USet *filterSet, UErrorCode *pErrorCode);
/**
@@ -242,7 +245,7 @@ unorm2_openFiltered(const UNormalizer2 *norm2, const USet *filterSet, UErrorCode
* @param norm2 UNormalizer2 instance to be closed
* @stable ICU 4.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unorm2_close(UNormalizer2 *norm2);
#if U_SHOW_CPLUSPLUS_API
@@ -280,7 +283,7 @@ U_NAMESPACE_END
* @return dest
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unorm2_normalize(const UNormalizer2 *norm2,
const UChar *src, int32_t length,
UChar *dest, int32_t capacity,
@@ -303,7 +306,7 @@ unorm2_normalize(const UNormalizer2 *norm2,
* @return first
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2,
UChar *first, int32_t firstLength, int32_t firstCapacity,
const UChar *second, int32_t secondLength,
@@ -326,7 +329,7 @@ unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2,
* @return first
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unorm2_append(const UNormalizer2 *norm2,
UChar *first, int32_t firstLength, int32_t firstCapacity,
const UChar *second, int32_t secondLength,
@@ -351,7 +354,7 @@ unorm2_append(const UNormalizer2 *norm2,
* @return the non-negative length of c's decomposition, if there is one; otherwise a negative value
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unorm2_getDecomposition(const UNormalizer2 *norm2,
UChar32 c, UChar *decomposition, int32_t capacity,
UErrorCode *pErrorCode);
@@ -385,7 +388,7 @@ unorm2_getDecomposition(const UNormalizer2 *norm2,
* @return the non-negative length of c's raw decomposition, if there is one; otherwise a negative value
* @stable ICU 49
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unorm2_getRawDecomposition(const UNormalizer2 *norm2,
UChar32 c, UChar *decomposition, int32_t capacity,
UErrorCode *pErrorCode);
@@ -405,7 +408,7 @@ unorm2_getRawDecomposition(const UNormalizer2 *norm2,
* @return The non-negative composite code point if there is one; otherwise a negative value.
* @stable ICU 49
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b);
/**
@@ -417,7 +420,7 @@ unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b);
* @return c's combining class
* @stable ICU 49
*/
-U_STABLE uint8_t U_EXPORT2
+U_CAPI uint8_t U_EXPORT2
unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c);
/**
@@ -433,10 +436,10 @@ unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c);
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
- * @return TRUE if s is normalized
+ * @return true if s is normalized
* @stable ICU 4.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
unorm2_isNormalized(const UNormalizer2 *norm2,
const UChar *s, int32_t length,
UErrorCode *pErrorCode);
@@ -458,7 +461,7 @@ unorm2_isNormalized(const UNormalizer2 *norm2,
* @return UNormalizationCheckResult
* @stable ICU 4.4
*/
-U_STABLE UNormalizationCheckResult U_EXPORT2
+U_CAPI UNormalizationCheckResult U_EXPORT2
unorm2_quickCheck(const UNormalizer2 *norm2,
const UChar *s, int32_t length,
UErrorCode *pErrorCode);
@@ -487,7 +490,7 @@ unorm2_quickCheck(const UNormalizer2 *norm2,
* @return "yes" span end index
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unorm2_spanQuickCheckYes(const UNormalizer2 *norm2,
const UChar *s, int32_t length,
UErrorCode *pErrorCode);
@@ -498,10 +501,10 @@ unorm2_spanQuickCheckYes(const UNormalizer2 *norm2,
* For details see the Normalizer2 base class documentation.
* @param norm2 UNormalizer2 instance
* @param c character to test
- * @return TRUE if c has a normalization boundary before it
+ * @return true if c has a normalization boundary before it
* @stable ICU 4.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
unorm2_hasBoundaryBefore(const UNormalizer2 *norm2, UChar32 c);
/**
@@ -510,10 +513,10 @@ unorm2_hasBoundaryBefore(const UNormalizer2 *norm2, UChar32 c);
* For details see the Normalizer2 base class documentation.
* @param norm2 UNormalizer2 instance
* @param c character to test
- * @return TRUE if c has a normalization boundary after it
+ * @return true if c has a normalization boundary after it
* @stable ICU 4.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
unorm2_hasBoundaryAfter(const UNormalizer2 *norm2, UChar32 c);
/**
@@ -521,10 +524,10 @@ unorm2_hasBoundaryAfter(const UNormalizer2 *norm2, UChar32 c);
* For details see the Normalizer2 base class documentation.
* @param norm2 UNormalizer2 instance
* @param c character to test
- * @return TRUE if c is normalization-inert
+ * @return true if c is normalization-inert
* @stable ICU 4.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
unorm2_isInert(const UNormalizer2 *norm2, UChar32 c);
/**
@@ -593,7 +596,7 @@ unorm2_isInert(const UNormalizer2 *norm2, UChar32 c);
*
* @stable ICU 2.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unorm_compare(const UChar *s1, int32_t length1,
const UChar *s2, int32_t length2,
uint32_t options,
diff --git a/deps/icu-small/source/common/unicode/urename.h b/deps/icu-small/source/common/unicode/urename.h
index 30f4b7af39adc5..20232cd209c2d6 100644
--- a/deps/icu-small/source/common/unicode/urename.h
+++ b/deps/icu-small/source/common/unicode/urename.h
@@ -130,7 +130,6 @@
#define izrule_getStaticClassID U_ICU_ENTRY_POINT_RENAME(izrule_getStaticClassID)
#define izrule_isEquivalentTo U_ICU_ENTRY_POINT_RENAME(izrule_isEquivalentTo)
#define izrule_open U_ICU_ENTRY_POINT_RENAME(izrule_open)
-#define locale_getKeywords U_ICU_ENTRY_POINT_RENAME(locale_getKeywords)
#define locale_getKeywordsStart U_ICU_ENTRY_POINT_RENAME(locale_getKeywordsStart)
#define locale_get_default U_ICU_ENTRY_POINT_RENAME(locale_get_default)
#define locale_set_default U_ICU_ENTRY_POINT_RENAME(locale_set_default)
@@ -918,9 +917,11 @@
#define udtitvfmt_format U_ICU_ENTRY_POINT_RENAME(udtitvfmt_format)
#define udtitvfmt_formatCalendarToResult U_ICU_ENTRY_POINT_RENAME(udtitvfmt_formatCalendarToResult)
#define udtitvfmt_formatToResult U_ICU_ENTRY_POINT_RENAME(udtitvfmt_formatToResult)
+#define udtitvfmt_getContext U_ICU_ENTRY_POINT_RENAME(udtitvfmt_getContext)
#define udtitvfmt_open U_ICU_ENTRY_POINT_RENAME(udtitvfmt_open)
#define udtitvfmt_openResult U_ICU_ENTRY_POINT_RENAME(udtitvfmt_openResult)
#define udtitvfmt_resultAsValue U_ICU_ENTRY_POINT_RENAME(udtitvfmt_resultAsValue)
+#define udtitvfmt_setContext U_ICU_ENTRY_POINT_RENAME(udtitvfmt_setContext)
#define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close)
#define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count)
#define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next)
@@ -1079,7 +1080,6 @@
#define uloc_getDisplayLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayLanguage)
#define uloc_getDisplayName U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayName)
#define uloc_getDisplayScript U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScript)
-#define uloc_getDisplayScriptInContext U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScriptInContext)
#define uloc_getDisplayVariant U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayVariant)
#define uloc_getISO3Country U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Country)
#define uloc_getISO3Language U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Language)
@@ -1123,10 +1123,14 @@
#define ulocimp_forLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocimp_forLanguageTag)
#define ulocimp_getBaseName U_ICU_ENTRY_POINT_RENAME(ulocimp_getBaseName)
#define ulocimp_getCountry U_ICU_ENTRY_POINT_RENAME(ulocimp_getCountry)
+#define ulocimp_getKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocimp_getKeywordValue)
+#define ulocimp_getKeywords U_ICU_ENTRY_POINT_RENAME(ulocimp_getKeywords)
+#define ulocimp_getKnownCanonicalizedLocaleForTest U_ICU_ENTRY_POINT_RENAME(ulocimp_getKnownCanonicalizedLocaleForTest)
#define ulocimp_getLanguage U_ICU_ENTRY_POINT_RENAME(ulocimp_getLanguage)
#define ulocimp_getName U_ICU_ENTRY_POINT_RENAME(ulocimp_getName)
#define ulocimp_getRegionForSupplementalData U_ICU_ENTRY_POINT_RENAME(ulocimp_getRegionForSupplementalData)
#define ulocimp_getScript U_ICU_ENTRY_POINT_RENAME(ulocimp_getScript)
+#define ulocimp_isCanonicalizedLocaleForTest U_ICU_ENTRY_POINT_RENAME(ulocimp_isCanonicalizedLocaleForTest)
#define ulocimp_minimizeSubtags U_ICU_ENTRY_POINT_RENAME(ulocimp_minimizeSubtags)
#define ulocimp_toBcpKey U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpKey)
#define ulocimp_toBcpType U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpType)
@@ -1245,7 +1249,18 @@
#define unumf_resultAsValue U_ICU_ENTRY_POINT_RENAME(unumf_resultAsValue)
#define unumf_resultGetAllFieldPositions U_ICU_ENTRY_POINT_RENAME(unumf_resultGetAllFieldPositions)
#define unumf_resultNextFieldPosition U_ICU_ENTRY_POINT_RENAME(unumf_resultNextFieldPosition)
+#define unumf_resultToDecimalNumber U_ICU_ENTRY_POINT_RENAME(unumf_resultToDecimalNumber)
#define unumf_resultToString U_ICU_ENTRY_POINT_RENAME(unumf_resultToString)
+#define unumrf_close U_ICU_ENTRY_POINT_RENAME(unumrf_close)
+#define unumrf_closeResult U_ICU_ENTRY_POINT_RENAME(unumrf_closeResult)
+#define unumrf_formatDecimalRange U_ICU_ENTRY_POINT_RENAME(unumrf_formatDecimalRange)
+#define unumrf_formatDoubleRange U_ICU_ENTRY_POINT_RENAME(unumrf_formatDoubleRange)
+#define unumrf_openForSkeletonWithCollapseAndIdentityFallback U_ICU_ENTRY_POINT_RENAME(unumrf_openForSkeletonWithCollapseAndIdentityFallback)
+#define unumrf_openResult U_ICU_ENTRY_POINT_RENAME(unumrf_openResult)
+#define unumrf_resultAsValue U_ICU_ENTRY_POINT_RENAME(unumrf_resultAsValue)
+#define unumrf_resultGetFirstDecimalNumber U_ICU_ENTRY_POINT_RENAME(unumrf_resultGetFirstDecimalNumber)
+#define unumrf_resultGetIdentityResult U_ICU_ENTRY_POINT_RENAME(unumrf_resultGetIdentityResult)
+#define unumrf_resultGetSecondDecimalNumber U_ICU_ENTRY_POINT_RENAME(unumrf_resultGetSecondDecimalNumber)
#define unumsys_close U_ICU_ENTRY_POINT_RENAME(unumsys_close)
#define unumsys_getDescription U_ICU_ENTRY_POINT_RENAME(unumsys_getDescription)
#define unumsys_getName U_ICU_ENTRY_POINT_RENAME(unumsys_getName)
@@ -1259,6 +1274,7 @@
#define uplrules_open U_ICU_ENTRY_POINT_RENAME(uplrules_open)
#define uplrules_openForType U_ICU_ENTRY_POINT_RENAME(uplrules_openForType)
#define uplrules_select U_ICU_ENTRY_POINT_RENAME(uplrules_select)
+#define uplrules_selectForRange U_ICU_ENTRY_POINT_RENAME(uplrules_selectForRange)
#define uplrules_selectFormatted U_ICU_ENTRY_POINT_RENAME(uplrules_selectFormatted)
#define uplrules_selectWithFormat U_ICU_ENTRY_POINT_RENAME(uplrules_selectWithFormat)
#define uplug_closeLibrary U_ICU_ENTRY_POINT_RENAME(uplug_closeLibrary)
diff --git a/deps/icu-small/source/common/unicode/ures.h b/deps/icu-small/source/common/unicode/ures.h
index 839779fada804d..fff84043e84785 100644
--- a/deps/icu-small/source/common/unicode/ures.h
+++ b/deps/icu-small/source/common/unicode/ures.h
@@ -27,7 +27,10 @@
#include "unicode/utypes.h"
#include "unicode/uloc.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -163,7 +166,7 @@ typedef enum {
* @see ures_close
* @stable ICU 2.0
*/
-U_STABLE UResourceBundle* U_EXPORT2
+U_CAPI UResourceBundle* U_EXPORT2
ures_open(const char* packageName,
const char* locale,
UErrorCode* status);
@@ -186,7 +189,7 @@ ures_open(const char* packageName,
* @see ures_close
* @stable ICU 2.0
*/
-U_STABLE UResourceBundle* U_EXPORT2
+U_CAPI UResourceBundle* U_EXPORT2
ures_openDirect(const char* packageName,
const char* locale,
UErrorCode* status);
@@ -209,7 +212,7 @@ ures_openDirect(const char* packageName,
* @see ures_open
* @stable ICU 2.0
*/
-U_STABLE UResourceBundle* U_EXPORT2
+U_CAPI UResourceBundle* U_EXPORT2
ures_openU(const UChar* packageName,
const char* locale,
UErrorCode* status);
@@ -245,7 +248,7 @@ ures_countArrayItems(const UResourceBundle* resourceBundle,
* @see ures_open
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ures_close(UResourceBundle* resourceBundle);
#if U_SHOW_CPLUSPLUS_API
@@ -291,7 +294,7 @@ ures_getVersionNumber(const UResourceBundle* resourceBundle);
* as specified in the resource bundle or its parent.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ures_getVersion(const UResourceBundle* resB,
UVersionInfo versionInfo);
@@ -325,7 +328,7 @@ ures_getLocale(const UResourceBundle* resourceBundle,
* @return A Locale name
* @stable ICU 2.8
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
ures_getLocaleByType(const UResourceBundle* resourceBundle,
ULocDataLocaleType type,
UErrorCode* status);
@@ -348,7 +351,7 @@ ures_getLocaleByType(const UResourceBundle* resourceBundle,
* @param status The error code.
* @internal
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
ures_openFillIn(UResourceBundle *r,
const char* packageName,
const char* localeID,
@@ -372,7 +375,7 @@ ures_openFillIn(UResourceBundle *r,
* @see ures_getUInt
* @stable ICU 2.0
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ures_getString(const UResourceBundle* resourceBundle,
int32_t* len,
UErrorCode* status);
@@ -383,10 +386,10 @@ ures_getString(const UResourceBundle* resourceBundle,
* it may need to be copied, or transformed from UTF-16 using u_strToUTF8()
* or equivalent.
*
- * If forceCopy==TRUE, then the string is always written to the dest buffer
+ * If forceCopy==true, then the string is always written to the dest buffer
* and dest is returned.
*
- * If forceCopy==FALSE, then the string is returned as a pointer if possible,
+ * If forceCopy==false, then the string is returned as a pointer if possible,
* without needing a dest buffer (it can be NULL). If the string needs to be
* copied or transformed, then it may be placed into dest at an arbitrary offset.
*
@@ -404,10 +407,10 @@ ures_getString(const UResourceBundle* resourceBundle,
* terminating NUL, even in case of U_BUFFER_OVERFLOW_ERROR.
* Can be NULL, meaning capacity=0 and the string length is not
* returned to the caller.
- * @param forceCopy If TRUE, then the output string will always be written to
+ * @param forceCopy If true, then the output string will always be written to
* dest, with U_BUFFER_OVERFLOW_ERROR and
* U_STRING_NOT_TERMINATED_WARNING set if appropriate.
- * If FALSE, then the dest buffer may or may not contain a
+ * If false, then the dest buffer may or may not contain a
* copy of the string. dest may or may not be modified.
* If a copy needs to be written, then the UErrorCode parameter
* indicates overflow etc. as usual.
@@ -424,7 +427,7 @@ ures_getString(const UResourceBundle* resourceBundle,
* @see u_strToUTF8
* @stable ICU 3.6
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ures_getUTF8String(const UResourceBundle *resB,
char *dest, int32_t *length,
UBool forceCopy,
@@ -447,7 +450,7 @@ ures_getUTF8String(const UResourceBundle *resB,
* @see ures_getUInt
* @stable ICU 2.0
*/
-U_STABLE const uint8_t* U_EXPORT2
+U_CAPI const uint8_t* U_EXPORT2
ures_getBinary(const UResourceBundle* resourceBundle,
int32_t* len,
UErrorCode* status);
@@ -469,7 +472,7 @@ ures_getBinary(const UResourceBundle* resourceBundle,
* @see ures_getUInt
* @stable ICU 2.0
*/
-U_STABLE const int32_t* U_EXPORT2
+U_CAPI const int32_t* U_EXPORT2
ures_getIntVector(const UResourceBundle* resourceBundle,
int32_t* len,
UErrorCode* status);
@@ -490,7 +493,7 @@ ures_getIntVector(const UResourceBundle* resourceBundle,
* @see ures_getString
* @stable ICU 2.0
*/
-U_STABLE uint32_t U_EXPORT2
+U_CAPI uint32_t U_EXPORT2
ures_getUInt(const UResourceBundle* resourceBundle,
UErrorCode *status);
@@ -510,7 +513,7 @@ ures_getUInt(const UResourceBundle* resourceBundle,
* @see ures_getString
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ures_getInt(const UResourceBundle* resourceBundle,
UErrorCode *status);
@@ -524,7 +527,7 @@ ures_getInt(const UResourceBundle* resourceBundle,
* @return number of resources in a given resource.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ures_getSize(const UResourceBundle *resourceBundle);
/**
@@ -535,7 +538,7 @@ ures_getSize(const UResourceBundle *resourceBundle);
* @see UResType
* @stable ICU 2.0
*/
-U_STABLE UResType U_EXPORT2
+U_CAPI UResType U_EXPORT2
ures_getType(const UResourceBundle *resourceBundle);
/**
@@ -546,7 +549,7 @@ ures_getType(const UResourceBundle *resourceBundle);
* @return a key associated to this resource, or NULL if it doesn't have a key
* @stable ICU 2.0
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ures_getKey(const UResourceBundle *resourceBundle);
/* ITERATION API
@@ -559,17 +562,17 @@ ures_getKey(const UResourceBundle *resourceBundle);
* @param resourceBundle a resource
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ures_resetIterator(UResourceBundle *resourceBundle);
/**
* Checks whether the given resource has another element to iterate over.
*
* @param resourceBundle a resource
- * @return TRUE if there are more elements, FALSE if there is no more elements
+ * @return true if there are more elements, false if there is no more elements
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ures_hasNext(const UResourceBundle *resourceBundle);
/**
@@ -584,7 +587,7 @@ ures_hasNext(const UResourceBundle *resourceBundle);
* @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must close it
* @stable ICU 2.0
*/
-U_STABLE UResourceBundle* U_EXPORT2
+U_CAPI UResourceBundle* U_EXPORT2
ures_getNextResource(UResourceBundle *resourceBundle,
UResourceBundle *fillIn,
UErrorCode *status);
@@ -601,7 +604,7 @@ ures_getNextResource(UResourceBundle *resourceBundle,
* @return a pointer to a zero-terminated UChar array which lives in a memory mapped/DLL file.
* @stable ICU 2.0
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ures_getNextString(UResourceBundle *resourceBundle,
int32_t* len,
const char ** key,
@@ -619,7 +622,7 @@ ures_getNextString(UResourceBundle *resourceBundle,
* @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must close it
* @stable ICU 2.0
*/
-U_STABLE UResourceBundle* U_EXPORT2
+U_CAPI UResourceBundle* U_EXPORT2
ures_getByIndex(const UResourceBundle *resourceBundle,
int32_t indexR,
UResourceBundle *fillIn,
@@ -636,7 +639,7 @@ ures_getByIndex(const UResourceBundle *resourceBundle,
* @return a pointer to a zero-terminated UChar array which lives in a memory mapped/DLL file.
* @stable ICU 2.0
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ures_getStringByIndex(const UResourceBundle *resourceBundle,
int32_t indexS,
int32_t* len,
@@ -648,10 +651,10 @@ ures_getStringByIndex(const UResourceBundle *resourceBundle,
* it may need to be copied, or transformed from UTF-16 using u_strToUTF8()
* or equivalent.
*
- * If forceCopy==TRUE, then the string is always written to the dest buffer
+ * If forceCopy==true, then the string is always written to the dest buffer
* and dest is returned.
*
- * If forceCopy==FALSE, then the string is returned as a pointer if possible,
+ * If forceCopy==false, then the string is returned as a pointer if possible,
* without needing a dest buffer (it can be NULL). If the string needs to be
* copied or transformed, then it may be placed into dest at an arbitrary offset.
*
@@ -670,10 +673,10 @@ ures_getStringByIndex(const UResourceBundle *resourceBundle,
* terminating NUL, even in case of U_BUFFER_OVERFLOW_ERROR.
* Can be NULL, meaning capacity=0 and the string length is not
* returned to the caller.
- * @param forceCopy If TRUE, then the output string will always be written to
+ * @param forceCopy If true, then the output string will always be written to
* dest, with U_BUFFER_OVERFLOW_ERROR and
* U_STRING_NOT_TERMINATED_WARNING set if appropriate.
- * If FALSE, then the dest buffer may or may not contain a
+ * If false, then the dest buffer may or may not contain a
* copy of the string. dest may or may not be modified.
* If a copy needs to be written, then the UErrorCode parameter
* indicates overflow etc. as usual.
@@ -690,7 +693,7 @@ ures_getStringByIndex(const UResourceBundle *resourceBundle,
* @see u_strToUTF8
* @stable ICU 3.6
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ures_getUTF8StringByIndex(const UResourceBundle *resB,
int32_t stringIndex,
char *dest, int32_t *pLength,
@@ -709,7 +712,7 @@ ures_getUTF8StringByIndex(const UResourceBundle *resB,
* @return a pointer to a UResourceBundle struct. If fill in param was NULL, caller must close it
* @stable ICU 2.0
*/
-U_STABLE UResourceBundle* U_EXPORT2
+U_CAPI UResourceBundle* U_EXPORT2
ures_getByKey(const UResourceBundle *resourceBundle,
const char* key,
UResourceBundle *fillIn,
@@ -727,7 +730,7 @@ ures_getByKey(const UResourceBundle *resourceBundle,
* @return a pointer to a zero-terminated UChar array which lives in a memory mapped/DLL file.
* @stable ICU 2.0
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ures_getStringByKey(const UResourceBundle *resB,
const char* key,
int32_t* len,
@@ -741,10 +744,10 @@ ures_getStringByKey(const UResourceBundle *resB,
* it may need to be copied, or transformed from UTF-16 using u_strToUTF8()
* or equivalent.
*
- * If forceCopy==TRUE, then the string is always written to the dest buffer
+ * If forceCopy==true, then the string is always written to the dest buffer
* and dest is returned.
*
- * If forceCopy==FALSE, then the string is returned as a pointer if possible,
+ * If forceCopy==false, then the string is returned as a pointer if possible,
* without needing a dest buffer (it can be NULL). If the string needs to be
* copied or transformed, then it may be placed into dest at an arbitrary offset.
*
@@ -763,10 +766,10 @@ ures_getStringByKey(const UResourceBundle *resB,
* terminating NUL, even in case of U_BUFFER_OVERFLOW_ERROR.
* Can be NULL, meaning capacity=0 and the string length is not
* returned to the caller.
- * @param forceCopy If TRUE, then the output string will always be written to
+ * @param forceCopy If true, then the output string will always be written to
* dest, with U_BUFFER_OVERFLOW_ERROR and
* U_STRING_NOT_TERMINATED_WARNING set if appropriate.
- * If FALSE, then the dest buffer may or may not contain a
+ * If false, then the dest buffer may or may not contain a
* copy of the string. dest may or may not be modified.
* If a copy needs to be written, then the UErrorCode parameter
* indicates overflow etc. as usual.
@@ -783,7 +786,7 @@ ures_getStringByKey(const UResourceBundle *resB,
* @see u_strToUTF8
* @stable ICU 3.6
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ures_getUTF8StringByKey(const UResourceBundle *resB,
const char *key,
char *dest, int32_t *pLength,
@@ -811,7 +814,7 @@ ures_getUnicodeString(const UResourceBundle *resB, UErrorCode* status) {
int32_t len = 0;
const UChar *r = ures_getString(resB, &len, status);
if(U_SUCCESS(*status)) {
- result.setTo(TRUE, r, len);
+ result.setTo(true, r, len);
} else {
result.setToBogus();
}
@@ -836,7 +839,7 @@ ures_getNextUnicodeString(UResourceBundle *resB, const char ** key, UErrorCode*
int32_t len = 0;
const UChar* r = ures_getNextString(resB, &len, key, status);
if(U_SUCCESS(*status)) {
- result.setTo(TRUE, r, len);
+ result.setTo(true, r, len);
} else {
result.setToBogus();
}
@@ -858,7 +861,7 @@ ures_getUnicodeStringByIndex(const UResourceBundle *resB, int32_t indexS, UError
int32_t len = 0;
const UChar* r = ures_getStringByIndex(resB, indexS, &len, status);
if(U_SUCCESS(*status)) {
- result.setTo(TRUE, r, len);
+ result.setTo(true, r, len);
} else {
result.setToBogus();
}
@@ -881,7 +884,7 @@ ures_getUnicodeStringByKey(const UResourceBundle *resB, const char* key, UErrorC
int32_t len = 0;
const UChar* r = ures_getStringByKey(resB, key, &len, status);
if(U_SUCCESS(*status)) {
- result.setTo(TRUE, r, len);
+ result.setTo(true, r, len);
} else {
result.setToBogus();
}
@@ -900,7 +903,7 @@ U_NAMESPACE_END
* @param status error code
* @stable ICU 3.2
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
ures_openAvailableLocales(const char *packageName, UErrorCode *status);
diff --git a/deps/icu-small/source/common/unicode/uscript.h b/deps/icu-small/source/common/unicode/uscript.h
index 53d57abed14cd0..8448afda761550 100644
--- a/deps/icu-small/source/common/unicode/uscript.h
+++ b/deps/icu-small/source/common/unicode/uscript.h
@@ -514,7 +514,7 @@ typedef enum UScriptCode {
* @return The number of script codes filled in the buffer passed in
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uscript_getCode(const char* nameOrAbbrOrLocale,UScriptCode* fillIn,int32_t capacity,UErrorCode *err);
/**
@@ -527,7 +527,7 @@ uscript_getCode(const char* nameOrAbbrOrLocale,UScriptCode* fillIn,int32_t capac
* or NULL if scriptCode is invalid
* @stable ICU 2.4
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uscript_getName(UScriptCode scriptCode);
/**
@@ -539,7 +539,7 @@ uscript_getName(UScriptCode scriptCode);
* @return short script name (4-letter code), or NULL if scriptCode is invalid
* @stable ICU 2.4
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uscript_getShortName(UScriptCode scriptCode);
/**
@@ -550,7 +550,7 @@ uscript_getShortName(UScriptCode scriptCode);
* @return The UScriptCode, or 0 if codepoint is invalid
* @stable ICU 2.4
*/
-U_STABLE UScriptCode U_EXPORT2
+U_CAPI UScriptCode U_EXPORT2
uscript_getScript(UChar32 codepoint, UErrorCode *err);
/**
@@ -562,10 +562,10 @@ uscript_getScript(UChar32 codepoint, UErrorCode *err);
* For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
* @param c code point
* @param sc script code
- * @return TRUE if sc is in Script_Extensions(c)
+ * @return true if sc is in Script_Extensions(c)
* @stable ICU 49
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uscript_hasScript(UChar32 c, UScriptCode sc);
/**
@@ -597,7 +597,7 @@ uscript_hasScript(UChar32 c, UScriptCode sc);
* written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity
* @stable ICU 49
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uscript_getScriptExtensions(UChar32 c,
UScriptCode *scripts, int32_t capacity,
UErrorCode *errorCode);
@@ -636,7 +636,7 @@ typedef enum UScriptUsage {
* @return the string length, even if U_BUFFER_OVERFLOW_ERROR
* @stable ICU 51
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode);
#if U_SHOW_CPLUSPLUS_API
@@ -668,41 +668,41 @@ uscript_getSampleUnicodeString(UScriptCode script);
* @see UScriptUsage
* @stable ICU 51
*/
-U_STABLE UScriptUsage U_EXPORT2
+U_CAPI UScriptUsage U_EXPORT2
uscript_getUsage(UScriptCode script);
/**
- * Returns TRUE if the script is written right-to-left.
+ * Returns true if the script is written right-to-left.
* For example, Arab and Hebr.
*
* @param script script code
- * @return TRUE if the script is right-to-left
+ * @return true if the script is right-to-left
* @stable ICU 51
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uscript_isRightToLeft(UScriptCode script);
/**
- * Returns TRUE if the script allows line breaks between letters (excluding hyphenation).
+ * Returns true if the script allows line breaks between letters (excluding hyphenation).
* Such a script typically requires dictionary-based line breaking.
* For example, Hani and Thai.
*
* @param script script code
- * @return TRUE if the script allows line breaks between letters
+ * @return true if the script allows line breaks between letters
* @stable ICU 51
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uscript_breaksBetweenLetters(UScriptCode script);
/**
- * Returns TRUE if in modern (or most recent) usage of the script case distinctions are customary.
+ * Returns true if in modern (or most recent) usage of the script case distinctions are customary.
* For example, Latn and Cyrl.
*
* @param script script code
- * @return TRUE if the script is cased
+ * @return true if the script is cased
* @stable ICU 51
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uscript_isCased(UScriptCode script);
#endif
diff --git a/deps/icu-small/source/common/unicode/uset.h b/deps/icu-small/source/common/unicode/uset.h
index ef6bbb5c38f3fb..473cc6fbae4e0d 100644
--- a/deps/icu-small/source/common/unicode/uset.h
+++ b/deps/icu-small/source/common/unicode/uset.h
@@ -31,7 +31,10 @@
#include "unicode/utypes.h"
#include "unicode/uchar.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
#ifndef USET_DEFINED
@@ -158,7 +161,7 @@ typedef enum USetSpanCondition {
* Continues a span() while there is no set element at the current position.
* Increments by one code point at a time.
* Stops before the first set element (character or string).
- * (For code points only, this is like while contains(current)==FALSE).
+ * (For code points only, this is like while contains(current)==false).
*
* When span() returns, the substring between where it started and the position
* it returned consists only of characters that are not in the set,
@@ -169,7 +172,7 @@ typedef enum USetSpanCondition {
USET_SPAN_NOT_CONTAINED = 0,
/**
* Spans the longest substring that is a concatenation of set elements (characters or strings).
- * (For characters only, this is like while contains(current)==TRUE).
+ * (For characters only, this is like while contains(current)==true).
*
* When span() returns, the substring between where it started and the position
* it returned consists only of set elements (characters or strings) that are in the set.
@@ -185,7 +188,7 @@ typedef enum USetSpanCondition {
/**
* Continues a span() while there is a set element at the current position.
* Increments by the longest matching element at each position.
- * (For characters only, this is like while contains(current)==TRUE).
+ * (For characters only, this is like while contains(current)==true).
*
* When span() returns, the substring between where it started and the position
* it returned consists only of set elements (characters or strings) that are in the set.
@@ -260,7 +263,7 @@ typedef struct USerializedSet {
* it when done.
* @stable ICU 4.2
*/
-U_STABLE USet* U_EXPORT2
+U_CAPI USet* U_EXPORT2
uset_openEmpty(void);
/**
@@ -273,7 +276,7 @@ uset_openEmpty(void);
* it when done.
* @stable ICU 2.4
*/
-U_STABLE USet* U_EXPORT2
+U_CAPI USet* U_EXPORT2
uset_open(UChar32 start, UChar32 end);
/**
@@ -285,7 +288,7 @@ uset_open(UChar32 start, UChar32 end);
* @param ec the error code
* @stable ICU 2.4
*/
-U_STABLE USet* U_EXPORT2
+U_CAPI USet* U_EXPORT2
uset_openPattern(const UChar* pattern, int32_t patternLength,
UErrorCode* ec);
@@ -300,7 +303,7 @@ uset_openPattern(const UChar* pattern, int32_t patternLength,
* @param ec the error code
* @stable ICU 2.4
*/
-U_STABLE USet* U_EXPORT2
+U_CAPI USet* U_EXPORT2
uset_openPatternOptions(const UChar* pattern, int32_t patternLength,
uint32_t options,
UErrorCode* ec);
@@ -311,7 +314,7 @@ uset_openPatternOptions(const UChar* pattern, int32_t patternLength,
* @param set the object to dispose of
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_close(USet* set);
#if U_SHOW_CPLUSPLUS_API
@@ -342,19 +345,19 @@ U_NAMESPACE_END
* @see uset_cloneAsThawed
* @stable ICU 3.8
*/
-U_STABLE USet * U_EXPORT2
+U_CAPI USet * U_EXPORT2
uset_clone(const USet *set);
/**
* Determines whether the set has been frozen (made immutable) or not.
* See the ICU4J Freezable interface for details.
* @param set the set
- * @return TRUE/FALSE for whether the set has been frozen
+ * @return true/false for whether the set has been frozen
* @see uset_freeze
* @see uset_cloneAsThawed
* @stable ICU 3.8
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_isFrozen(const USet *set);
/**
@@ -371,7 +374,7 @@ uset_isFrozen(const USet *set);
* @see uset_cloneAsThawed
* @stable ICU 3.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_freeze(USet *set);
/**
@@ -384,7 +387,7 @@ uset_freeze(USet *set);
* @see uset_clone
* @stable ICU 3.8
*/
-U_STABLE USet * U_EXPORT2
+U_CAPI USet * U_EXPORT2
uset_cloneAsThawed(const USet *set);
/**
@@ -396,7 +399,7 @@ uset_cloneAsThawed(const USet *set);
* @param end last character in the set, inclusive
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_set(USet* set,
UChar32 start, UChar32 end);
@@ -421,7 +424,7 @@ uset_set(USet* set,
*
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_applyPattern(USet *set,
const UChar *pattern, int32_t patternLength,
uint32_t options,
@@ -449,7 +452,7 @@ uset_applyPattern(USet *set,
*
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_applyIntPropertyValue(USet* set,
UProperty prop, int32_t value, UErrorCode* ec);
@@ -488,7 +491,7 @@ uset_applyIntPropertyValue(USet* set,
*
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_applyPropertyAlias(USet* set,
const UChar *prop, int32_t propLength,
const UChar *value, int32_t valueLength,
@@ -503,7 +506,7 @@ uset_applyPropertyAlias(USet* set,
* @param pos the given position
* @stable ICU 3.2
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_resemblesPattern(const UChar *pattern, int32_t patternLength,
int32_t pos);
@@ -514,7 +517,7 @@ uset_resemblesPattern(const UChar *pattern, int32_t patternLength,
* @param set the set
* @param result the string to receive the rules, may be NULL
* @param resultCapacity the capacity of result, may be 0 if result is NULL
- * @param escapeUnprintable if TRUE then convert unprintable
+ * @param escapeUnprintable if true then convert unprintable
* character to their hex escape representations, \\uxxxx or
* \\Uxxxxxxxx. Unprintable characters are those other than
* U+000A, U+0020..U+007E.
@@ -522,7 +525,7 @@ uset_resemblesPattern(const UChar *pattern, int32_t patternLength,
* @return length of string, possibly larger than resultCapacity
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_toPattern(const USet* set,
UChar* result, int32_t resultCapacity,
UBool escapeUnprintable,
@@ -530,13 +533,13 @@ uset_toPattern(const USet* set,
/**
* Adds the given character to the given USet. After this call,
- * uset_contains(set, c) will return TRUE.
+ * uset_contains(set, c) will return true.
* A frozen set will not be modified.
* @param set the object to which to add the character
* @param c the character to add
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_add(USet* set, UChar32 c);
/**
@@ -551,31 +554,31 @@ uset_add(USet* set, UChar32 c);
* @param additionalSet the source set whose elements are to be added to this set.
* @stable ICU 2.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_addAll(USet* set, const USet *additionalSet);
/**
* Adds the given range of characters to the given USet. After this call,
- * uset_contains(set, start, end) will return TRUE.
+ * uset_contains(set, start, end) will return true.
* A frozen set will not be modified.
* @param set the object to which to add the character
* @param start the first character of the range to add, inclusive
* @param end the last character of the range to add, inclusive
* @stable ICU 2.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_addRange(USet* set, UChar32 start, UChar32 end);
/**
* Adds the given string to the given USet. After this call,
- * uset_containsString(set, str, strLen) will return TRUE.
+ * uset_containsString(set, str, strLen) will return true.
* A frozen set will not be modified.
* @param set the object to which to add the character
* @param str the string to add
* @param strLen the length of the string or -1 if null terminated.
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_addString(USet* set, const UChar* str, int32_t strLen);
/**
@@ -587,42 +590,42 @@ uset_addString(USet* set, const UChar* str, int32_t strLen);
* @param strLen the length of the string or -1 if null terminated.
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_addAllCodePoints(USet* set, const UChar *str, int32_t strLen);
/**
* Removes the given character from the given USet. After this call,
- * uset_contains(set, c) will return FALSE.
+ * uset_contains(set, c) will return false.
* A frozen set will not be modified.
* @param set the object from which to remove the character
* @param c the character to remove
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_remove(USet* set, UChar32 c);
/**
* Removes the given range of characters from the given USet. After this call,
- * uset_contains(set, start, end) will return FALSE.
+ * uset_contains(set, start, end) will return false.
* A frozen set will not be modified.
* @param set the object to which to add the character
* @param start the first character of the range to remove, inclusive
* @param end the last character of the range to remove, inclusive
* @stable ICU 2.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_removeRange(USet* set, UChar32 start, UChar32 end);
/**
* Removes the given string to the given USet. After this call,
- * uset_containsString(set, str, strLen) will return FALSE.
+ * uset_containsString(set, str, strLen) will return false.
* A frozen set will not be modified.
* @param set the object to which to add the character
* @param str the string to remove
* @param strLen the length of the string or -1 if null terminated.
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_removeString(USet* set, const UChar* str, int32_t strLen);
/**
@@ -636,7 +639,7 @@ uset_removeString(USet* set, const UChar* str, int32_t strLen);
* removed from this set
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_removeAll(USet* set, const USet* removeSet);
/**
@@ -653,7 +656,7 @@ uset_removeAll(USet* set, const USet* removeSet);
* to this set.
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_retain(USet* set, UChar32 start, UChar32 end);
/**
@@ -668,7 +671,7 @@ uset_retain(USet* set, UChar32 start, UChar32 end);
* @param retain set that defines which elements this set will retain
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_retainAll(USet* set, const USet* retain);
/**
@@ -679,7 +682,7 @@ uset_retainAll(USet* set, const USet* retain);
* @param set the object on which to perfrom the compact
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_compact(USet* set);
/**
@@ -690,7 +693,7 @@ uset_compact(USet* set);
* @param set the set
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_complement(USet* set);
/**
@@ -704,7 +707,7 @@ uset_complement(USet* set);
* from this set.
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_complementAll(USet* set, const USet* complement);
/**
@@ -714,7 +717,7 @@ uset_complementAll(USet* set, const USet* complement);
* @param set the set
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_clear(USet* set);
/**
@@ -743,7 +746,7 @@ uset_clear(USet* set);
* are ignored.
* @stable ICU 4.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_closeOver(USet* set, int32_t attributes);
/**
@@ -752,51 +755,51 @@ uset_closeOver(USet* set, int32_t attributes);
* @param set the set
* @stable ICU 4.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_removeAllStrings(USet* set);
/**
- * Returns TRUE if the given USet contains no characters and no
+ * Returns true if the given USet contains no characters and no
* strings.
* @param set the set
* @return true if set is empty
* @stable ICU 2.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_isEmpty(const USet* set);
/**
- * Returns TRUE if the given USet contains the given character.
+ * Returns true if the given USet contains the given character.
* This function works faster with a frozen set.
* @param set the set
* @param c The codepoint to check for within the set
* @return true if set contains c
* @stable ICU 2.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_contains(const USet* set, UChar32 c);
/**
- * Returns TRUE if the given USet contains all characters c
+ * Returns true if the given USet contains all characters c
* where start <= c && c <= end.
* @param set the set
* @param start the first character of the range to test, inclusive
* @param end the last character of the range to test, inclusive
- * @return TRUE if set contains the range
+ * @return true if set contains the range
* @stable ICU 2.2
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_containsRange(const USet* set, UChar32 start, UChar32 end);
/**
- * Returns TRUE if the given USet contains the given string.
+ * Returns true if the given USet contains the given string.
* @param set the set
* @param str the string
* @param strLen the length of the string or -1 if null terminated.
* @return true if set contains str
* @stable ICU 2.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_containsString(const USet* set, const UChar* str, int32_t strLen);
/**
@@ -809,7 +812,7 @@ uset_containsString(const USet* set, const UChar* str, int32_t strLen);
* @return an index from 0..size()-1, or -1
* @stable ICU 3.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_indexOf(const USet* set, UChar32 c);
/**
@@ -822,7 +825,7 @@ uset_indexOf(const USet* set, UChar32 c);
* @return the character at the given index, or (UChar32)-1.
* @stable ICU 3.2
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
uset_charAt(const USet* set, int32_t charIndex);
/**
@@ -833,7 +836,7 @@ uset_charAt(const USet* set, int32_t charIndex);
* contained in set
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_size(const USet* set);
/**
@@ -844,7 +847,7 @@ uset_size(const USet* set);
* and/or strings contained in set
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_getItemCount(const USet* set);
/**
@@ -865,7 +868,7 @@ uset_getItemCount(const USet* set);
* itemIndex is out of range
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_getItem(const USet* set, int32_t itemIndex,
UChar32* start, UChar32* end,
UChar* str, int32_t strCapacity,
@@ -879,7 +882,7 @@ uset_getItem(const USet* set, int32_t itemIndex,
* @return true if the test condition is met
* @stable ICU 3.2
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_containsAll(const USet* set1, const USet* set2);
/**
@@ -892,7 +895,7 @@ uset_containsAll(const USet* set1, const USet* set2);
* @return true if the test condition is met
* @stable ICU 3.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_containsAllCodePoints(const USet* set, const UChar *str, int32_t strLen);
/**
@@ -903,7 +906,7 @@ uset_containsAllCodePoints(const USet* set, const UChar *str, int32_t strLen);
* @return true if the test condition is met
* @stable ICU 3.2
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_containsNone(const USet* set1, const USet* set2);
/**
@@ -914,7 +917,7 @@ uset_containsNone(const USet* set1, const USet* set2);
* @return true if the test condition is met
* @stable ICU 3.2
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_containsSome(const USet* set1, const USet* set2);
/**
@@ -936,7 +939,7 @@ uset_containsSome(const USet* set1, const USet* set2);
* @stable ICU 3.8
* @see USetSpanCondition
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_span(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition);
/**
@@ -957,7 +960,7 @@ uset_span(const USet *set, const UChar *s, int32_t length, USetSpanCondition spa
* @stable ICU 3.8
* @see USetSpanCondition
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_spanBack(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition);
/**
@@ -979,7 +982,7 @@ uset_spanBack(const USet *set, const UChar *s, int32_t length, USetSpanCondition
* @stable ICU 3.8
* @see USetSpanCondition
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_spanUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition);
/**
@@ -1000,7 +1003,7 @@ uset_spanUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition
* @stable ICU 3.8
* @see USetSpanCondition
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_spanBackUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition);
/**
@@ -1011,7 +1014,7 @@ uset_spanBackUTF8(const USet *set, const char *s, int32_t length, USetSpanCondit
* @return true if the test condition is met
* @stable ICU 3.2
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_equals(const USet* set1, const USet* set2);
/*********************************************************************
@@ -1067,7 +1070,7 @@ uset_equals(const USet* set1, const USet* set2);
* than U_BUFFER_OVERFLOW_ERROR.
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode);
/**
@@ -1078,7 +1081,7 @@ uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode
* @return true if the given array is valid, otherwise false
* @stable ICU 2.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcLength);
/**
@@ -1088,18 +1091,18 @@ uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcL
* @param c The codepoint to set
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_setSerializedToOne(USerializedSet* fillSet, UChar32 c);
/**
- * Returns TRUE if the given USerializedSet contains the given
+ * Returns true if the given USerializedSet contains the given
* character.
* @param set the serialized set
* @param c The codepoint to check for within the set
* @return true if set contains c
* @stable ICU 2.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_serializedContains(const USerializedSet* set, UChar32 c);
/**
@@ -1111,7 +1114,7 @@ uset_serializedContains(const USerializedSet* set, UChar32 c);
* contained in set
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_getSerializedRangeCount(const USerializedSet* set);
/**
@@ -1127,7 +1130,7 @@ uset_getSerializedRangeCount(const USerializedSet* set);
* @return true if rangeIndex is valid, otherwise false
* @stable ICU 2.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
UChar32* pStart, UChar32* pEnd);
diff --git a/deps/icu-small/source/common/unicode/usetiter.h b/deps/icu-small/source/common/unicode/usetiter.h
index f3f470f95aa5f5..45d268a05c9b90 100644
--- a/deps/icu-small/source/common/unicode/usetiter.h
+++ b/deps/icu-small/source/common/unicode/usetiter.h
@@ -176,7 +176,7 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
* If there are no more elements in the set, return false.
*
*
- * If isString() == TRUE, the value is a
+ * If isString() == true, the value is a
* string, otherwise the value is a
* single code point. Elements of either type can be retrieved
* with the function getString(), while elements of
@@ -197,7 +197,7 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
/**
* Returns the next element in the set, either a code point range
* or a string. If there are no more elements in the set, return
- * false. If isString() == TRUE, the value is a
+ * false. If isString() == true, the value is a
* string and can be accessed with getString(). Otherwise the value is a
* range of one or more code points from getCodepoint() to
* getCodepointeEnd() inclusive.
@@ -205,7 +205,7 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
*
The order of iteration is all code points ranges in sorted
* order, followed by all strings sorted order. Ranges are
* disjoint and non-contiguous. The value returned from getString()
- * is undefined unless isString() == TRUE. Do not mix calls to
+ * is undefined unless isString() == true. Do not mix calls to
* next() and nextRange() without calling
* reset() between them. The results of doing so are
* undefined.
diff --git a/deps/icu-small/source/common/unicode/ushape.h b/deps/icu-small/source/common/unicode/ushape.h
index 3064e0857281c5..9a85b73e4cba80 100644
--- a/deps/icu-small/source/common/unicode/ushape.h
+++ b/deps/icu-small/source/common/unicode/ushape.h
@@ -98,7 +98,7 @@
* the return value indicates the necessary destination buffer size.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_shapeArabic(const UChar *source, int32_t sourceLength,
UChar *dest, int32_t destSize,
uint32_t options,
diff --git a/deps/icu-small/source/common/unicode/usprep.h b/deps/icu-small/source/common/unicode/usprep.h
index 7cdc6cdd18ea6b..be06189e2e9e6d 100644
--- a/deps/icu-small/source/common/unicode/usprep.h
+++ b/deps/icu-small/source/common/unicode/usprep.h
@@ -25,7 +25,10 @@
*/
#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
*
@@ -181,7 +184,7 @@ typedef enum UStringPrepProfileType {
* @see usprep_close()
* @stable ICU 2.8
*/
-U_STABLE UStringPrepProfile* U_EXPORT2
+U_CAPI UStringPrepProfile* U_EXPORT2
usprep_open(const char* path,
const char* fileName,
UErrorCode* status);
@@ -197,7 +200,7 @@ usprep_open(const char* path,
* @see usprep_close()
* @stable ICU 4.2
*/
-U_STABLE UStringPrepProfile* U_EXPORT2
+U_CAPI UStringPrepProfile* U_EXPORT2
usprep_openByType(UStringPrepProfileType type,
UErrorCode* status);
@@ -206,7 +209,7 @@ usprep_openByType(UStringPrepProfileType type,
* @param profile The profile to close
* @stable ICU 2.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
usprep_close(UStringPrepProfile* profile);
#if U_SHOW_CPLUSPLUS_API
@@ -257,7 +260,7 @@ U_NAMESPACE_END
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
usprep_prepare( const UStringPrepProfile* prep,
const UChar* src, int32_t srcLength,
UChar* dest, int32_t destCapacity,
diff --git a/deps/icu-small/source/common/unicode/ustring.h b/deps/icu-small/source/common/unicode/ustring.h
index 0d2274a0cabb51..3243acbb7ebfce 100644
--- a/deps/icu-small/source/common/unicode/ustring.h
+++ b/deps/icu-small/source/common/unicode/ustring.h
@@ -89,7 +89,7 @@
* @return The number of UChars in chars
, minus the terminator.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strlen(const UChar *s);
/*@}*/
@@ -106,7 +106,7 @@ u_strlen(const UChar *s);
* @return The number of code points in the specified code units.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_countChar32(const UChar *s, int32_t length);
/**
@@ -127,7 +127,7 @@ u_countChar32(const UChar *s, int32_t length);
* than 'number'. Same as (u_countChar32(s, length)>number).
* @stable ICU 2.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number);
/**
@@ -140,7 +140,7 @@ u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number);
* @return A pointer to dst
.
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strcat(UChar *dst,
const UChar *src);
@@ -158,7 +158,7 @@ u_strcat(UChar *dst,
* @return A pointer to dst
.
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strncat(UChar *dst,
const UChar *src,
int32_t n);
@@ -183,7 +183,7 @@ u_strncat(UChar *dst,
* @see u_strFindFirst
* @see u_strFindLast
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strstr(const UChar *s, const UChar *substring);
/**
@@ -207,7 +207,7 @@ u_strstr(const UChar *s, const UChar *substring);
* @see u_strstr
* @see u_strFindLast
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strFindFirst(const UChar *s, int32_t length, const UChar *substring, int32_t subLength);
/**
@@ -227,7 +227,7 @@ u_strFindFirst(const UChar *s, int32_t length, const UChar *substring, int32_t s
* @see u_strstr
* @see u_strFindFirst
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strchr(const UChar *s, UChar c);
/**
@@ -247,7 +247,7 @@ u_strchr(const UChar *s, UChar c);
* @see u_strstr
* @see u_strFindFirst
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strchr32(const UChar *s, UChar32 c);
/**
@@ -270,7 +270,7 @@ u_strchr32(const UChar *s, UChar32 c);
* @see u_strFindFirst
* @see u_strFindLast
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strrstr(const UChar *s, const UChar *substring);
/**
@@ -294,7 +294,7 @@ u_strrstr(const UChar *s, const UChar *substring);
* @see u_strstr
* @see u_strFindLast
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strFindLast(const UChar *s, int32_t length, const UChar *substring, int32_t subLength);
/**
@@ -314,7 +314,7 @@ u_strFindLast(const UChar *s, int32_t length, const UChar *substring, int32_t su
* @see u_strrstr
* @see u_strFindLast
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strrchr(const UChar *s, UChar c);
/**
@@ -334,7 +334,7 @@ u_strrchr(const UChar *s, UChar c);
* @see u_strrstr
* @see u_strFindLast
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strrchr32(const UChar *s, UChar32 c);
/**
@@ -349,7 +349,7 @@ u_strrchr32(const UChar *s, UChar32 c);
* characters in matchSet
, or NULL if no such character is found.
* @stable ICU 2.0
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strpbrk(const UChar *string, const UChar *matchSet);
/**
@@ -365,7 +365,7 @@ u_strpbrk(const UChar *string, const UChar *matchSet);
* @see u_strspn
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strcspn(const UChar *string, const UChar *matchSet);
/**
@@ -381,7 +381,7 @@ u_strcspn(const UChar *string, const UChar *matchSet);
* @see u_strcspn
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strspn(const UChar *string, const UChar *matchSet);
/**
@@ -409,7 +409,7 @@ u_strspn(const UChar *string, const UChar *matchSet);
* when there are no more tokens.
* @stable ICU 2.0
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strtok_r(UChar *src,
const UChar *delim,
UChar **saveState);
@@ -424,7 +424,7 @@ u_strtok_r(UChar *src,
* value if s1
is bitwise greater than s2
.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strcmp(const UChar *s1,
const UChar *s2);
@@ -439,7 +439,7 @@ u_strcmp(const UChar *s1,
* in code point order
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strcmpCodePointOrder(const UChar *s1, const UChar *s2);
/**
@@ -462,14 +462,14 @@ u_strcmpCodePointOrder(const UChar *s1, const UChar *s2);
* @param s2 Second source string.
* @param length2 Length of second source string, or -1 if NUL-terminated.
*
- * @param codePointOrder Choose between code unit order (FALSE)
- * and code point order (TRUE).
+ * @param codePointOrder Choose between code unit order (false)
+ * and code point order (true).
*
* @return <0 or 0 or >0 as usual for string comparisons
*
* @stable ICU 2.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strCompare(const UChar *s1, int32_t length1,
const UChar *s2, int32_t length2,
UBool codePointOrder);
@@ -485,8 +485,8 @@ u_strCompare(const UChar *s1, int32_t length1,
*
* @param iter1 First source string iterator.
* @param iter2 Second source string iterator.
- * @param codePointOrder Choose between code unit order (FALSE)
- * and code point order (TRUE).
+ * @param codePointOrder Choose between code unit order (false)
+ * and code point order (true).
*
* @return <0 or 0 or >0 as usual for string comparisons
*
@@ -494,7 +494,7 @@ u_strCompare(const UChar *s1, int32_t length1,
*
* @stable ICU 2.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrder);
/**
@@ -537,7 +537,7 @@ u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrde
*
* @stable ICU 2.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strCaseCompare(const UChar *s1, int32_t length1,
const UChar *s2, int32_t length2,
uint32_t options,
@@ -555,7 +555,7 @@ u_strCaseCompare(const UChar *s1, int32_t length1,
* value if s1
is bitwise greater than s2
.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strncmp(const UChar *ucs1,
const UChar *ucs2,
int32_t n);
@@ -573,7 +573,7 @@ u_strncmp(const UChar *ucs1,
* in code point order
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n);
/**
@@ -595,7 +595,7 @@ u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n);
* @return A negative, zero, or positive integer indicating the comparison result.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options);
/**
@@ -619,7 +619,7 @@ u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options);
* @return A negative, zero, or positive integer indicating the comparison result.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options);
/**
@@ -643,7 +643,7 @@ u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options);
* @return A negative, zero, or positive integer indicating the comparison result.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options);
/**
@@ -654,7 +654,7 @@ u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options)
* @return A pointer to dst
.
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strcpy(UChar *dst,
const UChar *src);
@@ -669,7 +669,7 @@ u_strcpy(UChar *dst,
* @return A pointer to dst
.
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strncpy(UChar *dst,
const UChar *src,
int32_t n);
@@ -686,7 +686,7 @@ u_strncpy(UChar *dst,
* @return A pointer to dst
.
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2 u_uastrcpy(UChar *dst,
+U_CAPI UChar* U_EXPORT2 u_uastrcpy(UChar *dst,
const char *src );
/**
@@ -701,7 +701,7 @@ U_STABLE UChar* U_EXPORT2 u_uastrcpy(UChar *dst,
* @return A pointer to dst
.
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2 u_uastrncpy(UChar *dst,
+U_CAPI UChar* U_EXPORT2 u_uastrncpy(UChar *dst,
const char *src,
int32_t n);
@@ -715,7 +715,7 @@ U_STABLE UChar* U_EXPORT2 u_uastrncpy(UChar *dst,
* @return A pointer to dst
.
* @stable ICU 2.0
*/
-U_STABLE char* U_EXPORT2 u_austrcpy(char *dst,
+U_CAPI char* U_EXPORT2 u_austrcpy(char *dst,
const UChar *src );
/**
@@ -730,7 +730,7 @@ U_STABLE char* U_EXPORT2 u_austrcpy(char *dst,
* @return A pointer to dst
.
* @stable ICU 2.0
*/
-U_STABLE char* U_EXPORT2 u_austrncpy(char *dst,
+U_CAPI char* U_EXPORT2 u_austrncpy(char *dst,
const UChar *src,
int32_t n );
@@ -744,7 +744,7 @@ U_STABLE char* U_EXPORT2 u_austrncpy(char *dst,
* @return A pointer to dest
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_memcpy(UChar *dest, const UChar *src, int32_t count);
/**
@@ -755,7 +755,7 @@ u_memcpy(UChar *dest, const UChar *src, int32_t count);
* @return A pointer to dest
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_memmove(UChar *dest, const UChar *src, int32_t count);
/**
@@ -767,7 +767,7 @@ u_memmove(UChar *dest, const UChar *src, int32_t count);
* @return A pointer to dest
.
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_memset(UChar *dest, UChar c, int32_t count);
/**
@@ -781,7 +781,7 @@ u_memset(UChar *dest, UChar c, int32_t count);
* When buf1 > buf2, a positive number is returned.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count);
/**
@@ -797,7 +797,7 @@ u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count);
* in code point order
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count);
/**
@@ -817,7 +817,7 @@ u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count);
* @see u_memchr32
* @see u_strFindFirst
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_memchr(const UChar *s, UChar c, int32_t count);
/**
@@ -837,7 +837,7 @@ u_memchr(const UChar *s, UChar c, int32_t count);
* @see u_memchr
* @see u_strFindFirst
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_memchr32(const UChar *s, UChar32 c, int32_t count);
/**
@@ -857,7 +857,7 @@ u_memchr32(const UChar *s, UChar32 c, int32_t count);
* @see u_memrchr32
* @see u_strFindLast
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_memrchr(const UChar *s, UChar c, int32_t count);
/**
@@ -877,7 +877,7 @@ u_memrchr(const UChar *s, UChar c, int32_t count);
* @see u_memrchr
* @see u_strFindLast
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_memrchr32(const UChar *s, UChar32 c, int32_t count);
/**
@@ -903,13 +903,13 @@ u_memrchr32(const UChar *s, UChar32 c, int32_t count);
*
* U_STRING_DECL(ustringVar1, "Quick-Fox 2", 11);
* U_STRING_DECL(ustringVar2, "jumps 5%", 8);
- * static UBool didInit=FALSE;
+ * static UBool didInit=false;
*
* int32_t function() {
* if(!didInit) {
* U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11);
* U_STRING_INIT(ustringVar2, "jumps 5%", 8);
- * didInit=TRUE;
+ * didInit=true;
* }
* return u_strcmp(ustringVar1, ustringVar2);
* }
@@ -992,7 +992,7 @@ u_memrchr32(const UChar *s, UChar32 c, int32_t count);
* @see UnicodeString#unescapeAt()
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_unescape(const char *src,
UChar *dest, int32_t destCapacity);
@@ -1040,7 +1040,7 @@ U_CDECL_END
* @see UnicodeString#unescapeAt()
* @stable ICU 2.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_unescapeAt(UNESCAPE_CHAR_AT charAt,
int32_t *offset,
int32_t length,
@@ -1066,7 +1066,7 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt,
* only some of the result was written to the destination buffer.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strToUpper(UChar *dest, int32_t destCapacity,
const UChar *src, int32_t srcLength,
const char *locale,
@@ -1092,7 +1092,7 @@ u_strToUpper(UChar *dest, int32_t destCapacity,
* only some of the result was written to the destination buffer.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strToLower(UChar *dest, int32_t destCapacity,
const UChar *src, int32_t srcLength,
const char *locale,
@@ -1138,7 +1138,7 @@ u_strToLower(UChar *dest, int32_t destCapacity,
* only some of the result was written to the destination buffer.
* @stable ICU 2.1
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strToTitle(UChar *dest, int32_t destCapacity,
const UChar *src, int32_t srcLength,
UBreakIterator *titleIter,
@@ -1171,7 +1171,7 @@ u_strToTitle(UChar *dest, int32_t destCapacity,
* only some of the result was written to the destination buffer.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_strFoldCase(UChar *dest, int32_t destCapacity,
const UChar *src, int32_t srcLength,
uint32_t options,
@@ -1200,7 +1200,7 @@ u_strFoldCase(UChar *dest, int32_t destCapacity,
* @return The pointer to destination buffer.
* @stable ICU 2.0
*/
-U_STABLE wchar_t* U_EXPORT2
+U_CAPI wchar_t* U_EXPORT2
u_strToWCS(wchar_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1229,7 +1229,7 @@ u_strToWCS(wchar_t *dest,
* @return The pointer to destination buffer.
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strFromWCS(UChar *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1260,7 +1260,7 @@ u_strFromWCS(UChar *dest,
* @see u_strToUTF8WithSub
* @see u_strFromUTF8
*/
-U_STABLE char* U_EXPORT2
+U_CAPI char* U_EXPORT2
u_strToUTF8(char *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1290,7 +1290,7 @@ u_strToUTF8(char *dest,
* @see u_strFromUTF8WithSub
* @see u_strFromUTF8Lenient
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strFromUTF8(UChar *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1333,7 +1333,7 @@ u_strFromUTF8(UChar *dest,
* @see u_strFromUTF8WithSub
* @stable ICU 3.6
*/
-U_STABLE char* U_EXPORT2
+U_CAPI char* U_EXPORT2
u_strToUTF8WithSub(char *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1378,7 +1378,7 @@ u_strToUTF8WithSub(char *dest,
* @see u_strToUTF8WithSub
* @stable ICU 3.6
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strFromUTF8WithSub(UChar *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1438,7 +1438,7 @@ u_strFromUTF8WithSub(UChar *dest,
* @see u_strToUTF8WithSub
* @stable ICU 3.6
*/
-U_STABLE UChar * U_EXPORT2
+U_CAPI UChar * U_EXPORT2
u_strFromUTF8Lenient(UChar *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1468,7 +1468,7 @@ u_strFromUTF8Lenient(UChar *dest,
* @see u_strFromUTF32
* @stable ICU 2.0
*/
-U_STABLE UChar32* U_EXPORT2
+U_CAPI UChar32* U_EXPORT2
u_strToUTF32(UChar32 *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1498,7 +1498,7 @@ u_strToUTF32(UChar32 *dest,
* @see u_strToUTF32
* @stable ICU 2.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strFromUTF32(UChar *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1541,7 +1541,7 @@ u_strFromUTF32(UChar *dest,
* @see u_strFromUTF32WithSub
* @stable ICU 4.2
*/
-U_STABLE UChar32* U_EXPORT2
+U_CAPI UChar32* U_EXPORT2
u_strToUTF32WithSub(UChar32 *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1585,7 +1585,7 @@ u_strToUTF32WithSub(UChar32 *dest,
* @see u_strToUTF32WithSub
* @stable ICU 4.2
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strFromUTF32WithSub(UChar *dest,
int32_t destCapacity,
int32_t *pDestLength,
@@ -1626,7 +1626,7 @@ u_strFromUTF32WithSub(UChar *dest,
* @see u_strToUTF8WithSub
* @see u_strFromJavaModifiedUTF8WithSub
*/
-U_STABLE char* U_EXPORT2
+U_CAPI char* U_EXPORT2
u_strToJavaModifiedUTF8(
char *dest,
int32_t destCapacity,
@@ -1676,7 +1676,7 @@ u_strToJavaModifiedUTF8(
* @see u_strToJavaModifiedUTF8
* @stable ICU 4.4
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_strFromJavaModifiedUTF8WithSub(
UChar *dest,
int32_t destCapacity,
diff --git a/deps/icu-small/source/common/unicode/utext.h b/deps/icu-small/source/common/unicode/utext.h
index d36c1c035e70f1..084362be78fc9d 100644
--- a/deps/icu-small/source/common/unicode/utext.h
+++ b/deps/icu-small/source/common/unicode/utext.h
@@ -180,7 +180,7 @@ typedef struct UText UText; /**< C typedef for struct UText. @stable ICU 3.6 */
*
* @stable ICU 3.4
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
utext_close(UText *ut);
/**
@@ -204,7 +204,7 @@ utext_close(UText *ut);
* will always be used and returned.
* @stable ICU 3.4
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
utext_openUTF8(UText *ut, const char *s, int64_t length, UErrorCode *status);
@@ -222,7 +222,7 @@ utext_openUTF8(UText *ut, const char *s, int64_t length, UErrorCode *status);
* will always be used and returned.
* @stable ICU 3.4
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status);
@@ -239,7 +239,7 @@ utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status);
* will always be used and returned.
* @stable ICU 3.4
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
utext_openUnicodeString(UText *ut, icu::UnicodeString *s, UErrorCode *status);
@@ -255,7 +255,7 @@ utext_openUnicodeString(UText *ut, icu::UnicodeString *s, UErrorCode *status);
* will always be used and returned.
* @stable ICU 3.4
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
utext_openConstUnicodeString(UText *ut, const icu::UnicodeString *s, UErrorCode *status);
@@ -271,7 +271,7 @@ utext_openConstUnicodeString(UText *ut, const icu::UnicodeString *s, UErrorCode
* @see Replaceable
* @stable ICU 3.4
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
utext_openReplaceable(UText *ut, icu::Replaceable *rep, UErrorCode *status);
/**
@@ -286,7 +286,7 @@ utext_openReplaceable(UText *ut, icu::Replaceable *rep, UErrorCode *status);
* @see Replaceable
* @stable ICU 3.4
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCode *status);
#endif
@@ -323,7 +323,7 @@ utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCode *s
* shallow clones provide some protection against errors of this type by
* disabling text modification via the cloned UText.
*
- * A shallow clone made with the readOnly parameter == FALSE will preserve the
+ * A shallow clone made with the readOnly parameter == false will preserve the
* utext_isWritable() state of the source object. Note, however, that
* write operations must be avoided while more than one UText exists that refer
* to the same underlying text.
@@ -339,8 +339,8 @@ utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCode *s
* If non-NULL, must refer to an already existing UText, which will then
* be reset to become the clone.
* @param src The UText to be cloned.
- * @param deep TRUE to request a deep clone, FALSE for a shallow clone.
- * @param readOnly TRUE to request that the cloned UText have read only access to the
+ * @param deep true to request a deep clone, false for a shallow clone.
+ * @param readOnly true to request that the cloned UText have read only access to the
* underlying text.
* @param status Errors are returned here. For deep clones, U_UNSUPPORTED_ERROR
@@ -349,7 +349,7 @@ utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCode *s
* @return The newly created clone, or NULL if the clone operation failed.
* @stable ICU 3.4
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCode *status);
@@ -357,14 +357,14 @@ utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCod
* Compare two UText objects for equality.
* UTexts are equal if they are iterating over the same text, and
* have the same iteration position within the text.
- * If either or both of the parameters are NULL, the comparison is FALSE.
+ * If either or both of the parameters are NULL, the comparison is false.
*
* @param a The first of the two UTexts to compare.
* @param b The other UText to be compared.
- * @return TRUE if the two UTexts are equal.
+ * @return true if the two UTexts are equal.
* @stable ICU 3.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
utext_equals(const UText *a, const UText *b);
@@ -385,11 +385,11 @@ utext_equals(const UText *a, const UText *b);
*
* @stable ICU 3.4
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
utext_nativeLength(UText *ut);
/**
- * Return TRUE if calculating the length of the text could be expensive.
+ * Return true if calculating the length of the text could be expensive.
* Finding the length of NUL terminated strings is considered to be expensive.
*
* Note that the value of this function may change
@@ -398,10 +398,10 @@ utext_nativeLength(UText *ut);
* be expensive to report it.
*
* @param ut the text to be accessed.
- * @return TRUE if determining the length of the text could be time consuming.
+ * @return true if determining the length of the text could be time consuming.
* @stable ICU 3.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
utext_isLengthExpensive(const UText *ut);
/**
@@ -429,7 +429,7 @@ utext_isLengthExpensive(const UText *ut);
* @return the code point at the specified index.
* @stable ICU 3.4
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
utext_char32At(UText *ut, int64_t nativeIndex);
@@ -443,7 +443,7 @@ utext_char32At(UText *ut, int64_t nativeIndex);
* @return the Unicode code point at the current iterator position.
* @stable ICU 3.4
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
utext_current32(UText *ut);
@@ -465,7 +465,7 @@ utext_current32(UText *ut);
* @see UTEXT_NEXT32
* @stable ICU 3.4
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
utext_next32(UText *ut);
@@ -486,7 +486,7 @@ utext_next32(UText *ut);
* @see UTEXT_PREVIOUS32
* @stable ICU 3.4
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
utext_previous32(UText *ut);
@@ -508,7 +508,7 @@ utext_previous32(UText *ut);
* or U_SENTINEL (-1) if it is out of bounds.
* @stable ICU 3.4
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
utext_next32From(UText *ut, int64_t nativeIndex);
@@ -528,7 +528,7 @@ utext_next32From(UText *ut, int64_t nativeIndex);
*
* @stable ICU 3.4
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
utext_previous32From(UText *ut, int64_t nativeIndex);
/**
@@ -543,7 +543,7 @@ utext_previous32From(UText *ut, int64_t nativeIndex);
* @return the current index position, in the native units of the text provider.
* @stable ICU 3.4
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
utext_getNativeIndex(const UText *ut);
/**
@@ -569,7 +569,7 @@ utext_getNativeIndex(const UText *ut);
* @param nativeIndex the native unit index of the new iteration position.
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utext_setNativeIndex(UText *ut, int64_t nativeIndex);
/**
@@ -584,11 +584,11 @@ utext_setNativeIndex(UText *ut, int64_t nativeIndex);
*
* @param ut the text to be accessed.
* @param delta the signed number of code points to move the iteration position.
- * @return TRUE if the position could be moved the requested number of positions while
+ * @return true if the position could be moved the requested number of positions while
* staying within the range [0 - text length].
* @stable ICU 3.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
utext_moveIndex32(UText *ut, int32_t delta);
/**
@@ -613,7 +613,7 @@ utext_moveIndex32(UText *ut, int32_t delta);
* or zero if the current position is at the start of the text.
* @stable ICU 3.6
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
utext_getPreviousNativeIndex(UText *ut);
@@ -651,7 +651,7 @@ utext_getPreviousNativeIndex(UText *ut);
*
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
utext_extract(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
UChar *dest, int32_t destCapacity,
@@ -768,16 +768,16 @@ utext_extract(UText *ut,
/**
- * Return TRUE if the text can be written (modified) with utext_replace() or
+ * Return true if the text can be written (modified) with utext_replace() or
* utext_copy(). For the text to be writable, the text provider must
* be of a type that supports writing and the UText must not be frozen.
*
- * Attempting to modify text when utext_isWriteable() is FALSE will fail -
+ * Attempting to modify text when utext_isWriteable() is false will fail -
* the text will not be modified, and an error will be returned from the function
* that attempted the modification.
*
* @param ut the UText to be tested.
- * @return TRUE if the text is modifiable.
+ * @return true if the text is modifiable.
*
* @see utext_freeze()
* @see utext_replace()
@@ -785,7 +785,7 @@ utext_extract(UText *ut,
* @stable ICU 3.4
*
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
utext_isWritable(const UText *ut);
@@ -794,10 +794,10 @@ utext_isWritable(const UText *ut);
* @see Replaceable::hasMetaData()
*
* @param ut The UText to be tested
- * @return TRUE if the underlying text includes meta data.
+ * @return true if the underlying text includes meta data.
* @stable ICU 3.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
utext_hasMetaData(const UText *ut);
@@ -808,7 +808,7 @@ utext_hasMetaData(const UText *ut);
* newly inserted replacement text.
*
* This function is only available on UText types that support writing,
- * that is, ones where utext_isWritable() returns TRUE.
+ * that is, ones where utext_isWritable() returns true.
*
* When using this function, there should be only a single UText opened onto the
* underlying native text string. Behavior after a replace operation
@@ -828,7 +828,7 @@ utext_hasMetaData(const UText *ut);
*
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
utext_replace(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
const UChar *replacementText, int32_t replacementLength,
@@ -850,7 +850,7 @@ utext_replace(UText *ut,
* at the destination position.
*
* This function is only available on UText types that support writing,
- * that is, ones where utext_isWritable() returns TRUE.
+ * that is, ones where utext_isWritable() returns true.
*
* When using this function, there should be only a single UText opened onto the
* underlying native text string. Behavior after a copy operation
@@ -863,12 +863,12 @@ utext_replace(UText *ut,
* to be copied.
* @param destIndex The native destination index to which the source substring is
* copied or moved.
- * @param move If TRUE, then the substring is moved, not copied/duplicated.
+ * @param move If true, then the substring is moved, not copied/duplicated.
* @param status receives any error status. Possible errors include U_NO_WRITE_PERMISSION
*
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utext_copy(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
int64_t destIndex,
@@ -897,7 +897,7 @@ utext_copy(UText *ut,
* @see utext_isWritable()
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utext_freeze(UText *ut);
@@ -972,7 +972,7 @@ enum {
* @param dest A UText struct to be filled in with the result of the clone operation,
* or NULL if the clone function should heap-allocate a new UText struct.
* @param src The UText to be cloned.
- * @param deep TRUE to request a deep clone, FALSE for a shallow clone.
+ * @param deep true to request a deep clone, false for a shallow clone.
* @param status Errors are returned here. For deep clones, U_UNSUPPORTED_ERROR
* should be returned if the text provider is unable to clone the
* original text.
@@ -1008,9 +1008,9 @@ UTextNativeLength(UText *ut);
*
* @param ut the UText being accessed.
* @param nativeIndex Requested index of the text to be accessed.
- * @param forward If TRUE, then the returned chunk must contain text
+ * @param forward If true, then the returned chunk must contain text
* starting from the index, so that start<=indexUsage:
* ICU coding guidelines for if() statements should be followed when using these macros.
@@ -124,7 +124,7 @@
/**
* Is this code point a Unicode noncharacter?
* @param c 32-bit code point
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U_IS_UNICODE_NONCHAR(c) \
@@ -145,7 +145,7 @@
* and that boundary is tested first for performance.
*
* @param c 32-bit code point
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U_IS_UNICODE_CHAR(c) \
@@ -155,7 +155,7 @@
/**
* Is this code point a BMP code point (U+0000..U+ffff)?
* @param c 32-bit code point
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.8
*/
#define U_IS_BMP(c) ((uint32_t)(c)<=0xffff)
@@ -163,7 +163,7 @@
/**
* Is this code point a supplementary code point (U+10000..U+10ffff)?
* @param c 32-bit code point
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.8
*/
#define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000)<=0xfffff)
@@ -171,7 +171,7 @@
/**
* Is this code point a lead surrogate (U+d800..U+dbff)?
* @param c 32-bit code point
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
@@ -179,7 +179,7 @@
/**
* Is this code point a trail surrogate (U+dc00..U+dfff)?
* @param c 32-bit code point
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
@@ -187,7 +187,7 @@
/**
* Is this code point a surrogate (U+d800..U+dfff)?
* @param c 32-bit code point
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
@@ -196,7 +196,7 @@
* Assuming c is a surrogate code point (U_IS_SURROGATE(c)),
* is it a lead surrogate?
* @param c 32-bit code point
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
@@ -205,7 +205,7 @@
* Assuming c is a surrogate code point (U_IS_SURROGATE(c)),
* is it a trail surrogate?
* @param c 32-bit code point
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 4.2
*/
#define U_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0)
diff --git a/deps/icu-small/source/common/unicode/utf16.h b/deps/icu-small/source/common/unicode/utf16.h
index 3315214ae69d86..9d68902d2de0f3 100644
--- a/deps/icu-small/source/common/unicode/utf16.h
+++ b/deps/icu-small/source/common/unicode/utf16.h
@@ -23,7 +23,7 @@
* This file defines macros to deal with 16-bit Unicode (UTF-16) code units and strings.
*
* For more information see utf.h and the ICU User Guide Strings chapter
- * (http://userguide.icu-project.org/strings).
+ * (https://unicode-org.github.io/icu/userguide/strings).
*
* Usage:
* ICU coding guidelines for if() statements should be followed when using these macros.
@@ -34,6 +34,7 @@
#ifndef __UTF16_H__
#define __UTF16_H__
+#include
#include "unicode/umachine.h"
#ifndef __UTF_H__
# include "unicode/utf.h"
@@ -44,7 +45,7 @@
/**
* Does this code unit alone encode a code point (BMP, not a surrogate)?
* @param c 16-bit code unit
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
@@ -52,7 +53,7 @@
/**
* Is this code unit a lead surrogate (U+d800..U+dbff)?
* @param c 16-bit code unit
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
@@ -60,7 +61,7 @@
/**
* Is this code unit a trail surrogate (U+dc00..U+dfff)?
* @param c 16-bit code unit
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
@@ -68,7 +69,7 @@
/**
* Is this code unit a surrogate (U+d800..U+dfff)?
* @param c 16-bit code unit
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
@@ -77,7 +78,7 @@
* Assuming c is a surrogate code point (U16_IS_SURROGATE(c)),
* is it a lead surrogate?
* @param c 16-bit code unit
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
@@ -86,7 +87,7 @@
* Assuming c is a surrogate code point (U16_IS_SURROGATE(c)),
* is it a trail surrogate?
* @param c 16-bit code unit
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 4.2
*/
#define U16_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0)
@@ -379,13 +380,13 @@
* "Safe" macro, checks for a valid code point.
* If a surrogate pair is written, checks for sufficient space in the string.
* If the code point is not valid or a trail surrogate does not fit,
- * then isError is set to TRUE.
+ * then isError is set to true.
*
* @param s const UChar * string buffer
* @param i string offset, must be i>10)+0xd7c0); \
(s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \
} else /* c>0x10ffff or not enough space */ { \
- (isError)=TRUE; \
+ (isError)=true; \
} \
} UPRV_BLOCK_MACRO_END
diff --git a/deps/icu-small/source/common/unicode/utf8.h b/deps/icu-small/source/common/unicode/utf8.h
index bb001303747efe..58bda2cbe51290 100644
--- a/deps/icu-small/source/common/unicode/utf8.h
+++ b/deps/icu-small/source/common/unicode/utf8.h
@@ -23,7 +23,7 @@
* This file defines macros to deal with 8-bit Unicode (UTF-8) code units (bytes) and strings.
*
* For more information see utf.h and the ICU User Guide Strings chapter
- * (http://userguide.icu-project.org/strings).
+ * (https://unicode-org.github.io/icu/userguide/strings).
*
* Usage:
* ICU coding guidelines for if() statements should be followed when using these macros.
@@ -34,6 +34,7 @@
#ifndef __UTF8_H__
#define __UTF8_H__
+#include
#include "unicode/umachine.h"
#ifndef __UTF_H__
# include "unicode/utf.h"
@@ -117,48 +118,48 @@
* Function for handling "next code point" with error-checking.
*
* This is internal since it is not meant to be called directly by external clients;
- * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this
+ * however it is called by public macros in this
* file and thus must remain stable, and should not be hidden when other internal
* functions are hidden (otherwise public macros would fail to compile).
* @internal
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
utf8_nextCharSafeBody(const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, UBool strict);
/**
* Function for handling "append code point" with error-checking.
*
* This is internal since it is not meant to be called directly by external clients;
- * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this
+ * however it is called by public macros in this
* file and thus must remain stable, and should not be hidden when other internal
* functions are hidden (otherwise public macros would fail to compile).
* @internal
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
utf8_appendCharSafeBody(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool *pIsError);
/**
* Function for handling "previous code point" with error-checking.
*
* This is internal since it is not meant to be called directly by external clients;
- * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this
+ * however it is called by public macros in this
* file and thus must remain stable, and should not be hidden when other internal
* functions are hidden (otherwise public macros would fail to compile).
* @internal
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
utf8_prevCharSafeBody(const uint8_t *s, int32_t start, int32_t *pi, UChar32 c, UBool strict);
/**
* Function for handling "skip backward one code point" with error-checking.
*
* This is internal since it is not meant to be called directly by external clients;
- * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this
+ * however it is called by public macros in this
* file and thus must remain stable, and should not be hidden when other internal
* functions are hidden (otherwise public macros would fail to compile).
* @internal
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
/* single-code point definitions -------------------------------------------- */
@@ -166,7 +167,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
/**
* Does this code unit (byte) encode a code point by itself (US-ASCII 0..0x7f)?
* @param c 8-bit code unit (byte)
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U8_IS_SINGLE(c) (((c)&0x80)==0)
@@ -174,7 +175,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
/**
* Is this code unit (byte) a UTF-8 lead byte? (0xC2..0xF4)
* @param c 8-bit code unit (byte)
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U8_IS_LEAD(c) ((uint8_t)((c)-0xc2)<=0x32)
@@ -183,7 +184,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
/**
* Is this code unit (byte) a UTF-8 trail byte? (0x80..0xBF)
* @param c 8-bit code unit (byte)
- * @return TRUE or FALSE
+ * @return true or false
* @stable ICU 2.4
*/
#define U8_IS_TRAIL(c) ((int8_t)(c)<-0x40)
@@ -445,13 +446,13 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
* "Safe" macro, checks for a valid code point.
* If a non-ASCII code point is written, checks for sufficient space in the string.
* If the code point is not valid or trail bytes do not fit,
- * then isError is set to TRUE.
+ * then isError is set to true.
*
* @param s const uint8_t * string buffer
* @param i int32_t string offset, must be i>6)&0x3f)|0x80); \
(s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \
} else { \
- (isError)=TRUE; \
+ (isError)=true; \
} \
} UPRV_BLOCK_MACRO_END
diff --git a/deps/icu-small/source/common/unicode/utf_old.h b/deps/icu-small/source/common/unicode/utf_old.h
index b2428e6b31e282..160f5ad0a9f248 100644
--- a/deps/icu-small/source/common/unicode/utf_old.h
+++ b/deps/icu-small/source/common/unicode/utf_old.h
@@ -109,7 +109,7 @@
* Where such a distinction is useful, there are two versions of the macros, "unsafe" and "safe"
* ones with ..._UNSAFE and ..._SAFE suffixes. The unsafe macros are fast but may cause
* program failures if the strings are not well-formed. The safe macros have an additional, boolean
- * parameter "strict". If strict is FALSE, then only illegal sequences are detected.
+ * parameter "strict". If strict is false, then only illegal sequences are detected.
* Otherwise, irregular sequences and non-characters are detected as well (like single surrogates).
* Safe macros return special error code points for illegal/irregular sequences:
* Typically, U+ffff, or values that would result in a code unit sequence of the same length
@@ -181,7 +181,7 @@ typedef int32_t UTextOffset;
/**
* The default choice for general Unicode string macros is to use the ..._SAFE macro implementations
- * with strict=FALSE.
+ * with strict=false.
*
* @deprecated ICU 2.4. Obsolete, see utf_old.h.
*/
diff --git a/deps/icu-small/source/common/unicode/utrace.h b/deps/icu-small/source/common/unicode/utrace.h
index c7d51ff44f5bf7..bb8e3e8109cc66 100644
--- a/deps/icu-small/source/common/unicode/utrace.h
+++ b/deps/icu-small/source/common/unicode/utrace.h
@@ -112,11 +112,9 @@ typedef enum UTraceFunctionNumber {
UTRACE_COLLATION_LIMIT,
#endif // U_HIDE_DEPRECATED_API
-#ifndef U_HIDE_DRAFT_API
-
/**
* The lowest resource/data location.
- * @draft ICU 65
+ * @stable ICU 65
*/
UTRACE_UDATA_START=0x3000,
@@ -133,7 +131,7 @@ typedef enum UTraceFunctionNumber {
* - "get" (a path was loaded, but the value was not accessed)
* - "getalias" (a path was loaded, and an alias was resolved)
*
- * @draft ICU 65
+ * @stable ICU 65
*/
UTRACE_UDATA_RESOURCE=UTRACE_UDATA_START,
@@ -141,7 +139,7 @@ typedef enum UTraceFunctionNumber {
* Indicates that a resource bundle was opened.
*
* Provides one C-style string to UTraceData: file name.
- * @draft ICU 65
+ * @stable ICU 65
*/
UTRACE_UDATA_BUNDLE,
@@ -150,7 +148,7 @@ typedef enum UTraceFunctionNumber {
*
* Provides one C-style string to UTraceData: file name.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
UTRACE_UDATA_DATA_FILE,
@@ -163,12 +161,10 @@ typedef enum UTraceFunctionNumber {
*
* Provides one C-style string to UTraceData: file name.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
UTRACE_UDATA_RES_FILE,
-#endif // U_HIDE_DRAFT_API
-
#ifndef U_HIDE_INTERNAL_API
/**
* One more than the highest normal resource/data trace location.
@@ -249,7 +245,7 @@ typedef enum UTraceFunctionNumber {
* @param traceLevel A UTraceLevel value.
* @stable ICU 2.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrace_setLevel(int32_t traceLevel);
/**
@@ -257,7 +253,7 @@ utrace_setLevel(int32_t traceLevel);
* @return The UTraceLevel value being used by ICU.
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
utrace_getLevel(void);
/* Trace function pointers types ----------------------------- */
@@ -331,7 +327,7 @@ UTraceData(const void *context, int32_t fnNumber, int32_t level,
*
* @stable ICU 2.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrace_setFunctions(const void *context,
UTraceEntry *e, UTraceExit *x, UTraceData *d);
@@ -345,7 +341,7 @@ utrace_setFunctions(const void *context,
* @param d The currently installed UTraceData function.
* @stable ICU 2.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrace_getFunctions(const void **context,
UTraceEntry **e, UTraceExit **x, UTraceData **d);
@@ -467,7 +463,7 @@ utrace_getFunctions(const void **context,
* If buffer capacity is insufficient, the required capacity is returned.
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
utrace_vformat(char *outBuf, int32_t capacity,
int32_t indent, const char *fmt, va_list args);
@@ -488,7 +484,7 @@ utrace_vformat(char *outBuf, int32_t capacity,
* If buffer capacity is insufficient, the required capacity is returned.
* @stable ICU 2.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
utrace_format(char *outBuf, int32_t capacity,
int32_t indent, const char *fmt, ...);
@@ -505,7 +501,7 @@ utrace_format(char *outBuf, int32_t capacity,
* @see UTraceFunctionNumber
* @stable ICU 2.8
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
utrace_functionName(int32_t fnNumber);
U_CDECL_END
diff --git a/deps/icu-small/source/common/unicode/utypes.h b/deps/icu-small/source/common/unicode/utypes.h
index c98de9e6fc3dad..6c57218db8d477 100644
--- a/deps/icu-small/source/common/unicode/utypes.h
+++ b/deps/icu-small/source/common/unicode/utypes.h
@@ -479,13 +479,23 @@ typedef enum UErrorCode {
U_COLLATOR_VERSION_MISMATCH = 28, /**< Collator version is not compatible with the base version */
U_USELESS_COLLATOR_ERROR = 29, /**< Collator is options only and no base is specified */
U_NO_WRITE_PERMISSION = 30, /**< Attempt to modify read-only or constant data. */
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * The input is impractically long for an operation.
+ * It is rejected because it may lead to problems such as excessive
+ * processing time, stack depth, or heap memory requirements.
+ *
+ * @draft ICU 68
+ */
+ U_INPUT_TOO_LONG_ERROR = 31,
+#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest standard error code.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- U_STANDARD_ERROR_LIMIT,
+ U_STANDARD_ERROR_LIMIT = 32,
#endif // U_HIDE_DEPRECATED_API
/*
@@ -715,7 +725,7 @@ typedef enum UErrorCode {
* in the UErrorCode enum above.
* @stable ICU 2.0
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
u_errorName(UErrorCode code);
diff --git a/deps/icu-small/source/common/unicode/uvernum.h b/deps/icu-small/source/common/unicode/uvernum.h
index c66776d10b5826..a4cbb9e0fe8661 100644
--- a/deps/icu-small/source/common/unicode/uvernum.h
+++ b/deps/icu-small/source/common/unicode/uvernum.h
@@ -60,7 +60,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.4
*/
-#define U_ICU_VERSION_MAJOR_NUM 67
+#define U_ICU_VERSION_MAJOR_NUM 68
/** The current ICU minor version as an integer.
* This value will change in the subsequent releases of ICU
@@ -86,7 +86,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.6
*/
-#define U_ICU_VERSION_SUFFIX _67
+#define U_ICU_VERSION_SUFFIX _68
/**
* \def U_DEF2_ICU_ENTRY_POINT_RENAME
@@ -139,7 +139,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.4
*/
-#define U_ICU_VERSION "67.1"
+#define U_ICU_VERSION "68.1"
/**
* The current ICU library major version number as a string, for library name suffixes.
@@ -148,17 +148,17 @@
* Until ICU 4.8, this was the combination of the single-digit major and minor ICU version numbers
* into one string without dots ("48").
* Since ICU 49, it is the double-digit major ICU version number.
- * See http://userguide.icu-project.org/design#TOC-Version-Numbers-in-ICU
+ * See https://unicode-org.github.io/icu/userguide/design#version-numbers-in-icu
*
* @stable ICU 2.6
*/
-#define U_ICU_VERSION_SHORT "67"
+#define U_ICU_VERSION_SHORT "68"
#ifndef U_HIDE_INTERNAL_API
/** Data version in ICU4C.
* @internal ICU 4.4 Internal Use Only
**/
-#define U_ICU_DATA_VERSION "67.1"
+#define U_ICU_DATA_VERSION "68.1"
#endif /* U_HIDE_INTERNAL_API */
/*===========================================================================
diff --git a/deps/icu-small/source/common/unicode/uversion.h b/deps/icu-small/source/common/unicode/uversion.h
index c8c7a374c820b2..dde3059261047c 100644
--- a/deps/icu-small/source/common/unicode/uversion.h
+++ b/deps/icu-small/source/common/unicode/uversion.h
@@ -141,7 +141,7 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
* values of up to 255 each.
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_versionFromString(UVersionInfo versionArray, const char *versionString);
/**
@@ -155,7 +155,7 @@ u_versionFromString(UVersionInfo versionArray, const char *versionString);
* fields with values of up to 255 each.
* @stable ICU 4.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
@@ -171,7 +171,7 @@ u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
* The buffer size must be at least U_MAX_VERSION_STRING_LENGTH.
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_versionToString(const UVersionInfo versionArray, char *versionString);
/**
@@ -182,6 +182,6 @@ u_versionToString(const UVersionInfo versionArray, char *versionString);
* @param versionArray the version # information, the result will be filled in
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_getVersion(UVersionInfo versionArray);
#endif
diff --git a/deps/icu-small/source/common/unifiedcache.cpp b/deps/icu-small/source/common/unifiedcache.cpp
index f2dd916559588c..493ab79f6d9067 100644
--- a/deps/icu-small/source/common/unifiedcache.cpp
+++ b/deps/icu-small/source/common/unifiedcache.cpp
@@ -311,7 +311,7 @@ void UnifiedCache::_putNew(
}
keyToAdopt->fCreationStatus = creationStatus;
if (value->softRefCount == 0) {
- _registerMaster(keyToAdopt, value);
+ _registerPrimary(keyToAdopt, value);
}
void *oldValue = uhash_put(fHashtable, keyToAdopt, (void *) value, &status);
U_ASSERT(oldValue == nullptr);
@@ -338,7 +338,7 @@ void UnifiedCache::_putIfAbsentAndGet(
} else {
_put(element, value, status);
}
- // Run an eviction slice. This will run even if we added a master entry
+ // Run an eviction slice. This will run even if we added a primary entry
// which doesn't increase the unused count, but that is still o.k
_runEvictionSlice();
}
@@ -403,9 +403,9 @@ void UnifiedCache::_get(
}
}
-void UnifiedCache::_registerMaster(
+void UnifiedCache::_registerPrimary(
const CacheKeyBase *theKey, const SharedObject *value) const {
- theKey->fIsMaster = true;
+ theKey->fIsPrimary = true;
value->cachePtr = this;
++fNumValuesTotal;
++fNumValuesInUse;
@@ -420,7 +420,7 @@ void UnifiedCache::_put(
const SharedObject *oldValue = (const SharedObject *) element->value.pointer;
theKey->fCreationStatus = status;
if (value->softRefCount == 0) {
- _registerMaster(theKey, value);
+ _registerPrimary(theKey, value);
}
value->softRefCount++;
UHashElement *ptr = const_cast(element);
@@ -474,9 +474,9 @@ UBool UnifiedCache::_isEvictable(const UHashElement *element) const
return FALSE;
}
- // We can evict entries that are either not a master or have just
+ // We can evict entries that are either not a primary or have just
// one reference (The one reference being from the cache itself).
- return (!theKey->fIsMaster || (theValue->softRefCount == 1 && theValue->noHardReferences()));
+ return (!theKey->fIsPrimary || (theValue->softRefCount == 1 && theValue->noHardReferences()));
}
void UnifiedCache::removeSoftRef(const SharedObject *value) const {
diff --git a/deps/icu-small/source/common/unifiedcache.h b/deps/icu-small/source/common/unifiedcache.h
index 5c0bd76f4a2b94..865f4545105cb6 100644
--- a/deps/icu-small/source/common/unifiedcache.h
+++ b/deps/icu-small/source/common/unifiedcache.h
@@ -34,13 +34,13 @@ class UnifiedCache;
*/
class U_COMMON_API CacheKeyBase : public UObject {
public:
- CacheKeyBase() : fCreationStatus(U_ZERO_ERROR), fIsMaster(FALSE) {}
+ CacheKeyBase() : fCreationStatus(U_ZERO_ERROR), fIsPrimary(false) {}
/**
* Copy constructor. Needed to support cloning.
*/
CacheKeyBase(const CacheKeyBase &other)
- : UObject(other), fCreationStatus(other.fCreationStatus), fIsMaster(FALSE) { }
+ : UObject(other), fCreationStatus(other.fCreationStatus), fIsPrimary(false) { }
virtual ~CacheKeyBase();
/**
@@ -88,7 +88,7 @@ class U_COMMON_API CacheKeyBase : public UObject {
}
private:
mutable UErrorCode fCreationStatus;
- mutable UBool fIsMaster;
+ mutable UBool fIsPrimary;
friend class UnifiedCache;
};
@@ -147,10 +147,10 @@ class LocaleCacheKey : public CacheKey {
virtual UBool operator == (const CacheKeyBase &other) const {
// reflexive
if (this == &other) {
- return TRUE;
+ return true;
}
if (!CacheKey::operator == (other)) {
- return FALSE;
+ return false;
}
// We know this and other are of same class because operator== on
// CacheKey returned true.
@@ -359,7 +359,7 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
/**
* Flushes the contents of the cache. If cache values hold references to other
- * cache values then _flush should be called in a loop until it returns FALSE.
+ * cache values then _flush should be called in a loop until it returns false.
*
* On entry, gCacheMutex must be held.
* On exit, those values with are evictable are flushed.
@@ -370,7 +370,7 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
* hard (external) references are not deleted, but are detached from
* the cache, so that a subsequent removeRefs can delete them.
* _flush is not thread safe when all is true.
- * @return TRUE if any value in cache was flushed or FALSE otherwise.
+ * @return true if any value in cache was flushed or false otherwise.
*/
UBool _flush(UBool all) const;
@@ -395,11 +395,11 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
* Attempts to fetch value and status for key from cache.
* On entry, gCacheMutex must not be held value must be NULL and status must
* be U_ZERO_ERROR.
- * On exit, either returns FALSE (In this
- * case caller should try to create the object) or returns TRUE with value
+ * On exit, either returns false (In this
+ * case caller should try to create the object) or returns true with value
* pointing to the fetched value and status set to fetched status. When
- * FALSE is returned status may be set to failure if an in progress hash
- * entry could not be made but value will remain unchanged. When TRUE is
+ * false is returned status may be set to failure if an in progress hash
+ * entry could not be made but value will remain unchanged. When true is
* returned, caller must call removeRef() on value.
*/
UBool _poll(
@@ -463,17 +463,17 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
void _runEvictionSlice() const;
/**
- * Register a master cache entry. A master key is the first key to create
+ * Register a primary cache entry. A primary key is the first key to create
* a given SharedObject value. Subsequent keys whose create function
- * produce referneces to an already existing SharedObject are not masters -
+ * produce referneces to an already existing SharedObject are not primary -
* they can be evicted and subsequently recreated.
*
* On entry, gCacheMutex must be held.
- * On exit, items in use count incremented, entry is marked as a master
+ * On exit, items in use count incremented, entry is marked as a primary
* entry, and value registered with cache so that subsequent calls to
* addRef() and removeRef() on it correctly interact with the cache.
*/
- void _registerMaster(const CacheKeyBase *theKey, const SharedObject *value) const;
+ void _registerPrimary(const CacheKeyBase *theKey, const SharedObject *value) const;
/**
* Store a value and creation error status in given hash entry.
diff --git a/deps/icu-small/source/common/uniquecharstr.h b/deps/icu-small/source/common/uniquecharstr.h
new file mode 100644
index 00000000000000..10cc924f7f9eb2
--- /dev/null
+++ b/deps/icu-small/source/common/uniquecharstr.h
@@ -0,0 +1,98 @@
+// © 2020 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+// uniquecharstr.h
+// created: 2020sep01 Frank Yung-Fong Tang
+
+#ifndef __UNIQUECHARSTR_H__
+#define __UNIQUECHARSTR_H__
+
+#include "charstr.h"
+#include "uassert.h"
+#include "uhash.h"
+
+U_NAMESPACE_BEGIN
+
+/**
+ * Stores NUL-terminated strings with duplicate elimination.
+ * Checks for unique UTF-16 string pointers and converts to invariant characters.
+ *
+ * Intended to be stack-allocated. Add strings, get a unique number for each,
+ * freeze the object, get a char * pointer for each string,
+ * call orphanCharStrings() to capture the string storage, and let this object go out of scope.
+ */
+class UniqueCharStrings {
+public:
+ UniqueCharStrings(UErrorCode &errorCode) : strings(nullptr) {
+ // Note: We hash on string contents but store stable char16_t * pointers.
+ // If the strings are stored in resource bundles which should be built with
+ // duplicate elimination, then we should be able to hash on just the pointer values.
+ uhash_init(&map, uhash_hashUChars, uhash_compareUChars, uhash_compareLong, &errorCode);
+ if (U_FAILURE(errorCode)) { return; }
+ strings = new CharString();
+ if (strings == nullptr) {
+ errorCode = U_MEMORY_ALLOCATION_ERROR;
+ }
+ }
+ ~UniqueCharStrings() {
+ uhash_close(&map);
+ delete strings;
+ }
+
+ /** Returns/orphans the CharString that contains all strings. */
+ CharString *orphanCharStrings() {
+ CharString *result = strings;
+ strings = nullptr;
+ return result;
+ }
+
+ /**
+ * Adds a string and returns a unique number for it.
+ * The string's buffer contents must not change, nor move around in memory,
+ * while this UniqueCharStrings is in use.
+ * The string contents must be NUL-terminated exactly at s.length().
+ *
+ * Best used with read-only-alias UnicodeString objects that point to
+ * stable storage, such as strings returned by resource bundle functions.
+ */
+ int32_t add(const UnicodeString &s, UErrorCode &errorCode) {
+ if (U_FAILURE(errorCode)) { return 0; }
+ if (isFrozen) {
+ errorCode = U_NO_WRITE_PERMISSION;
+ return 0;
+ }
+ // The string points into the resource bundle.
+ const char16_t *p = s.getBuffer();
+ int32_t oldIndex = uhash_geti(&map, p);
+ if (oldIndex != 0) { // found duplicate
+ return oldIndex;
+ }
+ // Explicit NUL terminator for the previous string.
+ // The strings object is also terminated with one implicit NUL.
+ strings->append(0, errorCode);
+ int32_t newIndex = strings->length();
+ strings->appendInvariantChars(s, errorCode);
+ uhash_puti(&map, const_cast(p), newIndex, &errorCode);
+ return newIndex;
+ }
+
+ void freeze() { isFrozen = true; }
+
+ /**
+ * Returns a string pointer for its unique number, if this object is frozen.
+ * Otherwise nullptr.
+ */
+ const char *get(int32_t i) const {
+ U_ASSERT(isFrozen);
+ return isFrozen && i > 0 ? strings->data() + i : nullptr;
+ }
+
+private:
+ UHashtable map;
+ CharString *strings;
+ bool isFrozen = false;
+};
+
+U_NAMESPACE_END
+
+#endif // __UNIQUECHARSTR_H__
diff --git a/deps/icu-small/source/common/unisetspan.h b/deps/icu-small/source/common/unisetspan.h
index f1e78ff3ee2b00..9a1307a9078aab 100644
--- a/deps/icu-small/source/common/unisetspan.h
+++ b/deps/icu-small/source/common/unisetspan.h
@@ -65,8 +65,8 @@ class UnicodeSetStringSpan : public UMemory {
/*
* Do the strings need to be checked in span() etc.?
- * @return TRUE if strings need to be checked (call span() here),
- * FALSE if not (use a BMPSet for best performance).
+ * @return true if strings need to be checked (call span() here),
+ * false if not (use a BMPSet for best performance).
*/
inline UBool needsStringSpanUTF16();
inline UBool needsStringSpanUTF8();
diff --git a/deps/icu-small/source/common/unormimp.h b/deps/icu-small/source/common/unormimp.h
index 7f280551f7ef8e..e09c5c1c916773 100644
--- a/deps/icu-small/source/common/unormimp.h
+++ b/deps/icu-small/source/common/unormimp.h
@@ -418,7 +418,7 @@ enum {
* The same bit is used for NFC and NFKC; (c) differs for them.
* As usual, we build the "not skippable" flags so that unassigned
* code points get a 0 bit.
- * This bit is only valid after (a)..(e) test FALSE; test NFD_NO before (f) as well.
+ * This bit is only valid after (a)..(e) test false; test NFD_NO before (f) as well.
* Test Hangul LV syllables entirely in code.
*
*
diff --git a/deps/icu-small/source/common/uresbund.cpp b/deps/icu-small/source/common/uresbund.cpp
index f4efb8ccab5a0b..743df1f8c505ce 100644
--- a/deps/icu-small/source/common/uresbund.cpp
+++ b/deps/icu-small/source/common/uresbund.cpp
@@ -1792,7 +1792,7 @@ ures_findSubResource(const UResourceBundle *resB, char* path, UResourceBundle *f
return result;
}
-U_INTERNAL const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ures_getStringByKeyWithFallback(const UResourceBundle *resB,
const char* inKey,
int32_t* len,
@@ -2210,7 +2210,7 @@ ures_getUTF8StringByKey(const UResourceBundle *resB,
* INTERNAL: Get the name of the first real locale (not placeholder)
* that has resource bundle data.
*/
-U_INTERNAL const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
ures_getLocaleInternal(const UResourceBundle* resourceBundle, UErrorCode* status)
{
if (status==NULL || U_FAILURE(*status)) {
@@ -2357,7 +2357,7 @@ ures_openDirect(const char* path, const char* localeID, UErrorCode* status) {
*
* Same as ures_open(), but uses the fill-in parameter and does not allocate a new bundle.
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
ures_openFillIn(UResourceBundle *r, const char* path,
const char* localeID, UErrorCode* status) {
if(U_SUCCESS(*status) && r == NULL) {
@@ -2370,7 +2370,7 @@ ures_openFillIn(UResourceBundle *r, const char* path,
/**
* Same as ures_openDirect(), but uses the fill-in parameter and does not allocate a new bundle.
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
ures_openDirectFillIn(UResourceBundle *r, const char* path, const char* localeID, UErrorCode* status) {
if(U_SUCCESS(*status) && r == NULL) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
@@ -2420,7 +2420,7 @@ ures_countArrayItems(const UResourceBundle* resourceBundle,
* @see ures_getVersion
* @internal
*/
-U_INTERNAL const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
ures_getVersionNumberInternal(const UResourceBundle *resourceBundle)
{
if (!resourceBundle) return NULL;
@@ -3016,7 +3016,7 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status)
}
#if 0
/* This code isn't needed, and given the documentation warnings the implementation is suspect */
-U_INTERNAL UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ures_equal(const UResourceBundle* res1, const UResourceBundle* res2){
if(res1==NULL || res2==NULL){
return res1==res2; /* pointer comparision */
@@ -3052,7 +3052,7 @@ ures_equal(const UResourceBundle* res1, const UResourceBundle* res2){
}
return TRUE;
}
-U_INTERNAL UResourceBundle* U_EXPORT2
+U_CAPI UResourceBundle* U_EXPORT2
ures_clone(const UResourceBundle* res, UErrorCode* status){
UResourceBundle* bundle = NULL;
UResourceBundle* ret = NULL;
@@ -3068,7 +3068,7 @@ ures_clone(const UResourceBundle* res, UErrorCode* status){
}
return ret;
}
-U_INTERNAL const UResourceBundle* U_EXPORT2
+U_CAPI const UResourceBundle* U_EXPORT2
ures_getParentBundle(const UResourceBundle* res){
if(res==NULL){
return NULL;
@@ -3077,7 +3077,7 @@ ures_getParentBundle(const UResourceBundle* res){
}
#endif
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
ures_getVersionByKey(const UResourceBundle* res, const char *key, UVersionInfo ver, UErrorCode *status) {
const UChar *str;
int32_t len;
diff --git a/deps/icu-small/source/common/uresdata.cpp b/deps/icu-small/source/common/uresdata.cpp
index 1bb938be62c35b..4e3309f497522c 100644
--- a/deps/icu-small/source/common/uresdata.cpp
+++ b/deps/icu-small/source/common/uresdata.cpp
@@ -963,7 +963,7 @@ res_findResource(const ResourceData *pResData, Resource r, char** path, const ch
if(t2 == RES_BOGUS) {
/* if we fail to get the resource by key, maybe we got an index */
indexR = uprv_strtol(pathP, &closeIndex, 10);
- if(indexR >= 0 && *closeIndex == 0) {
+ if(indexR >= 0 && *closeIndex == 0 && (*pathP != '0' || closeIndex - pathP == 1)) {
/* if we indeed have an index, try to get the item by index */
t2 = res_getTableItemByIndex(pResData, t1, indexR, key);
} // else t2 is already RES_BOGUS
diff --git a/deps/icu-small/source/common/uresdata.h b/deps/icu-small/source/common/uresdata.h
index d1b67babf29049..7c2152e57b500d 100644
--- a/deps/icu-small/source/common/uresdata.h
+++ b/deps/icu-small/source/common/uresdata.h
@@ -402,7 +402,7 @@ typedef struct ResourceData {
/*
* Read a resource bundle from memory.
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
res_read(ResourceData *pResData,
const UDataInfo *pInfo, const void *inBytes, int32_t length,
UErrorCode *errorCode);
@@ -422,7 +422,7 @@ res_load(ResourceData *pResData,
U_CFUNC void
res_unload(ResourceData *pResData);
-U_INTERNAL UResType U_EXPORT2
+U_CAPI UResType U_EXPORT2
res_getPublicType(Resource res);
///////////////////////////////////////////////////////////////////////////
@@ -434,31 +434,31 @@ res_getPublicType(Resource res);
* and set its length in *pLength.
* Returns NULL if not found.
*/
-U_INTERNAL const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
res_getStringNoTrace(const ResourceData *pResData, Resource res, int32_t *pLength);
-U_INTERNAL const uint8_t * U_EXPORT2
+U_CAPI const uint8_t * U_EXPORT2
res_getBinaryNoTrace(const ResourceData *pResData, Resource res, int32_t *pLength);
-U_INTERNAL const int32_t * U_EXPORT2
+U_CAPI const int32_t * U_EXPORT2
res_getIntVectorNoTrace(const ResourceData *pResData, Resource res, int32_t *pLength);
-U_INTERNAL const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
res_getAlias(const ResourceData *pResData, Resource res, int32_t *pLength);
-U_INTERNAL Resource U_EXPORT2
+U_CAPI Resource U_EXPORT2
res_getResource(const ResourceData *pResData, const char *key);
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
res_countArrayItems(const ResourceData *pResData, Resource res);
-U_INTERNAL Resource U_EXPORT2
+U_CAPI Resource U_EXPORT2
res_getArrayItem(const ResourceData *pResData, Resource array, int32_t indexS);
-U_INTERNAL Resource U_EXPORT2
+U_CAPI Resource U_EXPORT2
res_getTableItemByIndex(const ResourceData *pResData, Resource table, int32_t indexS, const char ** key);
-U_INTERNAL Resource U_EXPORT2
+U_CAPI Resource U_EXPORT2
res_getTableItemByKey(const ResourceData *pResData, Resource table, int32_t *indexS, const char* * key);
/**
diff --git a/deps/icu-small/source/common/uresimp.h b/deps/icu-small/source/common/uresimp.h
index 2e477dfad3e98f..12154dcb7c68d4 100644
--- a/deps/icu-small/source/common/uresimp.h
+++ b/deps/icu-small/source/common/uresimp.h
@@ -157,7 +157,7 @@ U_CFUNC const char* ures_getName(const UResourceBundle* resB);
U_CFUNC const char* ures_getPath(const UResourceBundle* resB);
/**
* If anything was in the RB cache, dump it to the screen.
- * @return TRUE if there was anything into the cache
+ * @return true if there was anything into the cache
*/
U_CAPI UBool U_EXPORT2 ures_dumpCacheContents(void);
#endif
@@ -218,7 +218,7 @@ ures_findSubResource(const UResourceBundle *resB,
* @param isAvailable If non-null, pointer to fillin parameter that indicates whether the
* requested locale was available. The locale is defined as 'available' if it physically
* exists within the specified tree.
- * @param omitDefault if TRUE, omit keyword and value if default. 'de_DE\@collation=standard' -> 'de_DE'
+ * @param omitDefault if true, omit keyword and value if default. 'de_DE\@collation=standard' -> 'de_DE'
* @param status error code
* @return the actual buffer size needed for the full locale. If it's greater
* than resultCapacity, the returned full name will be truncated and an error code will be returned.
diff --git a/deps/icu-small/source/common/ustr_imp.h b/deps/icu-small/source/common/ustr_imp.h
index 85d8e6d8ee6970..5b249ade3d21bb 100644
--- a/deps/icu-small/source/common/ustr_imp.h
+++ b/deps/icu-small/source/common/ustr_imp.h
@@ -29,7 +29,7 @@
/**
* Compare two strings in code point order or code unit order.
* Works in strcmp style (both lengths -1),
- * strncmp style (lengths equal and >=0, flag TRUE),
+ * strncmp style (lengths equal and >=0, flag true),
* and memcmp/UnicodeString style (at least one length >=0).
*/
U_CFUNC int32_t U_EXPORT2
@@ -37,13 +37,13 @@ uprv_strCompare(const UChar *s1, int32_t length1,
const UChar *s2, int32_t length2,
UBool strncmpStyle, UBool codePointOrder);
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ustr_hashUCharsN(const UChar *str, int32_t length);
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ustr_hashCharsN(const char *str, int32_t length);
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ustr_hashICharsN(const char *str, int32_t length);
/**
@@ -53,7 +53,7 @@ ustr_hashICharsN(const char *str, int32_t length);
* @return If UChar is a lowercase ASCII character, returns the uppercase version.
* Otherwise, returns the input character.
*/
-U_INTERNAL UChar U_EXPORT2
+U_CAPI UChar U_EXPORT2
u_asciiToUpper(UChar c);
// TODO: Add u_asciiToLower if/when there is a need for it.
@@ -70,28 +70,28 @@ u_asciiToUpper(UChar c);
* @param pErrorCode ICU error code.
* @return length
*/
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_terminateUChars(UChar *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode);
/**
* NUL-terminate a char * string if possible.
* Same as u_terminateUChars() but for a different string type.
*/
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_terminateChars(char *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode);
/**
* NUL-terminate a UChar32 * string if possible.
* Same as u_terminateUChars() but for a different string type.
*/
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_terminateUChar32s(UChar32 *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode);
/**
* NUL-terminate a wchar_t * string if possible.
* Same as u_terminateUChars() but for a different string type.
*/
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_terminateWChars(wchar_t *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode);
/**
@@ -133,7 +133,7 @@ class UTF8 {
* @param t The i-th byte following the lead byte.
* @param i The index (1..3) of byte t in the byte sequence. 0 length) {
+ tailLimit = length;
+ }
+ c = (UChar) u_unescapeAt(charAt, &ahead, tailLimit,
+ context);
}
if (U16_IS_TRAIL(c)) {
*offset = ahead;
diff --git a/deps/icu-small/source/common/util.h b/deps/icu-small/source/common/util.h
index a2be25056e9acb..2a709e408a2698 100644
--- a/deps/icu-small/source/common/util.h
+++ b/deps/icu-small/source/common/util.h
@@ -64,8 +64,8 @@ class U_COMMON_API ICU_Utility /* not : public UObject because all methods are s
/**
* Escape unprintable characters using \uxxxx notation for U+0000 to
* U+FFFF and \Uxxxxxxxx for U+10000 and above. If the character is
- * printable ASCII, then do nothing and return FALSE. Otherwise,
- * append the escaped notation and return TRUE.
+ * printable ASCII, then do nothing and return false. Otherwise,
+ * append the escaped notation and return true.
*/
static UBool escapeUnprintable(UnicodeString& result, UChar32 c);
@@ -95,7 +95,7 @@ class U_COMMON_API ICU_Utility /* not : public UObject because all methods are s
* after pos, or str.length(), if there is none.
*/
static int32_t skipWhitespace(const UnicodeString& str, int32_t& pos,
- UBool advance = FALSE);
+ UBool advance = false);
/**
* Skip over Pattern_White_Space in a Replaceable.
diff --git a/deps/icu-small/source/common/utrie.h b/deps/icu-small/source/common/utrie.h
index 532ba778eb6ed1..2fd2c461ffb250 100644
--- a/deps/icu-small/source/common/utrie.h
+++ b/deps/icu-small/source/common/utrie.h
@@ -460,13 +460,13 @@ UTrieEnumValue(const void *context, uint32_t value);
* of code points with the same value as retrieved from the trie and
* transformed by the UTrieEnumValue function.
*
- * The callback function can stop the enumeration by returning FALSE.
+ * The callback function can stop the enumeration by returning false.
*
* @param context an opaque pointer, as passed into utrie_enum()
* @param start the first code point in a contiguous range with value
* @param limit one past the last code point in a contiguous range with value
* @param value the value that is set for all code points in [start..limit[
- * @return FALSE to stop the enumeration
+ * @return false to stop the enumeration
*/
typedef UBool U_CALLCONV
UTrieEnumRange(const void *context, UChar32 start, UChar32 limit, uint32_t value);
@@ -667,7 +667,7 @@ utrie_getData(UNewTrie *trie, int32_t *pLength);
* @param trie the build-time trie
* @param c the code point
* @param value the value
- * @return FALSE if a failure occurred (illegal argument or data array overrun)
+ * @return false if a failure occurred (illegal argument or data array overrun)
*/
U_CAPI UBool U_EXPORT2
utrie_set32(UNewTrie *trie, UChar32 c, uint32_t value);
@@ -677,7 +677,7 @@ utrie_set32(UNewTrie *trie, UChar32 c, uint32_t value);
*
* @param trie the build-time trie
* @param c the code point
- * @param pInBlockZero if not NULL, then *pInBlockZero is set to TRUE
+ * @param pInBlockZero if not NULL, then *pInBlockZero is set to true
* iff the value is retrieved from block 0;
* block 0 is the all-initial-value initial block
* @return the value
@@ -688,14 +688,14 @@ utrie_get32(UNewTrie *trie, UChar32 c, UBool *pInBlockZero);
/**
* Set a value in a range of code points [start..limit[.
* All code points c with start<=cswapArray32(ds, &inTrie->signature, 4, &outTrie->signature, pErrorCode);
ds->swapArray16(ds, &inTrie->options, 12, &outTrie->options, pErrorCode);
- /* swap the index and the data */
+ /* swap the index */
+ const uint16_t *inIndex=reinterpret_cast(inTrie+1);
+ uint16_t *outIndex=reinterpret_cast(outTrie+1);
+ ds->swapArray16(ds, inIndex, trie.indexLength*2, outIndex, pErrorCode);
+
+ /* swap the data */
+ const uint16_t *inData=inIndex+trie.indexLength;
+ uint16_t *outData=outIndex+trie.indexLength;
switch(valueWidth) {
case UCPTRIE_VALUE_BITS_16:
- ds->swapArray16(ds, inTrie+1, (trie.indexLength+dataLength)*2, outTrie+1, pErrorCode);
+ ds->swapArray16(ds, inData, dataLength*2, outData, pErrorCode);
break;
case UCPTRIE_VALUE_BITS_32:
- ds->swapArray16(ds, inTrie+1, trie.indexLength*2, outTrie+1, pErrorCode);
- ds->swapArray32(ds, (const uint16_t *)(inTrie+1)+trie.indexLength, dataLength*4,
- (uint16_t *)(outTrie+1)+trie.indexLength, pErrorCode);
+ ds->swapArray32(ds, inData, dataLength*4, outData, pErrorCode);
break;
case UCPTRIE_VALUE_BITS_8:
- ds->swapArray16(ds, inTrie+1, trie.indexLength*2, outTrie+1, pErrorCode);
if(inTrie!=outTrie) {
- uprv_memmove((outTrie+1)+trie.indexLength, (inTrie+1)+trie.indexLength, dataLength);
+ uprv_memmove(outData, inData, dataLength);
}
break;
default:
diff --git a/deps/icu-small/source/common/uts46.cpp b/deps/icu-small/source/common/uts46.cpp
index b9e6cb023bb379..f25b4e12f124ca 100644
--- a/deps/icu-small/source/common/uts46.cpp
+++ b/deps/icu-small/source/common/uts46.cpp
@@ -714,6 +714,16 @@ UTS46::processLabel(UnicodeString &dest,
UBool wasPunycode;
if(labelLength>=4 && label[0]==0x78 && label[1]==0x6e && label[2]==0x2d && label[3]==0x2d) {
// Label starts with "xn--", try to un-Punycode it.
+ // In IDNA2008, labels like "xn--" (decodes to an empty string) and
+ // "xn--ASCII-" (decodes to just "ASCII") fail the round-trip validation from
+ // comparing the ToUnicode input with the back-to-ToASCII output.
+ // They are alternate encodings of the respective ASCII labels.
+ // Ignore "xn---" here: It will fail Punycode.decode() which logically comes before
+ // the round-trip verification.
+ if(labelLength==4 || (labelLength>5 && label[labelLength-1]==u'-')) {
+ info.labelErrors|=UIDNA_ERROR_INVALID_ACE_LABEL;
+ return markBadACELabel(dest, labelStart, labelLength, toASCII, info, errorCode);
+ }
wasPunycode=TRUE;
UChar *unicodeBuffer=fromPunycode.getBuffer(-1); // capacity==-1: most labels should fit
if(unicodeBuffer==NULL) {
@@ -925,10 +935,10 @@ UTS46::markBadACELabel(UnicodeString &dest,
UBool isASCII=TRUE;
UBool onlyLDH=TRUE;
const UChar *label=dest.getBuffer()+labelStart;
- // Ok to cast away const because we own the UnicodeString.
- UChar *s=(UChar *)label+4; // After the initial "xn--".
const UChar *limit=label+labelLength;
- do {
+ // Start after the initial "xn--".
+ // Ok to cast away const because we own the UnicodeString.
+ for(UChar *s=const_cast(label+4); sTo do
*
diff --git a/deps/icu-small/source/common/uvectr32.h b/deps/icu-small/source/common/uvectr32.h
index 91a2dd2009eecb..92746a4f4782d8 100644
--- a/deps/icu-small/source/common/uvectr32.h
+++ b/deps/icu-small/source/common/uvectr32.h
@@ -214,7 +214,7 @@ class U_COMMON_API UVector32 : public UObject {
inline UBool UVector32::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) {
if ((minimumCapacity >= 0) && (capacity >= minimumCapacity)) {
- return TRUE;
+ return true;
} else {
return expandCapacity(minimumCapacity, status);
}
@@ -233,7 +233,7 @@ inline void UVector32::addElement(int32_t elem, UErrorCode &status) {
}
inline int32_t *UVector32::reserveBlock(int32_t size, UErrorCode &status) {
- if (ensureCapacity(count+size, status) == FALSE) {
+ if (ensureCapacity(count+size, status) == false) {
return NULL;
}
int32_t *rp = elements+count;
diff --git a/deps/icu-small/source/common/uvectr64.h b/deps/icu-small/source/common/uvectr64.h
index 6d26863eabc00d..4dab16396c1d13 100644
--- a/deps/icu-small/source/common/uvectr64.h
+++ b/deps/icu-small/source/common/uvectr64.h
@@ -203,7 +203,7 @@ class U_COMMON_API UVector64 : public UObject {
inline UBool UVector64::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) {
if ((minimumCapacity >= 0) && (capacity >= minimumCapacity)) {
- return TRUE;
+ return true;
} else {
return expandCapacity(minimumCapacity, status);
}
@@ -222,7 +222,7 @@ inline void UVector64::addElement(int64_t elem, UErrorCode &status) {
}
inline int64_t *UVector64::reserveBlock(int32_t size, UErrorCode &status) {
- if (ensureCapacity(count+size, status) == FALSE) {
+ if (ensureCapacity(count+size, status) == false) {
return NULL;
}
int64_t *rp = elements+count;
diff --git a/deps/icu-small/source/common/wintz.cpp b/deps/icu-small/source/common/wintz.cpp
index 115512e704cced..047f4290f10d0e 100644
--- a/deps/icu-small/source/common/wintz.cpp
+++ b/deps/icu-small/source/common/wintz.cpp
@@ -16,11 +16,12 @@
#if U_PLATFORM_USES_ONLY_WIN32_API
#include "wintz.h"
+#include "charstr.h"
#include "cmemory.h"
#include "cstring.h"
#include "unicode/ures.h"
-#include "unicode/ustring.h"
+#include "unicode/unistr.h"
#include "uresimp.h"
#ifndef WIN32_LEAN_AND_MEAN
@@ -35,89 +36,111 @@
U_NAMESPACE_BEGIN
-// The max size of TimeZoneKeyName is 128, defined in DYNAMIC_TIME_ZONE_INFORMATION
-#define MAX_TIMEZONE_ID_LENGTH 128
-
/**
* Main Windows time zone detection function.
* Returns the Windows time zone converted to an ICU time zone as a heap-allocated buffer, or nullptr upon failure.
-* Note: We use the Win32 API GetDynamicTimeZoneInformation to get the current time zone info.
-* This API returns a non-localized time zone name, which we can then map to an ICU time zone name.
+*
+* Note: We use the Win32 API GetDynamicTimeZoneInformation (available since Vista+) to get the current time zone info.
+* This API returns a non-localized time zone name, which is mapped to an ICU time zone ID (~ Olsen ID).
*/
-U_INTERNAL const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uprv_detectWindowsTimeZone()
{
- UErrorCode status = U_ZERO_ERROR;
- char* icuid = nullptr;
- char dynamicTZKeyName[MAX_TIMEZONE_ID_LENGTH];
- char tmpid[MAX_TIMEZONE_ID_LENGTH];
- int32_t len;
- int id = GEOID_NOT_AVAILABLE;
- int errorCode;
- wchar_t ISOcodeW[3] = {}; /* 2 letter ISO code in UTF-16 */
- char ISOcode[3] = {}; /* 2 letter ISO code in UTF-8 */
-
+ // Obtain the DYNAMIC_TIME_ZONE_INFORMATION info to get the non-localized time zone name.
DYNAMIC_TIME_ZONE_INFORMATION dynamicTZI;
uprv_memset(&dynamicTZI, 0, sizeof(dynamicTZI));
- uprv_memset(dynamicTZKeyName, 0, sizeof(dynamicTZKeyName));
- uprv_memset(tmpid, 0, sizeof(tmpid));
+ SYSTEMTIME systemTimeAllZero;
+ uprv_memset(&systemTimeAllZero, 0, sizeof(systemTimeAllZero));
- /* Obtain TIME_ZONE_INFORMATION from the API and get the non-localized time zone name. */
- if (TIME_ZONE_ID_INVALID == GetDynamicTimeZoneInformation(&dynamicTZI)) {
+ if (GetDynamicTimeZoneInformation(&dynamicTZI) == TIME_ZONE_ID_INVALID) {
return nullptr;
}
- id = GetUserGeoID(GEOCLASS_NATION);
- errorCode = GetGeoInfoW(id, GEO_ISO2, ISOcodeW, 3, 0);
-
- // convert from wchar_t* (UTF-16 on Windows) to char* (UTF-8).
- u_strToUTF8(ISOcode, UPRV_LENGTHOF(ISOcode), nullptr,
- reinterpret_cast(ISOcodeW), UPRV_LENGTHOF(ISOcodeW), &status);
-
- LocalUResourceBundlePointer bundle(ures_openDirect(nullptr, "windowsZones", &status));
- ures_getByKey(bundle.getAlias(), "mapTimezones", bundle.getAlias(), &status);
+ // If the DST setting has been turned off in the Control Panel, then return "Etc/GMT".
+ //
+ // Note: This logic is based on how the Control Panel itself determines if DST is 'off' on Windows.
+ // The code is somewhat convoluted; in a sort of pseudo-code it looks like this:
+ //
+ // IF (GetDynamicTimeZoneInformation != TIME_ZONE_ID_INVALID) && (DynamicDaylightTimeDisabled != 0) &&
+ // (StandardDate == DaylightDate) &&
+ // (
+ // (TimeZoneKeyName != Empty && StandardDate == 0) ||
+ // (TimeZoneKeyName == Empty && StandardDate != 0)
+ // )
+ // THEN
+ // DST setting is "Disabled".
+ //
+ if (dynamicTZI.DynamicDaylightTimeDisabled != 0 &&
+ uprv_memcmp(&dynamicTZI.StandardDate, &dynamicTZI.DaylightDate, sizeof(dynamicTZI.StandardDate)) == 0 &&
+ ((dynamicTZI.TimeZoneKeyName[0] != L'\0' && uprv_memcmp(&dynamicTZI.StandardDate, &systemTimeAllZero, sizeof(systemTimeAllZero)) == 0) ||
+ (dynamicTZI.TimeZoneKeyName[0] == L'\0' && uprv_memcmp(&dynamicTZI.StandardDate, &systemTimeAllZero, sizeof(systemTimeAllZero)) != 0)))
+ {
+ LONG utcOffsetMins = dynamicTZI.Bias;
+ if (utcOffsetMins == 0) {
+ return uprv_strdup("Etc/UTC");
+ }
- // convert from wchar_t* (UTF-16 on Windows) to char* (UTF-8).
- u_strToUTF8(dynamicTZKeyName, UPRV_LENGTHOF(dynamicTZKeyName), nullptr,
- reinterpret_cast(dynamicTZI.TimeZoneKeyName), -1, &status);
+ // No way to support when DST is turned off and the offset in minutes is not a multiple of 60.
+ if (utcOffsetMins % 60 == 0) {
+ char gmtOffsetTz[11] = {}; // "Etc/GMT+dd" is 11-char long with a terminal null.
+ // Note '-' before 'utcOffsetMin'. The timezone ID's sign convention
+ // is that a timezone ahead of UTC is Etc/GMT- and a timezone
+ // behind UTC is Etc/GMT+.
+ int ret = snprintf(gmtOffsetTz, UPRV_LENGTHOF(gmtOffsetTz), "Etc/GMT%+d", -utcOffsetMins / 60);
+ if (ret > 0 && ret < UPRV_LENGTHOF(gmtOffsetTz)) {
+ return uprv_strdup(gmtOffsetTz);
+ }
+ }
+ }
- if (U_FAILURE(status)) {
+ // If DST is NOT disabled, but we have an empty TimeZoneKeyName, then it is unclear
+ // what we should do as this should not happen.
+ if (dynamicTZI.TimeZoneKeyName[0] == 0) {
return nullptr;
}
- if (dynamicTZI.TimeZoneKeyName[0] != 0) {
- StackUResourceBundle winTZ;
- ures_getByKey(bundle.getAlias(), dynamicTZKeyName, winTZ.getAlias(), &status);
+ CharString winTZ;
+ UErrorCode status = U_ZERO_ERROR;
+ winTZ.appendInvariantChars(UnicodeString(TRUE, dynamicTZI.TimeZoneKeyName, -1), status);
- if (U_SUCCESS(status)) {
- const UChar* icuTZ = nullptr;
- if (errorCode != 0) {
- icuTZ = ures_getStringByKey(winTZ.getAlias(), ISOcode, &len, &status);
- }
- if (errorCode == 0 || icuTZ == nullptr) {
- /* fallback to default "001" and reset status */
- status = U_ZERO_ERROR;
- icuTZ = ures_getStringByKey(winTZ.getAlias(), "001", &len, &status);
- }
+ // Map Windows Timezone name (non-localized) to ICU timezone ID (~ Olson timezone id).
+ StackUResourceBundle winTZBundle;
+ ures_openDirectFillIn(winTZBundle.getAlias(), nullptr, "windowsZones", &status);
+ ures_getByKey(winTZBundle.getAlias(), "mapTimezones", winTZBundle.getAlias(), &status);
+ ures_getByKey(winTZBundle.getAlias(), winTZ.data(), winTZBundle.getAlias(), &status);
- if (U_SUCCESS(status)) {
- int index = 0;
+ if (U_FAILURE(status)) {
+ return nullptr;
+ }
- while (!(*icuTZ == '\0' || *icuTZ == ' ')) {
- // time zone IDs only contain ASCII invariant characters.
- tmpid[index++] = (char)(*icuTZ++);
- }
- tmpid[index] = '\0';
- }
+ // Note: Since the ISO 3166 country/region codes are all invariant ASCII chars, we can
+ // directly downcast from wchar_t to do the conversion.
+ // We could call the A version of the GetGeoInfo API, but that would be slightly slower than calling the W API,
+ // as the A version of the API will end up calling MultiByteToWideChar anyways internally.
+ wchar_t regionCodeW[3] = {};
+ char regionCode[3] = {}; // 2 letter ISO 3166 country/region code made entirely of invariant chars.
+ int geoId = GetUserGeoID(GEOCLASS_NATION);
+ int regionCodeLen = GetGeoInfoW(geoId, GEO_ISO2, regionCodeW, UPRV_LENGTHOF(regionCodeW), 0);
+
+ const UChar *icuTZ16 = nullptr;
+ int32_t tzLen;
+
+ if (regionCodeLen != 0) {
+ for (int i = 0; i < UPRV_LENGTHOF(regionCodeW); i++) {
+ regionCode[i] = static_cast(regionCodeW[i]);
}
+ icuTZ16 = ures_getStringByKey(winTZBundle.getAlias(), regionCode, &tzLen, &status);
}
-
- // Copy the timezone ID to icuid to be returned.
- if (tmpid[0] != 0) {
- icuid = uprv_strdup(tmpid);
+ if (regionCodeLen == 0 || U_FAILURE(status)) {
+ // fallback to default "001" (world)
+ status = U_ZERO_ERROR;
+ icuTZ16 = ures_getStringByKey(winTZBundle.getAlias(), "001", &tzLen, &status);
}
- return icuid;
+ // Note: cloneData returns nullptr if the status is a failure, so this
+ // will return nullptr if the above look-up fails.
+ CharString icuTZStr;
+ return icuTZStr.appendInvariantChars(icuTZ16, tzLen, status).cloneData(status);
}
U_NAMESPACE_END
diff --git a/deps/icu-small/source/common/wintz.h b/deps/icu-small/source/common/wintz.h
index 9140d2729a98f8..b1ac8c07903738 100644
--- a/deps/icu-small/source/common/wintz.h
+++ b/deps/icu-small/source/common/wintz.h
@@ -28,7 +28,7 @@ U_CDECL_BEGIN
typedef struct _TIME_ZONE_INFORMATION TIME_ZONE_INFORMATION;
U_CDECL_END
-U_INTERNAL const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uprv_detectWindowsTimeZone();
#endif /* U_PLATFORM_USES_ONLY_WIN32_API */
diff --git a/deps/icu-small/source/data/in/icudt67l.dat.bz2 b/deps/icu-small/source/data/in/icudt68l.dat.bz2
similarity index 55%
rename from deps/icu-small/source/data/in/icudt67l.dat.bz2
rename to deps/icu-small/source/data/in/icudt68l.dat.bz2
index 60bc3e084f4322802bcf00750c10c329f4edb52d..fcee4ecfa17efeb84a5663b4684b338b2675da51 100644
GIT binary patch
literal 10124683
zcmafYbx<9_v+lv&-Q5Z97TgK$?k>UM;O_1g++BklAOv@}g9Ueo6C~l~ckAA&ckBJ}
zzOCJ!p6RZcp7~aKR?@&ukW)gRUQ>U|daMX;qb&I2|A*uL&t6L6q9kV0P5N|(eX9AW
zNU-9sr0%=6Mnrbgk=)kLnr%r>`VcGcL1~wtVW92PhYN0({;RddUT5H!F0#e#4G<(R
z)MPWBM1S(EV5-g%!wv8R0ALpj`CGA$7UePf)oeHJnk37C!M#x7mqNYQ5OTpSpEVCt
z*Y6Xq{9Ia$0001Id(gvwPq3Fq<4T`wW~)8crCsc8$M?-TO#^@Q$I2XV%kiR08~}i6
zYEYB;C((Cp#lT>+4)UV6%`5-!8~v9Bj-KmammWixIZ#s@ropyw*T$M~Vb8%hd!UQX
z%e-cl*z0Upm-aUSuxEMuGTjM?z5nnk@S;j?dqldf_mXPY2yDY%)eob
z*yQc&aes2)Nf+qytSaHgM|2BdnR0r)lER~Q<3s-D@6Pk)+8BcVO`U9dwe$L-*imXO
z&ftw~*XU{u7j1j#+M{R0IMr+6X{ppCgo3Wsr+1-57_ePaeB187G!L1<_YqQ+>{z-9
zIJ}w%xEinbbTrNZFZq}IUyO-iI+)C%|MIE+ky<;SflIJ7DNwXFs$DeGo&c
z_5mEfW7&()0GbU4^}w$#x`4Y}eSlqN+n3We8}=bPpTOka2kTpQHWytnZ%~r?8{)X0
zJY1)z0P^Dq^sv>~Gv^58v<`hY0M@R}cK1wEfrVNowS+3W0)!uEli?6TLY%i}iKwQ{
zq{ev7K^hTqc6Uni^$89th4YK0)QvUitTOfkg}=x5aF<@Po|!G=`BOK<>*E~Ce`~4z
z@8pMa_I4RF;IH%mqj!EU^y;j*YUs2VRoX#4uKaWXMfZJu0W=j9nRFWd`SnY}XdI>Eaz
z2Hp4qS*)Fx8_`1m!d5jQSSXCr65E?4d)H$IulyjR?zmdAhqXS81~x@8lbJ<#=i*$0DOS%y_DDNfg4`qQ1j5y^8gAd+qVAIhk6p0Kp});06-M5(+ogJ
z2BP*h0fA=zc;bM6gjfjtx@aa*#{m#43PdhO1pwfl&xDTxJ(|3pH@~TP0HDNS$h^fC
zIzg9?-zZS|HqoF%c6=DIi=AhoB%CKYlM;AkHoXK`spWSz}8c|7sr
zTH(_0GR1K~QgIW>Mo&DbH(xyqn2nUe#alZ~Z
z)peeSbjj7CuWL)MFrv|Vm1r~LmPU)uGZqs^W>f>v?#~ZoF20LCBzH}m8IT!bfvUf5
zNBg*Tl4CT#7XPXh5%U`qy)nL+FH9_I_>NWuy2S7o6`fDDW<~AovqI|AdX{!R_q~QN
z@2vShU+rOEnE}W+e>~iT6a#04kks*LOMNu)-{$DW0elEu1_x_GP?e!z6Fs!d=9!(l
z9$-WqiwYxL=#25MDtiv^Bii_Qc(tKelH?_D5F)k%^d*l=(a@^JLehv+!((;@h2DCD
zx3-YBd_x|-A_PKIL8KVp^-_nzcV7E{0{~ER^Z&JQz*9i7791b>7w6CiGamR5F!WAu
z-Zfgs82n(g^O&>Y_0IFr3F*r<-i++`C=wb=axViLIB_e;07cc
z1OR-!4bQcc1rFic0r1uKa(#_^0MfUvT{C|kD3AxO>OW>(>p*AL(#
z;J61*MCO8@B-|A^gvL30hU>n33j`H#mRWwi48d_#gX-$ZyYUqsy_~<&6ESd{2?4sS
zryA#wk%D@jq5A$SfPdWjFOY;m3iI2;z{V{sJw9Yd_+~I5Wtd^|1PKX6*hp-E5z%#*
znSbFwYqI}#_`e0&uWdwJBne6Y09rEPaxI&n{(M3Y?jrU;`C8E536$(p00V|6-Lby2?cJnfdL!9DZNfu(OFMukTy^$Ba7&|b`vBv
zbKbVSD}Yh8Wrjsd9V&wi004{OukNcV**xpoT5&JepUJ<2e46AU?$Ya3c6R)19Dh9D
z^vzbSw(Z=&T@~FL0{y`}-Q5zKU@x>ar4U_CB#4+*u
z{kq$>6;p(SkkDh$CXzh1A?yXOwJ8rFJf>!^ig=X>RmD&_fm*9Kz(jv>I-%!y(r~Ar
z!1lBYDw?3vaLuPTX(hD1gXq~pv=Dd&
z@iIGx0D#l%#b)_XNrOHnHvzyKA+qsB9p?UIob7*)%#_#7C(tj6EthtvMsWm37SMLF
z-#Ud1A^=TJ|6yn
zI`XG)!hvGLFx|H(6sm$3pgFPRz&+#9g#c?UPLzHhd3B4*n@Zi5&;jywHOQNIle
zzX4B3DEmG3$ltcf?|6W=KMs|;Z^^rpM)*Jo+qWnuiBWGJSD^ErCjFB^(H~M{IbSxW
za0WkBZ0q)2xb~?6=RyQ;vP2lKyXOGComIBnCocZm01lEeZ}ivu8vv=H@dX(H@M{RK
z5&)?G9grl_2VB3mUG)VFnoXTSdUwPT%rMybLB{~{2hghMKf(h5Oyd8!{%=5s{I{<5
zzw7@W4LSs-{(o%$pT_^Gpwia@ZLb4F=s7(JzWap0LnTw4@FxN`$k#>QwtfTNW)XaL
z^=|+u*W4GX2`je%+cmM|nBM@uIE2nB0IG00Z_il&%PqiU-+Ugj0i?Z!?t=i=+{i=_
z+Dybn0AH^55o$@Z6A%E1w;9l_q5ucLcVPg4+yp=gB~>OR1z@^LoocMNY;5ikweSVB
zZ4JIf_1T-WL+b#5@XxnsFd+ouOU0FdlP>_6YD9#<5U|S+fGQ?;eF}66PR`ljyl*ww
zW1f#vJ@u3j_Sg)8(u_SeWnF;m8ft0Y96U~*u-#o1
zPPSIEQg|*pu_^PTa9QNvS8ic+6NecioSKdcM0gG43-R`R&VkG41E5ru%@jc5l2wjP
z&4?b~TwWof4Qn~v#ygb1ZhU=!vnGYw>Q7bqlUHWY$*eHT8dF>^rtrdR=wut6&LVz`
zzGiu=z0-xwj6f7!m#6FE=_S8(Z{hSlr<0bX0@!>}6I++>o{T#>5S_>S&d6(sXzq3v
zx1tZfwMVpZ@3p93>8{_Wm=(0oXfzYuW0(e3>7*SxA0;0e1BjbwS&KwsH0f@4vih
zOrkLJGzQmk&VK5HG?|dZBXlXuXw&02_JXp7JAYV%vz@y~d!=A!!8M#_E!X~#NN~YV
z`|GprryJd_K-;=4j@$oc1XM8q9g>~Z0kNvD_OVCZKvOP6WC+K
zniGhQ0ZalrIP-y(goTdh!F<-0_z8JG#Q!B0jJS3Y#7Le11WKVgR&4+y%!OAe99~}M
zI*g;FT?l+m+paA+#0?#@Tmg~M$-1&cyWQp54Jz9bpazHc^}^#qGUA)706YWmJDk8e
z2Eq<-1M;<&A8f)VenDxFP=;xEO>Gwv0-*m7v7tBs^f`H`|0(`&KymRbI#X$X76$<6
zDgV=i2>>Ae6SCs}oOtE|^#42o0OfE^o;<5TdSz&0rZz3&+<%<>XC?mc005B6=#`ao
ziR~*x0BHZze^CC{ovir3*GY&nY*F#@9ijv@B2w`@;yAG#AQ4reod*EGO2?tkv$8Kq
z$$=_Krz%t7S>}*MLpsfKR#u+R;i(GACC-440&xD#0}c%!2XRR@gc$9gJq+c)5JCVrNR>!6Y2Mz!j&M|PJUTttw0K)!3+EC(
zN>0bkHcm=q;+n;y23qIb@e;`}JVO&~NrcF|qv>bSQeA3HOt@uC`e7JsE)QgFl&*Wf
zYqGDsL1L#T4VIgntJG`}iQ#&3`F5NedSEqdzER$&I^t>AbOV?k?GmU`{gb7_Ls)rf
zT9m66%iDYf{GD^wkcw{>GR}ypRMer=w#kQfR=yt|?^}|MD055YnYl(r1^33--(2%k
zH+4v>IlZ(`e-}t2sgF#LmC}3&C@WUlDh2>j1{O7OfL0%G`l_#8W>T>d2q!BUAK$X7
zGo)}*eiR`v=>jP>t{iFKa-M2z_J7z7IOi*d-P(MAPW**m>!6i9aN746Km;A5D|u)3
zyj$P!jhpcif8bpHmmmiBe1AT{Ujy!Pk?`r=3%aeB9o5Bi1ca2(0#-2}O@f4bp5b7n
ze1{a?f!c}g-=DqO%|w7@h|&?*55)s
zu&D4-cCis-JO=<#r+MXaarB0
zzl({wSr=GxeJlL4C=&-SZ`APJ(X=}a2(zqkw*F8(`UBc%-m3ey;rx#{4%wj`8DY$cA!Nal(YAIk4P9k90bA{c53K(j7N4*dQj1inZK(
z{%uk-7n#iQq0&ew_#~P%vw$(G;uE#{der+j;xI(+@Eg`9%9*}sEb_H=Q^hh}M_2)7
zENL^M>L%NK`<)3tVmvqs3{O4$YKIvoMH*d$s*#>`ydZnho;5n9DKdf7dOkfdHm0Re
z-8JUr=ZMPS&oNR2B=i0h2n$a7tb<9Qv=YAcN&@dgCdY~1tqB%(-tucEvYpu^HXXS!
zN~-F6n6ZP)`;x4YePiywU@l!sD(K%QPELT^X)ACi?Y{iI-
z3aXZU)fg#E{KDF-ouJ50M?!wn_!nICX)ViX%}gX;^^`)xD!@r3xVOLE%j3AJ
zF37~k<=LpJEvyE&Fn^+QYDF}3IN>obhB5RaXhNxZzWX?E(m+6e1r&Dt2mM*r(y~gQ
zY>4)K@|RQ{*-C%{-Ku=LZ0&0c;3gonv)>ehg@54hP4dXy1;N%mR6liGa%p42O
zt=yYG#@fcH=9V06a=f(Jp7E@$vDW??EfJlmS*?v4qxO!2HOFtcC+A)VjeYzkYZj9c
ziinGBHIN&-hEx1D4zIU7DcR>R}4JFiewlFaC}j>T6+UZ6#I-
zxbh~tUv{{O1CF(vuW4re&noKmYo#>4yfHSujn6(Cby`eivq9c3Yy|oJxSbr$9GgB?
zS*3p$LM5VcqsdZPVCPi!bI@Ul)u2UWES6fOMuEZbwbxfyS7*fu5j&NSOGuS@_LccO
zwoLHPc_Ee@JWjg}VCk~hvkJPuRe8qe2OUF>105%0dZbTAVhnNgrsEAqL<)2fq6gh(
zlY1*oCyZVBKbyl{%o13*6t0JQk4(7F)pmwN5dzt4i=KbV!_!+wrjre5L}MON@vxQl
z@Senvp8;pU8d18+h<&0Nh@WiafBO4fUeL8dpNM^*4q2aZI*ys}en=u<4AV7*8}KPa~tqy(40nKPYj=1k#AzA2kE
z@NDcUP)e+^>myqu!|_4i<)k7yIV2oXDiSIbe%=j1gb&5BFo9tmh`uye8)ob8M#L78
zGmbOaWU@y-{MB4~gvFi-VkDG?HAmZN72ZIUQciL
z*0!VHl4Bh|R)Z;WKL5QBjF$QM%-{V&A%81+?i1F)BG2?|Tv23VbF$fr;Mcb7K`tX}
zD+M8X%9%Btl5<
zY77YM+jVkxkvOFP7*qS8J=>ahhiTbgx%r`sBNI3zp2FtBkCZ+Ybp`Vc@6GfS;|nh|
zCOgPq6&h<*&2Ns8s~j5EzWIQXsQSN9hrfOLpBE`>X`RH1y>Vr^V8aw4!K
zk&u~JW?MI>o*rp$K2d{^F$~#;7ZZ7g*{IgOn#x|wdcmT2+Z=|zHo~EfmTqhE`nq;2hKlX-GWIfcwL{E{Jc)a^RvNP(A=h`=
zDwVBma7)G5mn3z}%T$@u!Py(f2=Ac&upb6mcy_WGcz8_qm2psZ+9i@16(usYl!#$)
zFH^YDs23n|`32lY9TyoXF{$2e)xc2=O)D0chwpEd(7WmB^}_ETwe0TS9?(q~OzXSJ
z-tv0xY&4F54Xaz$8IS;aVWRY+(NLG?-;O7$`1p0&dh=1}i;%#%%^hd%HR36m9MFwHBm(DSsEF;LQ3n6jyG8kr7}C3d(ab}}*mZEfkY
zX@pbL_~0pJ+3I;78tr0SZ3Emg87NGV{Ssp2CFJEsyVAH%f|1e{#cH^W@q;+n
zoPL2~z>I`X*wn~VtXPZ@vRj_Vtg}-eF0m(uV_dLdKIJX8T8uPSue~hSGGMaTQd76H
zhqYJ4lPUgFS%_WRP{GGVZ-L&RV~pm+&(+$_+W<|OZr@BeNr-UHR2qlz8pJPX`6@Wu
z_4NBQcqcG8)26oB@x#;+im!39j|s=I^65TP{kr_>N#JT9KW~6Cg8D4(Ap0?fX{Z7J
zwMRjQSJ6VoJF;)a-1cireQ?>Hgb|V7A|BVkg*0EBcQ=%9@EHn9XUt6{x1@o6u
zpor~+b?QK1LEkQ8m%82N-__fVue$g`(A~~!m~hj_5DZw+`@Pg
zk}%A5epG5a(!c!fk78jv={ZNQ$CD{ow(
zZvbPu?OI>aYI3JPx3z5Y331MB37rhFK4h6i^
zlwvIiFo#*e;__enk;Y*NBbY5N~a*umAZpl1>rls0F;9Wj?FY1^k!t7G$wY9&z1#v!IDmQtz{$7)E@sTWQ{
z_oX8wM5@1wJd5(%-km%_#q*BxRXQY($l;(!cRTGgVL*qg$oTK*dFMwO%#=F2_~#$F
zbk%AsuTN$Q*uAfkcM=+LUFis;=F34^8v#Dqa-_~yYGZ8Fn+LXl9?QW|W1;F{o|Yo0AhJ0aKrsv6(9FWl!p
zf0>>Wm3a266d(=F7~iH^Hna6wi{#}+tPjX*O!Rhfi2o$_xwVs&sG$AWc!z5L&C{o%
z3|aU{rc+o4WPMe5jl+as*s!uo!J6US8`aZU8_n-j889f~u#>TgT{EL^Ronq-d|1wj
zg-?K=2iv!^;hXNtNivea^5rYq!kyOci$)jjs@??;(7b(+bF^3mzqm{Z3_S$@=B)vV
zN^9D@t8q4yz;dr^)PGL%c^$xf9`i;@1bf1y6Md~+I`70cO0s?O+&gbj?FHXLQp?pxiSJu~lE1Ouc-|qowCM~8
zKI}?@oiLVH1&H)YMMyK~fn%vhuS#=fr;bF8{-L{PuKZpN#PIjvYD%UOAQrgeoezM=hRtR9px
zx0)#CG6l&{BrZGnB|91sT1h-yb)`H>CbJBl&{#wha09*zx;hzb+?=~io?s&3_
zZK-S7rc`C&3_3_BOyfLHXA*B|3X1v{2Vy*!06Wa*i!=6h;=+;V-N1^L#ld(*A!XJ-
z7ttp5`5nq
zAK7(hRMpxUu;@cmbOv@au%c$4$;q`bNXN0Ts72{wWmotHhQEPHB+$&aNV6-s!!2wf
ztfWuXQb3iIja+1D&HiHhCR)b2-}3q~eYWLi@`OoK&sw#zXVMo*#jE(}UQGmzBuX1;
zfaHfFJPwrngKdndU
z%)(sT+^mkAaBc6_`<+ni$tib1(O7!LQuaQi2xiPV1PZQ&(a5(7w&n;58Oct$k!g<;
z=egD?p$Y#Y$i30R)PWcESWqu++VB~N@=4Xxb9`pTsBuk%x)<7y=vU|L#x)M1yyImf
zNjd|OyAfB5zB0|o5Xg!ZX9pTOW^qGIk)F~5*+FV>S^H{F%dU)&@^v_p04ZuphyvJ5
z&LHr`nW-{={!WM}QVS3?fr7nQ@a-XJKu(8YxG}|#jP2*&emFFq
zPnb(A-{2(@r4e2(!=%$29<9p%ezd&&l~cN(PRZ1kZ}v5R7cD2X95>4wzNZ}`S6bibvB__kIYd{-TuZx^c!eCTY$22m7bh`
zVk|H~KB2FDl2jB}-~0xy4S;)f4IW+@)s7DH=_sAsab2D6&wo=ZXVpXkfC2pY>D-k6_Q)N?eZ#m&{&
zJmmAV{@6q{Ws;!8CBv>@+{DW++$)UB8^*$t^Hj-mNF~D{O4(0IW!|Sy+vNJVs1P>B6YQaFWiQ$
zvWm+cltN#-!x()5{+m_G(C
zeLwu=F@BpRT5@cdv7i!8Kllz&S=BN!FOodFa`DU+_@6)d&R6|>nsZuoAVl(*<8
zVYA<@=CD4^X)o5(F4by^zM=bB6w>0%cxhYw)#g-g`}K&Ys++sgK@GnW&60H2bQFT657iK6EVLBMF+L?Hb
zvS_k12u|ZTq&W6Fl+QaevQ2*??@!OASAt*>m)mlz^7L#kZ6!ZhU|=WM*{po3z2kmk
zukpZ)Mq8;RY5Ki;(&yH8=#4SpSvuLfBU#(kU&K7*XmH9p3V+%WV<1XZnkMJMUfM8B
zESV)~#wUo(yyqSGwl=kyX)#POkYRZwxXsRb1F`v~-a#pPU#`G-OoY}Kx;*pwO8418
zJ347Dqh<`5qd~9hW#DyFEXc&;{TuD#?z1VgvQPo)v+Lnzs*Y^EtXWL;)Iy_#lc>^^3+za$9NM#<~*GvF$_);f1fiMf!v=I3|bVb
zo~_4u+t*`}^}izMFzj`r_cG5k8EOSMXa!hk
zjV-%kCx2+puP02ns7~@#!p#jT>6uNiIqViH-^8VyLn=~=_tR}+;UV4)YcxDVDp#7S
zGH7kNg0HTGSz^aJ)zlJrv*yuj7EjowfkroSGlP5wIBM3M)KHY_hf2)aR;>2|LOBzE
z1A$e?{*7_I{SLPJ_Z#OWn&>XqcU1LOwO<(wvQRv24(a!b1w~MT0ryY<=tnspT%Q>NWERWmd`!#m
zTJj=^%q;aUC=d`zHCDZ_fB@&Y|vaI??EFBDerP
zTB!0cwI$vn?JlCW6!%tpiA<)SL`@jTt0oV5`9vEvyg
z4y|j^y4fph6i2%<)Mbl6_6CQa`0yH?^+4QMd^uP9H4!uGE9B;jvKiGki#=1njAO^g
z&(X>EVxYNOuKh_BOQ?KheJDCw1+xbHwHzqFa*FwSbt~I9L*+OgeUNuB=e$itQQRD7
zz7nkI+}>L5dTW1}Pumx6;6;5<)SaFk7jfw~>dF41F8hi_M^~}qj~7}xN4iAq`o=lBFvk&3ipkU
zSF9v?iiagf^|6{+UOE=MiHE_~g|Gb;llV
zXU-Og=gv&9ZXqJ+cbwQ}SZraREbqJm{k#VOVh&g-lzxMW4H$RC8&Aq+?HMZ0v7_xr
zcjZ+NNz))C^RLHPd1@)9E}pkBQqVO!xV+svYg3BMMMylU%c;(3NpVXTO~YK&I1>zr
zLyx%wS&khILD$BAUJgNNijDhq!c3o4r;Cq@6N
z51(3!5HywIJ(2#{PRYj77oXpBHXY_|RA^}tm?98uF6L8V*8k&>PkXGO;-uJuCA(y|
zl^Ln7-KOkVRB;W`6_(MjB6l9L^Yg1wl7i*PG%!+rw#lpg3I7)XPWsMLy>@(RQDJ9-
z^)Y6Ou)LzFRKaDj@PNEnzMDyz9d}qd3=W6L=V66rQsak6D;g83hV4{p#OG|GrrOf}
zmP&o5ds@~MFIEhyi;hEQ>vcCT>p?U%EnGWorV?#!IN*f9eQ9m7IyE9?IcD7Aw>ioN
z45WJ2qX{$IP-uzq7`uOoS7v+0XW~ERW>yCV)8mhK{!glRW>GmA40s;YoO`=j^hN_n!a;7IWxdwyr(VUM1osedtu^*??hRdTU@iUn}KaSR65
zG#VNVVVdAE03-i|K%-)WBx&g?aOEhHhTLVKGF_YXB6d*G&(mz>cnFZ&q1@R$Hj^D_
zTlVplKv5eB8KSP`=A1vmZxY9?{3JGuAp2q9i!cO3MLme98LLc-Bq5QYY3n5z>Ok%8b7ZYVHmfT1Mx~Hx?B_=VL!c;L)R-26HyH
z*c}WVt?ClpsmMl%x9*_NVGUDU;qMdkWwcy;t}#e}Uv$2FdG1IE#M8UWl(zG1zbwel
z;n(>ZA(E(^@eQkCuy)E%>*-Nht@cbn`kXW!q^PA50FzS$Olg*scUDTa0x6}_spztC
zw!gY=FBpH57;-YxmKlo4+9pRY{!6;!m&GR^18!GmIE_p0)t-85Nu&{KmsoFWC#E~q8wl|(Sb4vAT$qQ{kkyW
zn#5hgv-PtgAb#TxfknV3tNU0mTzFYAk+p?JQR|YdR66I&-2{(;(+Cfb-x3*8id$T2m0L?<=o)x1QygvPLhfqmyf8b`S=BU
zJi4S9n&*6KQ|K7vw8yutLL``bLby2ca6fAB$_Pl+pUafm~kfwM-8R6P|J5Rv`r
zm@$@{%L({<01G2l6kkVn^HLo?lTWRj8aC%YJp*^eljI}}lKo83)!{JW6*ciipv~*U
zw|iTbH{_PH(>==m-q$ae)O4m6e0~LFSNi)JQ2#v)Pv*Dzhl&@a#*fZbUjAw(1Gj|2
zHsd4r-Mk5+zqH~;=;A`&Yr7jfM;afTalI#GA0s5v=E{0##C$RoRF7qXe=f)hc2>GKuzq)#>dQ{P
z_a!2W-3)XrtUR3)aVcdv)mJ2b@V$g6Yo9D;dcZBKObUNDb!#h4_*#sFgwx}Kl%O1q
zaQ?8dO*DZW$cm-j5-Wpz;5U*C-Lqj4uf*YrIasaFNCz705jXRm(^)=Q4aR~phC)t(
z;3k#%14zEYEaGnzzt*NIFjxl5pf(F
z1z<{0jF;&4eAFAe^qryLFl?s{pvB_ta|}E`S~Z-4j{Jij&8-9<
zxd}n{NR<6YUtnq7$}reZJ5d-#HAo&NOXCKjt=M0l-Q2OHXjq%g)D>YJ!fU3`^-$Al
zr*b#!_WxX?(xl41u^X$L%GfE^BO<9t8tm=Ed)ne?Jfbu&XD@X8nr&r9<|zRX=16~0ion^9B7kd8i-oX?
zWwwZ{G1jshm4e%UOm;BMr$*$W)RFeBfKeR!@`bv~OKA?fZE&^z>?-x4aAJ-$J`K&6
zNbkFiI3KmTwyd`L28;}G;+5SZi&2Kx+6n16;jcgV)##U($G;H#`Yb@9l+P#LIG+A0US!xhyMOJ{d!sjpMGBx+!uSzj;sY(EskSdfN{urSeU*QKe2Sd-Kq
zHAIi>wxF-eHtohgoa{KgKZVjMz9ppz?I8Wp2lt8
zyPWX19u#j=LrlPQzh#n;5x^!Y##A8-e=(<&benM8QwVV)OK@%SW~WfQSJg1+gzFth
zVx@b&{_bB;ai6BoM6IAe8+Y|7EUhc&`|O`$y%r-kz#{xJxj3!%HEo&{e5pKUA1Na(
z2i{WYvwke;Xmc)O!4Vd=KD7gx1ZrZBJQIzDe~i%WThkj0^J?t(3z5J0f=QXq2zQ~d
z@`KK3zU~PIK}nPy)AcyceT<`B!g{Obhj`|aNV-m_lC97iBTex8fiP=THtd9Tb}9E&
z;)9(hbI`HaPV%(eM`;*GyBRoiNX}9AFjOyw_lCW(5g`fRB%MP-wL;UebTtfqX2`%P
z5akpXmGKN*2fGPL$gZVe(MU?8=)uJh1ujnCG;zCgE%m+y3F-OPxAE#X)+(XZ7_>p_?L%JXC%
zPQ#?wqYp3hpzH>8Rspp+D?i
z?U@w<@CYno_*37Qd&k#uN%iLW@>kAIreho?=?dxL_I_VBJ7*-g)qwH^TSi
zbM+sa4*i2fdS-#?g~Gk7#@vMyL9kEEXcP=ybsyvM>X)7vVh5QOD@B2EwK~Pc_EFyO
z)-|ETFB`L)j_t02NjmwQzCU79D(zPJN_<9*w-fdX
zBFrg#=x}XeFs3nX&xUdCs&+4WDr}J=b`FwDG4Po0MOSdFJsG7P+&3>UB`6sFn&67}
zQ>xH#sl0*j9gXYEU9x@IHXBLUweg)Wm%fxuc|kB$WM5e#23O)iQ=$~>;gG&HZ-mt<
zZHfq&Zztqb7UCV?>`artU?0Dyo%W|QeFeC=JHgl7kECd@m<#%>7Q!O_#K*s))0;)k
zSgF0`%i1h4>Yh_A`L^c&zA$`b)ZT8Idmm*{(aHR&21NKEQ00W9t}iCuK}fGcbBcjy
zaEz>xORLGEwMsVQysEF#;_RX6?^RvNX&u@j-^1dsFb~w|W#w39lOaP9&$yx;ie+e^
zhRPsAdmR4w0LU5$&RQ!&Gx?)3_$q{6|_Jhl8W<&2|7
zp>&>lqZa3&;-PM^+`dS7C~=ulgPnJvbZU);BUV#Wo$zH*vKlEZ)grIN(4r&Ee~lae
zY(==Z7I)HOW%Oi@(qejr&Q^-@943vih(jA&ZyZsT)~d#%;Xzc@Ac`+~{#?{m+DlxO
z#IaaGkgw;uHA+%oZuQHYv5HT#`ht?dvg<%JQK$ax0PMY)x~vRdm;xLjg_JHTAr)(~
zyHSM@Di@yOkb*XMzRcos)eN5EM2QTtr>LQoTB)p(Vx|&Q0K1wnewmL8E13w_%)9AwDr1(>MPoNJy^@
zD58;|+M>w>WQWxasgS`NojkTOVsen7jw6#i#aW3KDsuS}v}tf?#g2T_z+0I8a+%zHRKei5r1b~px`vH0EWhf^3nKg^Mm
zLRvw*9uOZJ16s;h$Y8=YAC;QfuehA&vx4J>0S0O*PIm&s4^NgC9yzV8^Jkyl8}tsPtx|#B15hFqkl=5fJla|KG?TI*H$b&GDwQ#qKVDl
zKFRNFwA#jRx}{sQ&a-dx_wt5l0weI}$nkepjh;{?8mPrhYinjY5-VZke7c>N@l`oA
z-;qZ2V*3!*`ypM0#P0{5=&S(uHo4{JB&P?HEl`%Zz2ml6$>b=
zM$!-CtOBaMS&V!!qaE7X8ccKQ3Mve=VLBw!pSZrPv{%LOHd@7=wviUq33E$RfSld_!z@SntKY*WcxlD!XV@Ja!?xY%u-gKA
zJ;!4tL7&*xhhz1!u})okroJ#Fwx-K4d-ZAn&uhwVb&L>~pacu44E%#q10GYJsu?zI
z7yq1vZ~J)Gz+W~EEdal=MuGbdna
z-wCe;wz@@+uUBL{h4;h};+Ryp_E43PSS5_oRYlm|iQ2rBh-u=4h;!kZdG((#j^10e
zUK-nw-x8f@GtU^YmHi7lnUcx;qN?}v0$mD|?U77xjT)1*>;58@mwD#lwaj?NRgrZ6
zx_rf*8ZEmI{9N$_V)z_IBVq?D@}`XMiB-LQU^&}qZD?fRFi^)3yP!Y$Ejtr*?D!s>
z=#}~ug!iEuyVOR+#^{FK$C7P5uc>5V$$N_l1&cWjeqE0|Y0A8OhT(4FjnGZXQT^3<
zW{$c4{iphznB{wvs3Cg>dZ3sB$U3ri|8JLmnW9t_>^Vv
zsxP@BH&nFSS=Xe|GL+yiW4X9^$&V(EbWZpNkNwfT+fvE+v|*u$)n?%u!^I@^n3z@9
zM-sIfSrJ#587%TkGE^#>3i9(ji-=*VwZ+!bcf~6_Jn9L=zD-+YhdhtnB-^H{<2PWI
z`-zIralE_?e7Q8oca<2W6zTeFOX)79K#83+yR8$qPP?*rY?@2Rxe;DYOSw2+BS(L}eLIPSLU-`=5t8I?K{QtJ-;`+80
zO*puZdCaIO$y%m_WVP~cv@YJZ0-87_8D+1sk6DzxhKt>O8vJIAGLaEr
z282sI1bC(t5DLbTry30fF~vcl0CCJcL`T%@P)pE~cioTL{lP`va9H^bs;_ov%R4+)
zQ-^uJ@h-tx*^0_rY6+v#h$(n9CdZT}B!*qjZr8tjMAlosl1C>`-0`)4=AX04a=Mas
z>F^72X*Q$E$aZdvqC!T438f!I)KxYeRD=aU4a1Kt+4kc$p*rX!8pSVpkDAX&1cYPk
zo%!ZQwEn4K2!|gr_+?)^cs66&U)4eWiMO1{yI)(B?E*nU*L3{vMJ1C%{%CMzRzwRZft
z;~V%1=_!HcRKUi?Lg-j^Llxf~!`e`M$NL_R2SBGjKhAl;5Dp
z$H!--jd|}u4MTn6I6_8kKe{phd8iA#o*!s~P@P>djIBI;leo?YKPIPZT}sTu4kNID
zB}xi@)H9@MluY!&-wSPa`M+Lg{dp7qhHVi$_jM>9YIAV0PXd`uZF2?6$LV5~PkrWm
zcO%Z4qcoHR$b`TS(*=Jy
za@aYq#g@$MJ>Ki~-Es>tdD4DA?3>*oDBOJaV<&%R7u6++pEl-5lf!mzUiigLFwVs=
z8R9Bf4?r^w&R?kOUyxB_5Ab_PwV4%@u`}MKE*2V=hv<=h`S?@IR9O3NO2!f0o+PH5
z7H8X8h#tOQ%UYlL@RX{bVW1s-TlUMY&C4}i7-RbV`c};H>My|vh2Vo!xmc{IuK4oW
zT$_7EZ>5ifN16h|H_1TGH0)8u#~HOJ&+edAlkyOE1h`KDbRk(-e=0_za8jQ?XQjLk
zr=y)<@sOlWk&E#DJ#PqPy-B|FZ%!}n{WN9!Y5U4m&5-yObk{TWjf|>RuCtDV+y-lS
z+Oa%;=barP0fEJzilH_n4^yTh=go
z31v&D?WtfX%BrfrS%n$I&i87Pnpj9gOOm9<4ysC2@Vn`i^h|RJrcBX#R@S5@DQcYO
zS2gxMh?5R$rLchHL9HJ1m*wRtOA4!XAzkD*W|CrA62Zl-i(Nvcw>m;v*0S}OE}Ros
z%orB@KO;b$J5yatkS8?kFUL;gH8bS~k5*s(^l6p25xLS4Uo#a4o5P&d_Tzb(M2d&9KqiU
z!YvAu7$sE{l<|V|@>5f)qrk$Q3z~{ZWOcAaLO1u!@tgMQI2`ys6L@O43K0COS;~Zl
zcoxsup!HO=^&|q2;va`=o2qR*fJg*TdmzXMKA6LR003q61g-=#%eCqaIsi5efJ6l0
z@cif0Trw^SFO5uxR7SL>_|soprUFl**Uh}a*lf*<$~VXE^|Z9*u5F~smc35#RwQ9t
zaH^=`>)5f2NejgIcD)rkK5tu{v1@+2_@L
zly5pR*d=@lvqPS%x_zvJrT|Fjlp>{`)?sVSNk*9eCFokghF$0_wy9`P7+BH@)R0^;
zww|lkXJ)Lr9Tx{Y`+vF`{I>^#
zLW!1{=63&R!hukyKyX*yJ+R?H&3AaAU7-(wTN3fH