aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/include/unicode
diff options
context:
space:
mode:
authorromankoshelev <romankoshelev@yandex-team.com>2023-08-09 20:07:20 +0300
committerromankoshelev <romankoshelev@yandex-team.com>2023-08-09 20:59:13 +0300
commitfd82fb12fb45e71a02c628e45b12c50c0dd0d308 (patch)
treef582b79f9002ab1d083e9acda600dfb3551c47b6 /contrib/libs/icu/include/unicode
parentbf862ddf5c6178e1bb5e4fb3f7c61015deebe284 (diff)
downloadydb-fd82fb12fb45e71a02c628e45b12c50c0dd0d308.tar.gz
Update ICU to 70.1
Diffstat (limited to 'contrib/libs/icu/include/unicode')
-rw-r--r--contrib/libs/icu/include/unicode/alphaindex.h22
-rw-r--r--contrib/libs/icu/include/unicode/appendable.h30
-rw-r--r--contrib/libs/icu/include/unicode/basictz.h34
-rw-r--r--contrib/libs/icu/include/unicode/brkiter.h12
-rw-r--r--contrib/libs/icu/include/unicode/bytestream.h16
-rw-r--r--contrib/libs/icu/include/unicode/bytestrie.h19
-rw-r--r--contrib/libs/icu/include/unicode/bytestriebuilder.h50
-rw-r--r--contrib/libs/icu/include/unicode/calendar.h40
-rw-r--r--contrib/libs/icu/include/unicode/caniter.h8
-rw-r--r--contrib/libs/icu/include/unicode/chariter.h20
-rw-r--r--contrib/libs/icu/include/unicode/choicfmt.h32
-rw-r--r--contrib/libs/icu/include/unicode/coleitr.h16
-rw-r--r--contrib/libs/icu/include/unicode/coll.h28
-rw-r--r--contrib/libs/icu/include/unicode/curramt.h6
-rw-r--r--contrib/libs/icu/include/unicode/currpinf.h8
-rw-r--r--contrib/libs/icu/include/unicode/currunit.h4
-rw-r--r--contrib/libs/icu/include/unicode/datefmt.h20
-rw-r--r--contrib/libs/icu/include/unicode/dcfmtsym.h34
-rw-r--r--contrib/libs/icu/include/unicode/decimfmt.h53
-rw-r--r--contrib/libs/icu/include/unicode/dtfmtsym.h37
-rw-r--r--contrib/libs/icu/include/unicode/dtintrv.h12
-rw-r--r--contrib/libs/icu/include/unicode/dtitvfmt.h84
-rw-r--r--contrib/libs/icu/include/unicode/dtitvinf.h18
-rw-r--r--contrib/libs/icu/include/unicode/dtptngen.h23
-rw-r--r--contrib/libs/icu/include/unicode/dtrule.h16
-rw-r--r--contrib/libs/icu/include/unicode/edits.h34
-rw-r--r--contrib/libs/icu/include/unicode/fieldpos.h14
-rw-r--r--contrib/libs/icu/include/unicode/filteredbrk.h8
-rw-r--r--contrib/libs/icu/include/unicode/fmtable.h22
-rw-r--r--contrib/libs/icu/include/unicode/format.h8
-rw-r--r--contrib/libs/icu/include/unicode/formattedvalue.h12
-rw-r--r--contrib/libs/icu/include/unicode/fpositer.h6
-rw-r--r--contrib/libs/icu/include/unicode/gregocal.h50
-rw-r--r--contrib/libs/icu/include/unicode/icudataver.h2
-rw-r--r--contrib/libs/icu/include/unicode/icuplug.h41
-rw-r--r--contrib/libs/icu/include/unicode/idna.h22
-rw-r--r--contrib/libs/icu/include/unicode/listformatter.h39
-rw-r--r--contrib/libs/icu/include/unicode/localebuilder.h25
-rw-r--r--contrib/libs/icu/include/unicode/localematcher.h167
-rw-r--r--contrib/libs/icu/include/unicode/localpointer.h6
-rw-r--r--contrib/libs/icu/include/unicode/locid.h74
-rw-r--r--contrib/libs/icu/include/unicode/measfmt.h15
-rw-r--r--contrib/libs/icu/include/unicode/measunit.h740
-rw-r--r--contrib/libs/icu/include/unicode/measure.h6
-rw-r--r--contrib/libs/icu/include/unicode/messagepattern.h32
-rw-r--r--contrib/libs/icu/include/unicode/msgfmt.h30
-rw-r--r--contrib/libs/icu/include/unicode/normalizer2.h60
-rw-r--r--contrib/libs/icu/include/unicode/normlzr.h26
-rw-r--r--contrib/libs/icu/include/unicode/nounit.h92
-rw-r--r--contrib/libs/icu/include/unicode/numberformatter.h385
-rw-r--r--contrib/libs/icu/include/unicode/numberrangeformatter.h205
-rw-r--r--contrib/libs/icu/include/unicode/numfmt.h38
-rw-r--r--contrib/libs/icu/include/unicode/numsys.h10
-rw-r--r--contrib/libs/icu/include/unicode/parsepos.h18
-rw-r--r--contrib/libs/icu/include/unicode/platform.h10
-rw-r--r--contrib/libs/icu/include/unicode/plurfmt.h18
-rw-r--r--contrib/libs/icu/include/unicode/plurrule.h82
-rw-r--r--contrib/libs/icu/include/unicode/putil.h12
-rw-r--r--contrib/libs/icu/include/unicode/rbbi.h84
-rw-r--r--contrib/libs/icu/include/unicode/rbnf.h48
-rw-r--r--contrib/libs/icu/include/unicode/rbtz.h67
-rw-r--r--contrib/libs/icu/include/unicode/regex.h46
-rw-r--r--contrib/libs/icu/include/unicode/region.h4
-rw-r--r--contrib/libs/icu/include/unicode/reldatefmt.h6
-rw-r--r--contrib/libs/icu/include/unicode/resbund.h10
-rw-r--r--contrib/libs/icu/include/unicode/schriter.h8
-rw-r--r--contrib/libs/icu/include/unicode/scientificnumberformatter.h8
-rw-r--r--contrib/libs/icu/include/unicode/search.h14
-rw-r--r--contrib/libs/icu/include/unicode/selfmt.h12
-rw-r--r--contrib/libs/icu/include/unicode/simpleformatter.h4
-rw-r--r--contrib/libs/icu/include/unicode/simpletz.h58
-rw-r--r--contrib/libs/icu/include/unicode/smpdtfmt.h52
-rw-r--r--contrib/libs/icu/include/unicode/sortkey.h12
-rw-r--r--contrib/libs/icu/include/unicode/strenum.h10
-rw-r--r--contrib/libs/icu/include/unicode/stringpiece.h38
-rw-r--r--contrib/libs/icu/include/unicode/stringtriebuilder.h42
-rw-r--r--contrib/libs/icu/include/unicode/stsearch.h24
-rw-r--r--contrib/libs/icu/include/unicode/tblcoll.h74
-rw-r--r--contrib/libs/icu/include/unicode/timezone.h102
-rw-r--r--contrib/libs/icu/include/unicode/tmunit.h4
-rw-r--r--contrib/libs/icu/include/unicode/tmutamt.h12
-rw-r--r--contrib/libs/icu/include/unicode/tmutfmt.h20
-rw-r--r--contrib/libs/icu/include/unicode/translit.h58
-rw-r--r--contrib/libs/icu/include/unicode/tzfmt.h30
-rw-r--r--contrib/libs/icu/include/unicode/tznames.h14
-rw-r--r--contrib/libs/icu/include/unicode/tzrule.h60
-rw-r--r--contrib/libs/icu/include/unicode/tztrans.h6
-rw-r--r--contrib/libs/icu/include/unicode/ubidi.h128
-rw-r--r--contrib/libs/icu/include/unicode/ubiditransform.h13
-rw-r--r--contrib/libs/icu/include/unicode/ubrk.h70
-rw-r--r--contrib/libs/icu/include/unicode/ucal.h232
-rw-r--r--contrib/libs/icu/include/unicode/ucasemap.h31
-rw-r--r--contrib/libs/icu/include/unicode/ucat.h6
-rw-r--r--contrib/libs/icu/include/unicode/uchar.h316
-rw-r--r--contrib/libs/icu/include/unicode/ucharstrie.h18
-rw-r--r--contrib/libs/icu/include/unicode/ucharstriebuilder.h45
-rw-r--r--contrib/libs/icu/include/unicode/uchriter.h60
-rw-r--r--contrib/libs/icu/include/unicode/uclean.h6
-rw-r--r--contrib/libs/icu/include/unicode/ucnv.h180
-rw-r--r--contrib/libs/icu/include/unicode/ucnv_cb.h10
-rw-r--r--contrib/libs/icu/include/unicode/ucnv_err.h34
-rw-r--r--contrib/libs/icu/include/unicode/ucnvsel.h19
-rw-r--r--contrib/libs/icu/include/unicode/ucol.h137
-rw-r--r--contrib/libs/icu/include/unicode/ucoleitr.h54
-rw-r--r--contrib/libs/icu/include/unicode/ucptrie.h14
-rw-r--r--contrib/libs/icu/include/unicode/ucsdet.h39
-rw-r--r--contrib/libs/icu/include/unicode/ucurr.h60
-rw-r--r--contrib/libs/icu/include/unicode/udat.h76
-rw-r--r--contrib/libs/icu/include/unicode/udata.h33
-rw-r--r--contrib/libs/icu/include/unicode/udateintervalformat.h47
-rw-r--r--contrib/libs/icu/include/unicode/udatpg.h57
-rw-r--r--contrib/libs/icu/include/unicode/udisplaycontext.h3
-rw-r--r--contrib/libs/icu/include/unicode/uenum.h21
-rw-r--r--contrib/libs/icu/include/unicode/ufieldpositer.h8
-rw-r--r--contrib/libs/icu/include/unicode/uformattable.h34
-rw-r--r--contrib/libs/icu/include/unicode/uformattedvalue.h45
-rw-r--r--contrib/libs/icu/include/unicode/ugender.h6
-rw-r--r--contrib/libs/icu/include/unicode/uidna.h30
-rw-r--r--contrib/libs/icu/include/unicode/uiter.h20
-rw-r--r--contrib/libs/icu/include/unicode/uldnames.h33
-rw-r--r--contrib/libs/icu/include/unicode/ulistformatter.h29
-rw-r--r--contrib/libs/icu/include/unicode/uloc.h266
-rw-r--r--contrib/libs/icu/include/unicode/ulocdata.h35
-rw-r--r--contrib/libs/icu/include/unicode/umachine.h66
-rw-r--r--contrib/libs/icu/include/unicode/umsg.h47
-rw-r--r--contrib/libs/icu/include/unicode/umutablecptrie.h7
-rw-r--r--contrib/libs/icu/include/unicode/unifilt.h12
-rw-r--r--contrib/libs/icu/include/unicode/unifunct.h4
-rw-r--r--contrib/libs/icu/include/unicode/unimatch.h10
-rw-r--r--contrib/libs/icu/include/unicode/unirepl.h2
-rw-r--r--contrib/libs/icu/include/unicode/uniset.h151
-rw-r--r--contrib/libs/icu/include/unicode/unistr.h130
-rw-r--r--contrib/libs/icu/include/unicode/unorm.h16
-rw-r--r--contrib/libs/icu/include/unicode/unorm2.h57
-rw-r--r--contrib/libs/icu/include/unicode/unum.h133
-rw-r--r--contrib/libs/icu/include/unicode/unumberformatter.h225
-rw-r--r--contrib/libs/icu/include/unicode/unumberrangeformatter.h471
-rw-r--r--contrib/libs/icu/include/unicode/unumsys.h21
-rw-r--r--contrib/libs/icu/include/unicode/uobject.h4
-rw-r--r--contrib/libs/icu/include/unicode/upluralrules.h41
-rw-r--r--contrib/libs/icu/include/unicode/uregex.h175
-rw-r--r--contrib/libs/icu/include/unicode/uregion.h26
-rw-r--r--contrib/libs/icu/include/unicode/ureldatefmt.h25
-rw-r--r--contrib/libs/icu/include/unicode/urename.h46
-rw-r--r--contrib/libs/icu/include/unicode/ures.h95
-rw-r--r--contrib/libs/icu/include/unicode/uscript.h49
-rw-r--r--contrib/libs/icu/include/unicode/usearch.h267
-rw-r--r--contrib/libs/icu/include/unicode/uset.h330
-rw-r--r--contrib/libs/icu/include/unicode/usetiter.h66
-rw-r--r--contrib/libs/icu/include/unicode/ushape.h4
-rw-r--r--contrib/libs/icu/include/unicode/uspoof.h93
-rw-r--r--contrib/libs/icu/include/unicode/usprep.h11
-rw-r--r--contrib/libs/icu/include/unicode/ustdio.h123
-rw-r--r--contrib/libs/icu/include/unicode/ustring.h136
-rw-r--r--contrib/libs/icu/include/unicode/utext.h94
-rw-r--r--contrib/libs/icu/include/unicode/utf.h20
-rw-r--r--contrib/libs/icu/include/unicode/utf16.h21
-rw-r--r--contrib/libs/icu/include/unicode/utf8.h31
-rw-r--r--contrib/libs/icu/include/unicode/utf_old.h4
-rw-r--r--contrib/libs/icu/include/unicode/utmscale.h6
-rw-r--r--contrib/libs/icu/include/unicode/utrace.h45
-rw-r--r--contrib/libs/icu/include/unicode/utrans.h43
-rw-r--r--contrib/libs/icu/include/unicode/utypes.h14
-rw-r--r--contrib/libs/icu/include/unicode/uvernum.h12
-rw-r--r--contrib/libs/icu/include/unicode/uversion.h8
-rw-r--r--contrib/libs/icu/include/unicode/vtzone.h57
166 files changed, 5720 insertions, 3571 deletions
diff --git a/contrib/libs/icu/include/unicode/alphaindex.h b/contrib/libs/icu/include/unicode/alphaindex.h
index e3c68ea7cc..d0cdd817fb 100644
--- a/contrib/libs/icu/include/unicode/alphaindex.h
+++ b/contrib/libs/icu/include/unicode/alphaindex.h
@@ -44,7 +44,7 @@ typedef enum UAlphabeticIndexLabelType {
U_ALPHAINDEX_NORMAL = 0,
/**
- * Undeflow Label. The bucket with this label contains names
+ * Underflow Label. The bucket with this label contains names
* in scripts that sort before any of the bucket labels in this index.
* @stable ICU 4.8
*/
@@ -61,7 +61,7 @@ typedef enum UAlphabeticIndexLabelType {
U_ALPHAINDEX_INFLOW = 2,
/**
- * Overflow Label. Te bucket with this label contains names in scripts
+ * Overflow Label. The bucket with this label contains names in scripts
* that sort after all of the bucket labels in this index.
* @stable ICU 4.8
*/
@@ -549,14 +549,14 @@ public:
/**
- * Advance the iteration over the Buckets of this index. Return FALSE if
+ * Advance the iteration over the Buckets of this index. Return false if
* there are no more Buckets.
*
* @param status Error code, will be set with the reason if the operation fails.
* U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified while
* an enumeration of its contents are in process.
*
- * @return TRUE if success, FALSE if at end of iteration
+ * @return true if success, false if at end of iteration
* @stable ICU 4.8
*/
virtual UBool nextBucket(UErrorCode &status);
@@ -609,7 +609,7 @@ public:
* @param status Error code, will be set with the reason if the operation fails.
* U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified while
* an enumeration of its contents are in process.
- * @return TRUE if successful, FALSE when the iteration advances past the last item.
+ * @return true if successful, false when the iteration advances past the last item.
* @stable ICU 4.8
*/
virtual UBool nextRecord(UErrorCode &status);
@@ -647,7 +647,7 @@ public:
private:
/**
* No Copy constructor.
- * @internal
+ * @internal (private)
*/
AlphabeticIndex(const AlphabeticIndex &other);
@@ -658,15 +658,15 @@ private:
/**
* No Equality operators.
- * @internal
+ * @internal (private)
*/
- virtual UBool operator==(const AlphabeticIndex& other) const;
+ virtual bool operator==(const AlphabeticIndex& other) const;
/**
* Inequality operator.
- * @internal
+ * @internal (private)
*/
- virtual UBool operator!=(const AlphabeticIndex& other) const;
+ virtual bool operator!=(const AlphabeticIndex& other) const;
// Common initialization, for use from all constructors.
void init(const Locale *locale, UErrorCode &status);
@@ -723,7 +723,7 @@ private:
/**
* Holds all user records before they are distributed into buckets.
* Type of contents is (Record *)
- * @internal
+ * @internal (private)
*/
UVector *inputList_;
diff --git a/contrib/libs/icu/include/unicode/appendable.h b/contrib/libs/icu/include/unicode/appendable.h
index 4beacaf658..f77df88e39 100644
--- a/contrib/libs/icu/include/unicode/appendable.h
+++ b/contrib/libs/icu/include/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 @@ public:
/**
* 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 @@ public:
* 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 @@ public:
* 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 @@ public:
* 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,36 +171,36 @@ public:
/**
* 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);
+ virtual UBool appendCodeUnit(char16_t c) override;
/**
* 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);
+ virtual UBool appendCodePoint(UChar32 c) override;
/**
* 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);
+ virtual UBool appendString(const char16_t *s, int32_t length) override;
/**
* 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);
+ virtual UBool reserveAppendCapacity(int32_t appendCapacity) override;
/**
* Returns a writable buffer for appending and writes the buffer's capacity to
@@ -226,7 +226,7 @@ public:
virtual char16_t *getAppendBuffer(int32_t minCapacity,
int32_t desiredCapacityHint,
char16_t *scratch, int32_t scratchCapacity,
- int32_t *resultCapacity);
+ int32_t *resultCapacity) override;
private:
UnicodeString &str;
diff --git a/contrib/libs/icu/include/unicode/basictz.h b/contrib/libs/icu/include/unicode/basictz.h
index fc2cb8e59f..250ea30927 100644
--- a/contrib/libs/icu/include/unicode/basictz.h
+++ b/contrib/libs/icu/include/unicode/basictz.h
@@ -49,14 +49,14 @@ public:
* @return clone, or nullptr if an error occurred
* @stable ICU 3.8
*/
- virtual BasicTimeZone* clone() const = 0;
+ virtual BasicTimeZone* clone() const override = 0;
/**
* Gets the first time zone transition after the base time.
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const = 0;
@@ -66,7 +66,7 @@ public:
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const = 0;
@@ -84,7 +84,7 @@ public:
* changes will be ignored, except either of them is zero.
* For example, a transition from rawoffset 3:00/dstsavings 1:00
* to rawoffset 2:00/dstsavings 2:00 is excluded from the comparison,
- * but a transtion from rawoffset 2:00/dstsavings 1:00 to
+ * but a transition from rawoffset 2:00/dstsavings 1:00 to
* rawoffset 3:00/dstsavings 0:00 is included.
* @param ec Output param to filled in with a success or an error.
* @return true if the other time zone has the equivalent transitions in the
@@ -152,6 +152,17 @@ public:
virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& status) const;
+#ifndef U_FORCE_HIDE_DRAFT_API
+ /**
+ * Get time zone offsets from local wall time.
+ * @draft ICU 69
+ */
+ virtual void getOffsetFromLocal(
+ UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
+ UTimeZoneLocalOption duplicatedTimeOpt, int32_t& rawOffset,
+ int32_t& dstOffset, UErrorCode& status) const;
+
+#endif /* U_FORCE_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/**
@@ -161,17 +172,17 @@ public:
enum {
kStandard = 0x01,
kDaylight = 0x03,
- kFormer = 0x04,
- kLatter = 0x0C
+ kFormer = 0x04, /* UCAL_TZ_LOCAL_FORMER */
+ kLatter = 0x0C /* UCAL_TZ_LOCAL_LATTER */
};
-#endif /* U_HIDE_INTERNAL_API */
/**
* Get time zone offsets from local wall time.
* @internal
*/
- virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
+ void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const;
+#endif /* U_HIDE_INTERNAL_API */
protected:
@@ -215,8 +226,11 @@ protected:
/**
* Gets the set of TimeZoneRule instances applicable to the specified time and after.
* @param start The start date used for extracting time zone rules
- * @param initial Receives the InitialTimeZone, always not NULL
- * @param transitionRules Receives the transition rules, could be NULL
+ * @param initial Output parameter, receives the InitialTimeZone.
+ * Always not nullptr (except in case of error)
+ * @param transitionRules Output parameter, a UVector of transition rules.
+ * May be nullptr, if there are no transition rules.
+ * The caller owns the returned vector; the UVector owns the rules.
* @param status Receives error status code
*/
void getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, UVector*& transitionRules,
diff --git a/contrib/libs/icu/include/unicode/brkiter.h b/contrib/libs/icu/include/unicode/brkiter.h
index b944497345..3a121cf703 100644
--- a/contrib/libs/icu/include/unicode/brkiter.h
+++ b/contrib/libs/icu/include/unicode/brkiter.h
@@ -99,7 +99,7 @@ U_NAMESPACE_BEGIN
* <p>
* Code snippets illustrating the use of the Break Iterator APIs
* are available in the ICU User Guide,
- * http://icu-project.org/userguide/boundaryAnalysis.html
+ * https://unicode-org.github.io/icu/userguide/boundaryanalysis/
* and in the sample program icu/source/samples/break/break.cpp
*
*/
@@ -124,7 +124,7 @@ public:
* object, and styles are not considered.
* @stable ICU 2.0
*/
- virtual UBool operator==(const BreakIterator&) const = 0;
+ virtual bool operator==(const BreakIterator&) const = 0;
/**
* Returns the complement of the result of operator==
@@ -132,7 +132,7 @@ public:
* @return the complement of the result of operator==
* @stable ICU 2.0
*/
- UBool operator!=(const BreakIterator& rhs) const { return !operator==(rhs); }
+ bool operator!=(const BreakIterator& rhs) const { return !operator==(rhs); }
/**
* Return a polymorphic copy of this object. This is an abstract
@@ -146,7 +146,7 @@ public:
* will return distinct unequal values.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const = 0;
+ virtual UClassID getDynamicClassID(void) const override = 0;
/**
* Return a CharacterIterator over the text being analyzed.
@@ -564,7 +564,7 @@ public:
* 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 @@ private:
inline UBool BreakIterator::isBufferClone()
{
- return FALSE;
+ return false;
}
#endif /* U_HIDE_DEPRECATED_API */
diff --git a/contrib/libs/icu/include/unicode/bytestream.h b/contrib/libs/icu/include/unicode/bytestream.h
index 7fe2406222..997746e428 100644
--- a/contrib/libs/icu/include/unicode/bytestream.h
+++ b/contrib/libs/icu/include/unicode/bytestream.h
@@ -71,7 +71,6 @@ public:
*/
virtual void Append(const char* bytes, int32_t n) = 0;
-#ifndef U_HIDE_DRAFT_API
/**
* Appends n bytes to this. Same as Append().
* Call AppendU8() with u8"string literals" which are const char * in C++11
@@ -81,7 +80,7 @@ public:
*
* @param bytes the pointer to the bytes
* @param n the number of bytes; must be non-negative
- * @draft ICU 67
+ * @stable ICU 67
*/
inline void AppendU8(const char* bytes, int32_t n) {
Append(bytes, n);
@@ -97,13 +96,12 @@ public:
*
* @param bytes the pointer to the bytes
* @param n the number of bytes; must be non-negative
- * @draft ICU 67
+ * @stable ICU 67
*/
inline void AppendU8(const char8_t* bytes, int32_t n) {
Append(reinterpret_cast<const char*>(bytes), n);
}
#endif
-#endif // U_HIDE_DRAFT_API
/**
* Returns a writable buffer for appending and writes the buffer's capacity to
@@ -197,7 +195,7 @@ public:
* 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
*/
@@ -208,7 +206,7 @@ public:
* @param n the number of bytes; must be non-negative
* @stable ICU 4.2
*/
- virtual void Append(const char* bytes, int32_t n);
+ virtual void Append(const char* bytes, int32_t n) override;
/**
* Returns a writable buffer for appending and writes the buffer's capacity to
* *result_capacity. For details see the base class documentation.
@@ -226,7 +224,7 @@ public:
virtual char* GetAppendBuffer(int32_t min_capacity,
int32_t desired_capacity_hint,
char* scratch, int32_t scratch_capacity,
- int32_t* result_capacity);
+ int32_t* result_capacity) override;
/**
* Returns the number of bytes actually written to the sink.
* @return number of bytes written to the buffer
@@ -236,7 +234,7 @@ public:
/**
* 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_; }
@@ -293,7 +291,7 @@ class StringByteSink : public ByteSink {
* @param n the number of bytes; must be non-negative
* @stable ICU 4.2
*/
- virtual void Append(const char* data, int32_t n) { dest_->append(data, n); }
+ virtual void Append(const char* data, int32_t n) override { dest_->append(data, n); }
private:
StringClass* dest_;
diff --git a/contrib/libs/icu/include/unicode/bytestrie.h b/contrib/libs/icu/include/unicode/bytestrie.h
index 51405f64a1..271a81d1b4 100644
--- a/contrib/libs/icu/include/unicode/bytestrie.h
+++ b/contrib/libs/icu/include/unicode/bytestrie.h
@@ -30,6 +30,8 @@
#include "unicode/uobject.h"
#include "unicode/ustringtrie.h"
+class BytesTrieTest;
+
U_NAMESPACE_BEGIN
class ByteSink;
@@ -97,14 +99,13 @@ public:
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<uint64_t>(remainingMatchLength_ + 2) << kState64RemainingShift) |
@@ -123,14 +124,13 @@ public:
* @see getState64
* @see resetToState
* @see reset
- * @draft ICU 65
+ * @stable ICU 65
*/
BytesTrie &resetToState64(uint64_t state) {
remainingMatchLength_ = static_cast<int32_t>(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 +253,16 @@ public:
/**
* 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 +321,7 @@ public:
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 +337,7 @@ public:
* 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);
@@ -380,6 +380,7 @@ public:
private:
friend class BytesTrieBuilder;
+ friend class ::BytesTrieTest;
/**
* Constructs a BytesTrie reader instance.
diff --git a/contrib/libs/icu/include/unicode/bytestriebuilder.h b/contrib/libs/icu/include/unicode/bytestriebuilder.h
index b98374bb8f..382f5e0095 100644
--- a/contrib/libs/icu/include/unicode/bytestriebuilder.h
+++ b/contrib/libs/icu/include/unicode/bytestriebuilder.h
@@ -30,6 +30,8 @@
#include "unicode/stringpiece.h"
#include "unicode/stringtriebuilder.h"
+class BytesTrieTest;
+
U_NAMESPACE_BEGIN
class BytesTrieElement;
@@ -101,9 +103,10 @@ public:
* 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
@@ -124,26 +127,28 @@ public:
BytesTrieBuilder &clear();
private:
+ friend class ::BytesTrieTest;
+
BytesTrieBuilder(const BytesTrieBuilder &other); // no copy constructor
BytesTrieBuilder &operator=(const BytesTrieBuilder &other); // no assignment operator
void buildBytes(UStringTrieBuildOption buildOption, UErrorCode &errorCode);
- virtual int32_t getElementStringLength(int32_t i) const;
- virtual char16_t getElementUnit(int32_t i, int32_t byteIndex) const;
- virtual int32_t getElementValue(int32_t i) const;
+ virtual int32_t getElementStringLength(int32_t i) const override;
+ virtual char16_t getElementUnit(int32_t i, int32_t byteIndex) const override;
+ virtual int32_t getElementValue(int32_t i) const override;
- virtual int32_t getLimitOfLinearMatch(int32_t first, int32_t last, int32_t byteIndex) const;
+ virtual int32_t getLimitOfLinearMatch(int32_t first, int32_t last, int32_t byteIndex) const override;
- virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t byteIndex) const;
- 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 int32_t countElementUnits(int32_t start, int32_t limit, int32_t byteIndex) const override;
+ virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t byteIndex, int32_t count) const override;
+ virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, char16_t byte) const override;
- virtual UBool matchNodesCanHaveValues() const { return FALSE; }
+ virtual UBool matchNodesCanHaveValues() const override { return false; }
- virtual int32_t getMaxBranchLinearSubNodeLength() const { return BytesTrie::kMaxBranchLinearSubNodeLength; }
- virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinearMatch; }
- virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMaxLinearMatchLength; }
+ virtual int32_t getMaxBranchLinearSubNodeLength() const override { return BytesTrie::kMaxBranchLinearSubNodeLength; }
+ virtual int32_t getMinLinearMatch() const override { return BytesTrie::kMinLinearMatch; }
+ virtual int32_t getMaxLinearMatchLength() const override { return BytesTrie::kMaxLinearMatchLength; }
/**
* @internal (private)
@@ -151,22 +156,23 @@ private:
class BTLinearMatchNode : public LinearMatchNode {
public:
BTLinearMatchNode(const char *units, int32_t len, Node *nextNode);
- virtual UBool operator==(const Node &other) const;
- virtual void write(StringTrieBuilder &builder);
+ virtual bool operator==(const Node &other) const override;
+ virtual void write(StringTrieBuilder &builder) override;
private:
const char *s;
};
virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t length,
- Node *nextNode) const;
+ Node *nextNode) const override;
UBool ensureCapacity(int32_t length);
- virtual int32_t write(int32_t byte);
+ virtual int32_t write(int32_t byte) override;
int32_t write(const char *b, int32_t length);
- virtual int32_t writeElementUnits(int32_t i, int32_t byteIndex, int32_t length);
- virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal);
- virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node);
- virtual int32_t writeDeltaTo(int32_t jumpTarget);
+ virtual int32_t writeElementUnits(int32_t i, int32_t byteIndex, int32_t length) override;
+ virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal) override;
+ virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node) override;
+ virtual int32_t writeDeltaTo(int32_t jumpTarget) override;
+ static int32_t internalEncodeDelta(int32_t i, char intBytes[]);
CharString *strings; // Pointer not object so we need not #include internal charstr.h.
BytesTrieElement *elements;
diff --git a/contrib/libs/icu/include/unicode/calendar.h b/contrib/libs/icu/include/unicode/calendar.h
index 2a8c2935ca..c1bdf92820 100644
--- a/contrib/libs/icu/include/unicode/calendar.h
+++ b/contrib/libs/icu/include/unicode/calendar.h
@@ -47,6 +47,8 @@ U_NAMESPACE_BEGIN
class ICUServiceFactory;
+// Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
+// it is a return type for a virtual method (@internal)
/**
* @internal
*/
@@ -447,27 +449,27 @@ public:
* represented time, use equals() instead.
*
* @param that The Calendar object to be compared with.
- * @return True if the given Calendar is the same as this Calendar; false
+ * @return true if the given Calendar is the same as this Calendar; false
* otherwise.
* @stable ICU 2.0
*/
- virtual UBool operator==(const Calendar& that) const;
+ virtual bool operator==(const Calendar& that) const;
/**
* Compares the inequality of two Calendar objects.
*
* @param that The Calendar object to be compared with.
- * @return True if the given Calendar is not the same as this Calendar; false
+ * @return true if the given Calendar is not the same as this Calendar; false
* otherwise.
* @stable ICU 2.0
*/
- UBool operator!=(const Calendar& that) const {return !operator==(that);}
+ bool operator!=(const Calendar& that) const {return !operator==(that);}
/**
- * Returns TRUE if the given Calendar object is equivalent to this
+ * Returns true if the given Calendar object is equivalent to this
* one. An equivalent Calendar will behave exactly as this one
* does, but it may be set to a different time. By contrast, for
- * the operator==() method to return TRUE, the other Calendar must
+ * the operator==() method to return true, the other Calendar must
* be set to the same time.
*
* @param other the Calendar to be compared with this Calendar
@@ -1339,7 +1341,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const = 0;
+ virtual UClassID getDynamicClassID(void) const override = 0;
/**
* Returns the calendar type name string for this Calendar object.
@@ -1359,7 +1361,7 @@ public:
* localeID.append(calType);
* char langTag[100];
* UErrorCode errorCode = U_ZERO_ERROR;
- * int32_t length = uloc_toLanguageTag(localeID.c_str(), langTag, (int32_t)sizeof(langTag), TRUE, &errorCode);
+ * int32_t length = uloc_toLanguageTag(localeID.c_str(), langTag, (int32_t)sizeof(langTag), true, &errorCode);
* if (U_FAILURE(errorCode)) {
* // deal with errors & overflow
* }
@@ -1410,21 +1412,21 @@ public:
virtual int32_t getWeekendTransition(UCalendarDaysOfWeek dayOfWeek, UErrorCode &status) const;
/**
- * Returns TRUE if the given UDate is in the weekend in
+ * Returns true if the given UDate is in the weekend in
* this calendar system.
* @param date The UDate in question.
* @param status The error code for the operation.
- * @return TRUE if the given UDate is in the weekend in
- * this calendar system, FALSE otherwise.
+ * @return true if the given UDate is in the weekend in
+ * this calendar system, false otherwise.
* @stable ICU 4.4
*/
virtual UBool isWeekend(UDate date, UErrorCode &status) const;
/**
- * Returns TRUE if this Calendar's current date-time is in the weekend in
+ * Returns true if this Calendar's current date-time is in the weekend in
* this calendar system.
- * @return TRUE if this Calendar's current date-time is in the weekend in
- * this calendar system, FALSE otherwise.
+ * @return true if this Calendar's current date-time is in the weekend in
+ * this calendar system, false otherwise.
* @stable ICU 4.4
*/
virtual UBool isWeekend(void) const;
@@ -1849,7 +1851,7 @@ private:
* @param startValue starting (least max) value of field
* @param endValue ending (greatest max) value of field
* @param status return type
- * @internal
+ * @internal (private)
*/
int32_t getActualHelper(UCalendarDateFields field, int32_t startValue, int32_t endValue, UErrorCode &status) const;
@@ -2372,7 +2374,7 @@ private:
*
* @param key the registry key returned by a previous call to registerFactory
* @param status the in/out status code, no special meanings are assigned
- * @return TRUE if the factory for the key was successfully unregistered
+ * @return true if the factory for the key was successfully unregistered
* @internal
*/
static UBool unregister(URegistryKey key, UErrorCode& status);
@@ -2398,7 +2400,7 @@ private:
#endif /* !UCONFIG_NO_SERVICE */
/**
- * @return TRUE if this calendar has a default century (i.e. 03 -> 2003)
+ * @return true if this calendar has a default century (i.e. 03 -> 2003)
* @internal
*/
virtual UBool haveDefaultCentury() const = 0;
@@ -2458,7 +2460,7 @@ private:
* @param base The base time, inclusive
* @param transitionTime Receives the result time
* @param status The error status
- * @return TRUE if a transition is found.
+ * @return true if a transition is found.
*/
UBool getImmediatePreviousZoneTransition(UDate base, UDate *transitionTime, UErrorCode& status) const;
@@ -2531,7 +2533,7 @@ Calendar::internalSet(UCalendarDateFields field, int32_t value)
{
fFields[field] = value;
fStamp[field] = kInternallySet;
- fIsSet[field] = TRUE; // Remove later
+ fIsSet[field] = true; // Remove later
}
diff --git a/contrib/libs/icu/include/unicode/caniter.h b/contrib/libs/icu/include/unicode/caniter.h
index 13e524ff6a..6e57ef5e3b 100644
--- a/contrib/libs/icu/include/unicode/caniter.h
+++ b/contrib/libs/icu/include/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
@@ -145,7 +145,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
private:
// ===================== PRIVATES ==============================
@@ -194,7 +194,7 @@ private:
/**
* See if the decomposition of cp2 is at segment starting at segmentPos
- * (with canonical rearrangment!)
+ * (with canonical rearrangement!)
* If so, take the remainder, and return the equivalents
*/
//Set extract(int comp, String segment, int segmentPos, StringBuffer buffer);
diff --git a/contrib/libs/icu/include/unicode/chariter.h b/contrib/libs/icu/include/unicode/chariter.h
index db86f79e42..4f320b90e2 100644
--- a/contrib/libs/icu/include/unicode/chariter.h
+++ b/contrib/libs/icu/include/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:
* <ul>
- * <li>The hasNext() function returns FALSE.</li>
+ * <li>The hasNext() function returns false.</li>
* <li>nextPostInc() and next32PostInc() return DONE
* when one attempts to read beyond the end of the text object.</li>
* </ul>
@@ -114,7 +114,7 @@ public:
* character in the same character-storage object
* @stable ICU 2.0
*/
- virtual UBool operator==(const ForwardCharacterIterator& that) const = 0;
+ virtual bool operator==(const ForwardCharacterIterator& that) const = 0;
/**
* Returns true when the iterators refer to different
@@ -126,7 +126,7 @@ public:
* same text-storage object
* @stable ICU 2.0
*/
- inline UBool operator!=(const ForwardCharacterIterator& that) const;
+ inline bool operator!=(const ForwardCharacterIterator& that) const;
/**
* Generates a hash code for this iterator.
@@ -142,7 +142,7 @@ public:
* @return a UClassID for this ForwardCharacterIterator
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const = 0;
+ virtual UClassID getDynamicClassID(void) const override = 0;
/**
* Gets the current code unit for returning and advances to the next code unit
@@ -165,11 +165,11 @@ public:
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 @@ public:
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;
@@ -692,7 +692,7 @@ protected:
int32_t end;
};
-inline UBool
+inline bool
ForwardCharacterIterator::operator!=(const ForwardCharacterIterator& that) const {
return !operator==(that);
}
diff --git a/contrib/libs/icu/include/unicode/choicfmt.h b/contrib/libs/icu/include/unicode/choicfmt.h
index 3b2f48cb1f..0e7ae186d4 100644
--- a/contrib/libs/icu/include/unicode/choicfmt.h
+++ b/contrib/libs/icu/include/unicode/choicfmt.h
@@ -106,7 +106,7 @@ class MessageFormat;
* arrays of numbers, closure flags and strings,
* they are interpreted just like
* the sequence of <code>(number separator string)</code> in an equivalent pattern string.
- * <code>closure[i]==TRUE</code> corresponds to a <code>less_than</code> separator sign.
+ * <code>closure[i]==true</code> corresponds to a <code>less_than</code> separator sign.
* The equivalent pattern string will be constructed automatically.</p>
*
* <p>During formatting, a number is mapped to the first range
@@ -126,7 +126,7 @@ class MessageFormat;
* <p>Here is an example of two arrays that map the number
* <code>1..7</code> to the English day of the week abbreviations
* <code>Sun..Sat</code>. No closures array is given; this is the same as
- * specifying all closures to be <code>FALSE</code>.</p>
+ * specifying all closures to be <code>false</code>.</p>
*
* <pre> {1,2,3,4,5,6,7},
* {&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thur&quot;,&quot;Fri&quot;,&quot;Sat&quot;}</pre>
@@ -138,7 +138,7 @@ class MessageFormat;
* like the turned bracket in European notation: [-Inf, 1) == [-Inf, 1[ )</p>
*
* <pre> {0, 1, 1},
- * {FALSE, FALSE, TRUE},
+ * {false, false, true},
* {&quot;no files&quot;, &quot;one file&quot;, &quot;many files&quot;}</pre>
*
* <p>Here is an example that shows formatting and parsing: </p>
@@ -189,7 +189,7 @@ public:
/**
* Constructs a new ChoiceFormat with the given limits and message strings.
- * All closure flags default to <code>FALSE</code>,
+ * All closure flags default to <code>false</code>,
* equivalent to <code>less_than_or_equal</code> separators.
*
* Copies the limits and formats instead of adopting them.
@@ -210,9 +210,9 @@ public:
*
* @param limits Array of limit values
* @param closures Array of booleans specifying whether each
- * element of 'limits' is open or closed. If FALSE, then the
+ * element of 'limits' is open or closed. If false, then the
* corresponding limit number is a member of its range.
- * If TRUE, then the limit number belongs to the previous range it.
+ * If true, then the limit number belongs to the previous range it.
* @param formats Array of formats
* @param count Size of 'limits', 'closures', and 'formats' arrays
* @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
@@ -251,7 +251,7 @@ public:
* @return a copy of this object
* @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/
- virtual ChoiceFormat* clone() const;
+ virtual ChoiceFormat* clone() const override;
/**
* Returns true if the given Format objects are semantically equal.
@@ -261,7 +261,7 @@ public:
* @return true if other is the same as this.
* @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/
- virtual UBool operator==(const Format& other) const;
+ virtual bool operator==(const Format& other) const override;
/**
* Sets the pattern.
@@ -375,7 +375,7 @@ public:
*/
virtual UnicodeString& format(double number,
UnicodeString& appendTo,
- FieldPosition& pos) const;
+ FieldPosition& pos) const override;
/**
* Formats an int32_t number using this object's choices.
*
@@ -389,7 +389,7 @@ public:
*/
virtual UnicodeString& format(int32_t number,
UnicodeString& appendTo,
- FieldPosition& pos) const;
+ FieldPosition& pos) const override;
/**
* Formats an int64_t number using this object's choices.
@@ -404,7 +404,7 @@ public:
*/
virtual UnicodeString& format(int64_t number,
UnicodeString& appendTo,
- FieldPosition& pos) const;
+ FieldPosition& pos) const override;
/**
* Formats an array of objects using this object's choices.
@@ -444,7 +444,7 @@ public:
*/
virtual void parse(const UnicodeString& text,
Formattable& result,
- ParsePosition& parsePosition) const;
+ ParsePosition& parsePosition) const override;
/**
* Returns a unique class ID POLYMORPHICALLY. Part of ICU's "poor man's RTTI".
@@ -454,7 +454,7 @@ public:
* other classes have different class IDs.
* @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Returns the class ID for this class. This is useful only for
@@ -528,7 +528,7 @@ private:
const UnicodeString &source, int32_t sourceOffset);
/**
- * Some of the ChoiceFormat constructors do not have a UErrorCode paramater.
+ * Some of the ChoiceFormat constructors do not have a UErrorCode parameter.
* We need _some_ way to provide one for the MessagePattern constructor.
* Alternatively, the MessagePattern could be a pointer field, but that is
* not nice either.
@@ -568,13 +568,13 @@ private:
* The intervals may be closed, half open, or open. This affects
* formatting but does not affect parsing. Interval i is affected
* by fClosures[i] and fClosures[i+1]. If fClosures[i]
- * is FALSE, then the value fChoiceLimits[i] is in interval i.
+ * is false, then the value fChoiceLimits[i] is in interval i.
* That is, intervals i and i are:
*
* i-1: ... x < fChoiceLimits[i]
* i: fChoiceLimits[i] <= x ...
*
- * If fClosures[i] is TRUE, then the value fChoiceLimits[i] is
+ * If fClosures[i] is true, then the value fChoiceLimits[i] is
* in interval i-1. That is, intervals i-1 and i are:
*
* i-1: ... x <= fChoiceLimits[i]
diff --git a/contrib/libs/icu/include/unicode/coleitr.h b/contrib/libs/icu/include/unicode/coleitr.h
index e3ec0e01a1..4e68c6f174 100644
--- a/contrib/libs/icu/include/unicode/coleitr.h
+++ b/contrib/libs/icu/include/unicode/coleitr.h
@@ -103,7 +103,7 @@ class UVector32;
* to reset the status, shifting pointers to either the end or the start of
* the string (reset() or setText()), or the specified position (setOffset()).
* Hence at the next call of next() or previous(), the first or last collation order,
-* or collation order at the spefcifieid position will be returned. If a change of
+* or collation order at the specified position will be returned. If a change of
* direction is done without one of these calls, the result is undefined.
* <p>
* The result of a forward iterate (next()) and reversed result of the backward
@@ -125,7 +125,7 @@ public:
enum {
/**
- * NULLORDER indicates that an error has occured while processing
+ * NULLORDER indicates that an error has occurred while processing
* @stable ICU 2.0
*/
NULLORDER = (int32_t)0xffffffff
@@ -156,7 +156,7 @@ public:
* @return true if "other" is the same as "this"
* @stable ICU 2.0
*/
- UBool operator==(const CollationElementIterator& other) const;
+ bool operator==(const CollationElementIterator& other) const;
/**
* Returns true if "other" is not the same as "this".
@@ -165,7 +165,7 @@ public:
* @return true if "other" is not the same as "this"
* @stable ICU 2.0
*/
- UBool operator!=(const CollationElementIterator& other) const;
+ bool operator!=(const CollationElementIterator& other) const;
/**
* Resets the cursor to the beginning of the string.
@@ -177,7 +177,7 @@ public:
* Gets the ordering priority of the next character in the string.
* @param status the error code status.
* @return the next character's ordering. otherwise returns NULLORDER if an
- * error has occured or if the end of string has been reached
+ * error has occurred or if the end of string has been reached
* @stable ICU 2.0
*/
int32_t next(UErrorCode& status);
@@ -186,7 +186,7 @@ public:
* Get the ordering priority of the previous collation element in the string.
* @param status the error code status.
* @return the previous element's ordering. otherwise returns NULLORDER if an
- * error has occured or if the start of string has been reached
+ * error has occurred or if the start of string has been reached
* @stable ICU 2.0
*/
int32_t previous(UErrorCode& status);
@@ -253,7 +253,7 @@ public:
/**
* Checks if a comparison order is ignorable.
* @param order the collation order.
- * @return TRUE if a character is ignorable, FALSE otherwise.
+ * @return true if a character is ignorable, false otherwise.
* @stable ICU 2.0
*/
static inline UBool isIgnorable(int32_t order);
@@ -279,7 +279,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
diff --git a/contrib/libs/icu/include/unicode/coll.h b/contrib/libs/icu/include/unicode/coll.h
index f5564c7394..9e0050ba6c 100644
--- a/contrib/libs/icu/include/unicode/coll.h
+++ b/contrib/libs/icu/include/unicode/coll.h
@@ -236,33 +236,33 @@ public:
// Collator public methods --------------------------------------------
/**
- * Returns TRUE if "other" is the same as "this".
+ * Returns true if "other" is the same as "this".
*
- * The base class implementation returns TRUE if "other" has the same type/class as "this":
+ * The base class implementation returns true if "other" has the same type/class as "this":
* `typeid(*this) == typeid(other)`.
*
* Subclass implementations should do something like the following:
*
- * if (this == &other) { return TRUE; }
- * if (!Collator::operator==(other)) { return FALSE; } // not the same class
+ * if (this == &other) { return true; }
+ * if (!Collator::operator==(other)) { return false; } // not the same class
*
* const MyCollator &o = (const MyCollator&)other;
* (compare this vs. o's subclass fields)
*
* @param other Collator object to be compared
- * @return TRUE if other is the same as this.
+ * @return true if other is the same as this.
* @stable ICU 2.0
*/
- virtual UBool operator==(const Collator& other) const;
+ virtual bool operator==(const Collator& other) const;
/**
* Returns true if "other" is not the same as "this".
* Calls ! operator==(const Collator&) const which works for all subclasses.
* @param other Collator object to be compared
- * @return TRUE if other is not the same as this.
+ * @return true if other is not the same as this.
* @stable ICU 2.0
*/
- virtual UBool operator!=(const Collator& other) const;
+ virtual bool operator!=(const Collator& other) const;
/**
* Makes a copy of this object.
@@ -304,7 +304,7 @@ public:
* Starting with ICU 54, collation attributes can be specified via locale keywords as well,
* in the old locale extension syntax ("el@colCaseFirst=upper")
* or in language tag syntax ("el-u-kf-upper").
- * See <a href="http://userguide.icu-project.org/collation/api">User Guide: Collation API</a>.
+ * See <a href="https://unicode-org.github.io/icu/userguide/collation/api">User Guide: Collation API</a>.
*
* The UErrorCode& err parameter is used to return status information to the user.
* To check whether the construction succeeded or not, you should check
@@ -788,7 +788,7 @@ public:
* applications who wish to cache collators, or otherwise reuse
* collators when possible. The functional equivalent may change
* over time. For more information, please see the <a
- * href="http://userguide.icu-project.org/locale#TOC-Locales-and-Services">
+ * href="https://unicode-org.github.io/icu/userguide/locale#locales-and-services">
* Locales and Services</a> section of the ICU User Guide.
* @param keyword a particular keyword as enumerated by
* ucol_getKeywords.
@@ -841,7 +841,7 @@ public:
* Collator::createInstance 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 collator for the key was successfully unregistered
+ * @return true if the collator for the key was successfully unregistered
* @stable ICU 2.6
*/
static UBool U_EXPORT2 unregister(URegistryKey key, UErrorCode& status);
@@ -864,7 +864,7 @@ public:
* IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const = 0;
+ virtual UClassID getDynamicClassID(void) const override = 0;
/**
* Universal attribute setter
@@ -1094,7 +1094,7 @@ protected:
/**
* Default constructor.
* Constructor is different from the old default Collator constructor.
- * The task for determing the default collation strength and normalization
+ * The task for determining the default collation strength and normalization
* mode is left to the child class.
* @stable ICU 2.0
*/
@@ -1139,7 +1139,7 @@ public:
* This string will be normalized.
* The structure and the syntax of the string is defined in the "Naming collators"
* section of the users guide:
- * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme
+ * https://unicode-org.github.io/icu/userguide/collation/concepts#collator-naming-scheme
* This function supports preflighting.
*
* This is internal, and intended to be used with delegate converters.
diff --git a/contrib/libs/icu/include/unicode/curramt.h b/contrib/libs/icu/include/unicode/curramt.h
index 5cfe1cf75e..818b11ae5b 100644
--- a/contrib/libs/icu/include/unicode/curramt.h
+++ b/contrib/libs/icu/include/unicode/curramt.h
@@ -41,7 +41,7 @@ class U_I18N_API CurrencyAmount: public Measure {
/**
* Construct an object with the given numeric amount and the given
* ISO currency code.
- * @param amount a numeric object; amount.isNumeric() must be TRUE
+ * @param amount a numeric object; amount.isNumeric() must be true
* @param isoCode the 3-letter ISO 4217 currency code; must not be
* NULL and must have length 3
* @param ec input-output error code. If the amount or the isoCode
@@ -81,7 +81,7 @@ class U_I18N_API CurrencyAmount: public Measure {
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual CurrencyAmount* clone() const;
+ virtual CurrencyAmount* clone() const override;
/**
* Destructor
@@ -97,7 +97,7 @@ class U_I18N_API CurrencyAmount: public Measure {
* different class IDs.
* @stable ICU 3.0
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* Returns the class ID for this class. This is used to compare to
diff --git a/contrib/libs/icu/include/unicode/currpinf.h b/contrib/libs/icu/include/unicode/currpinf.h
index fb0b2a7dbc..e3ca34b26f 100644
--- a/contrib/libs/icu/include/unicode/currpinf.h
+++ b/contrib/libs/icu/include/unicode/currpinf.h
@@ -92,7 +92,7 @@ public:
*
* @stable ICU 4.2
*/
- UBool operator==(const CurrencyPluralInfo& info) const;
+ bool operator==(const CurrencyPluralInfo& info) const;
/**
@@ -100,7 +100,7 @@ public:
*
* @stable ICU 4.2
*/
- UBool operator!=(const CurrencyPluralInfo& info) const;
+ bool operator!=(const CurrencyPluralInfo& info) const;
/**
@@ -184,7 +184,7 @@ public:
*
* @stable ICU 4.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -259,7 +259,7 @@ private:
};
-inline UBool
+inline bool
CurrencyPluralInfo::operator!=(const CurrencyPluralInfo& info) const {
return !operator==(info);
}
diff --git a/contrib/libs/icu/include/unicode/currunit.h b/contrib/libs/icu/include/unicode/currunit.h
index 9b608fdeef..8da3f1ffd8 100644
--- a/contrib/libs/icu/include/unicode/currunit.h
+++ b/contrib/libs/icu/include/unicode/currunit.h
@@ -94,7 +94,7 @@ class U_I18N_API CurrencyUnit: public MeasureUnit {
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual CurrencyUnit* clone() const;
+ virtual CurrencyUnit* clone() const override;
/**
* Destructor
@@ -110,7 +110,7 @@ class U_I18N_API CurrencyUnit: public MeasureUnit {
* different class IDs.
* @stable ICU 3.0
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* Returns the class ID for this class. This is used to compare to
diff --git a/contrib/libs/icu/include/unicode/datefmt.h b/contrib/libs/icu/include/unicode/datefmt.h
index f106e821a7..027fb1712f 100644
--- a/contrib/libs/icu/include/unicode/datefmt.h
+++ b/contrib/libs/icu/include/unicode/datefmt.h
@@ -139,7 +139,7 @@ template class U_I18N_API EnumSet<UDateFormatBooleanAttribute,
* more control over the format or parsing, (or want to give your users more
* control), you can try casting the DateFormat you get from the factory methods
* to a SimpleDateFormat. This will work for the majority of countries; just
- * remember to chck getDynamicClassID() before carrying out the cast.
+ * remember to check getDynamicClassID() before carrying out the cast.
* <P>
* You can also use forms of the parse and format methods with ParsePosition and
* FieldPosition to allow you to
@@ -229,13 +229,13 @@ public:
* @return clone, or nullptr if an error occurred
* @stable ICU 2.0
*/
- virtual DateFormat* clone() const = 0;
+ virtual DateFormat* clone() const override = 0;
/**
* Equality operator. Returns true if the two formats have the same behavior.
* @stable ICU 2.0
*/
- virtual UBool operator==(const Format&) const;
+ virtual bool operator==(const Format&) const override;
using Format::format;
@@ -257,7 +257,7 @@ public:
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPosition& pos,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Format an object to produce a string. This method handles Formattable
@@ -277,7 +277,7 @@ public:
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPositionIterator* posIter,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Formats a date into a date/time string. This is an abstract method which
* concrete subclasses must implement.
@@ -291,12 +291,12 @@ public:
* statfieldPositionus.getEndIndex will be set to 0 and 4, respectively.
* <P> Notice
* that if the same time field appears more than once in a pattern, the status will
- * be set for the first occurence of that time field. For instance,
+ * be set for the first occurrence of that time field. For instance,
* formatting a UDate to the time string "1 PM PDT (Pacific Daylight Time)"
* using the pattern "h a z (zzzz)" and the alignment field
* DateFormat::TIMEZONE_FIELD, the offsets fieldPosition.beginIndex and
* fieldPosition.getEndIndex will be set to 5 and 8, respectively, for the first
- * occurence of the timezone pattern character 'z'.
+ * occurrence of the timezone pattern character 'z'.
*
* @param cal Calendar set to the date and time to be formatted
* into a date/time string. When the calendar type is
@@ -349,12 +349,12 @@ public:
* statfieldPositionus.getEndIndex will be set to 0 and 4, respectively.
* <P> Notice
* that if the same time field appears more than once in a pattern, the status will
- * be set for the first occurence of that time field. For instance,
+ * be set for the first occurrence of that time field. For instance,
* formatting a UDate to the time string "1 PM PDT (Pacific Daylight Time)"
* using the pattern "h a z (zzzz)" and the alignment field
* DateFormat::TIMEZONE_FIELD, the offsets fieldPosition.beginIndex and
* fieldPosition.getEndIndex will be set to 5 and 8, respectively, for the first
- * occurence of the timezone pattern character 'z'.
+ * occurrence of the timezone pattern character 'z'.
*
* @param date UDate to be formatted into a date/time string.
* @param appendTo Output parameter to receive result.
@@ -523,7 +523,7 @@ public:
*/
virtual void parseObject(const UnicodeString& source,
Formattable& result,
- ParsePosition& parse_pos) const;
+ ParsePosition& parse_pos) const override;
/**
* Create a default date/time formatter that uses the SHORT style for both
diff --git a/contrib/libs/icu/include/unicode/dcfmtsym.h b/contrib/libs/icu/include/unicode/dcfmtsym.h
index 582e7533a4..c5f7404416 100644
--- a/contrib/libs/icu/include/unicode/dcfmtsym.h
+++ b/contrib/libs/icu/include/unicode/dcfmtsym.h
@@ -169,8 +169,14 @@ public:
* @stable ICU 54
*/
kExponentMultiplicationSymbol,
+#ifndef U_HIDE_INTERNAL_API
+ /** Approximately sign.
+ * @internal
+ */
+ kApproximatelySignSymbol,
+#endif /* U_HIDE_INTERNAL_API */
/** count symbol constants */
- kFormatSymbolCount = kNineDigitSymbol + 2
+ kFormatSymbolCount = kExponentMultiplicationSymbol + 2
};
/**
@@ -255,7 +261,7 @@ public:
* @return true if another object is semantically equal to this one.
* @stable ICU 2.0
*/
- UBool operator==(const DecimalFormatSymbols& other) const;
+ bool operator==(const DecimalFormatSymbols& other) const;
/**
* Return true if another object is semantically unequal to this one.
@@ -264,7 +270,7 @@ public:
* @return true if another object is semantically unequal to this one.
* @stable ICU 2.0
*/
- UBool operator!=(const DecimalFormatSymbols& other) const { return !operator==(other); }
+ bool operator!=(const DecimalFormatSymbols& other) const { return !operator==(other); }
/**
* Get one of the format symbols by its enum constant.
@@ -284,12 +290,12 @@ public:
*
* @param symbol Constant to indicate a number format symbol.
* @param value value of the format symbol
- * @param propogateDigits If false, setting the zero digit will not automatically set 1-9.
+ * @param propagateDigits If false, setting the zero digit will not automatically set 1-9.
* The default behavior is to automatically set 1-9 if zero is being set and the value
* it is being set to corresponds to a known Unicode zero digit.
* @stable ICU 2.0
*/
- void setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits);
+ void setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propagateDigits);
#ifndef U_HIDE_INTERNAL_API
/**
@@ -353,7 +359,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -378,7 +384,7 @@ private:
* back to the locale.
*/
void initialize(const Locale& locale, UErrorCode& success,
- UBool useLastResortData = FALSE, const NumberingSystem* ns = nullptr);
+ UBool useLastResortData = false, const NumberingSystem* ns = nullptr);
/**
* Initialize the symbols with default values.
@@ -419,7 +425,7 @@ public:
*
* This is not currently stable API, but if you think it should be stable,
* post a comment on the following ticket and the ICU team will take a look:
- * http://bugs.icu-project.org/trac/ticket/13580
+ * https://unicode-org.atlassian.net/browse/ICU-13580
*
* @param symbol Constant to indicate a number format symbol.
* @return the format symbol by the param 'symbol'
@@ -436,7 +442,7 @@ public:
*
* This is not currently stable API, but if you think it should be stable,
* post a comment on the following ticket and the ICU team will take a look:
- * http://bugs.icu-project.org/trac/ticket/13580
+ * https://unicode-org.atlassian.net/browse/ICU-13580
*
* @param digit The digit, an integer between 0 and 9 inclusive.
* If outside the range 0 to 9, the zero digit is returned.
@@ -446,7 +452,7 @@ public:
inline const UnicodeString& getConstDigitSymbol(int32_t digit) const;
/**
- * Returns that pattern stored in currecy info. Internal API for use by NumberFormat API.
+ * Returns that pattern stored in currency info. Internal API for use by NumberFormat API.
* @internal
*/
inline const char16_t* getCurrencyPattern(void) const;
@@ -543,12 +549,12 @@ inline const UnicodeString& DecimalFormatSymbols::getConstDigitSymbol(int32_t di
// -------------------------------------
inline void
-DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits = TRUE) {
+DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propagateDigits = true) {
if (symbol == kCurrencySymbol) {
- fIsCustomCurrencySymbol = TRUE;
+ fIsCustomCurrencySymbol = true;
}
else if (symbol == kIntlCurrencySymbol) {
- fIsCustomIntlCurrencySymbol = TRUE;
+ fIsCustomIntlCurrencySymbol = true;
}
if(symbol<kFormatSymbolCount) {
fSymbols[symbol]=value;
@@ -559,7 +565,7 @@ DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString
// Also record updates to fCodePointZero. Be conservative if in doubt.
if (symbol == kZeroDigitSymbol) {
UChar32 sym = value.char32At(0);
- if ( propogateDigits && u_charDigitValue(sym) == 0 && value.countChar32() == 1 ) {
+ if ( propagateDigits && u_charDigitValue(sym) == 0 && value.countChar32() == 1 ) {
fCodePointZero = sym;
for ( int8_t i = 1 ; i<= 9 ; i++ ) {
sym++;
diff --git a/contrib/libs/icu/include/unicode/decimfmt.h b/contrib/libs/icu/include/unicode/decimfmt.h
index 8dba9b21f3..ab6cd14e18 100644
--- a/contrib/libs/icu/include/unicode/decimfmt.h
+++ b/contrib/libs/icu/include/unicode/decimfmt.h
@@ -564,11 +564,11 @@ class NumberParserImpl;
*
* <li>In order to enable significant digits formatting, use a pattern
* containing the <code>'@'</code> pattern character. Alternatively,
- * call setSignificantDigitsUsed(TRUE).
+ * call setSignificantDigitsUsed(true).
*
* <li>In order to disable significant digits formatting, use a
* pattern that does not contain the <code>'@'</code> pattern
- * character. Alternatively, call setSignificantDigitsUsed(FALSE).
+ * character. Alternatively, call setSignificantDigitsUsed(false).
*
* <li>The number of significant digits has no effect on parsing.
*
@@ -817,8 +817,8 @@ class U_I18N_API DecimalFormat : public NumberFormat {
/**
* Sets whether lenient parsing should be enabled (it is off by default).
*
- * @param enable \c TRUE if lenient parsing should be used,
- * \c FALSE otherwise.
+ * @param enable \c true if lenient parsing should be used,
+ * \c false otherwise.
* @stable ICU 4.8
*/
void setLenient(UBool enable) U_OVERRIDE;
@@ -909,7 +909,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @return true if the given Format objects are semantically equal.
* @stable ICU 2.0
*/
- UBool operator==(const Format& other) const U_OVERRIDE;
+ bool operator==(const Format& other) const U_OVERRIDE;
using NumberFormat::format;
@@ -1507,7 +1507,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
/**
* Return whether or not scientific notation is used.
- * @return TRUE if this object formats and parses scientific notation
+ * @return true if this object formats and parses scientific notation
* @see #setScientificNotation
* @see #getMinimumExponentDigits
* @see #setMinimumExponentDigits
@@ -1523,7 +1523,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* maximum number of integer digits is set to more than 8, the effective
* maximum will be 1. This allows this call to generate a 'default' scientific
* number format without additional changes.
- * @param useScientific TRUE if this object formats and parses scientific
+ * @param useScientific true if this object formats and parses scientific
* notation
* @see #isScientificNotation
* @see #getMinimumExponentDigits
@@ -1562,7 +1562,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
/**
* Return whether the exponent sign is always shown.
- * @return TRUE if the exponent is always prefixed with either the
+ * @return true if the exponent is always prefixed with either the
* localized minus sign or the localized plus sign, false if only negative
* exponents are prefixed with the localized minus sign.
* @see #setScientificNotation
@@ -1577,7 +1577,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
/**
* Set whether the exponent sign is always shown. This has no effect
* unless scientific notation is in use.
- * @param expSignAlways TRUE if the exponent is always prefixed with either
+ * @param expSignAlways true if the exponent is always prefixed with either
* the localized minus sign or the localized plus sign, false if only
* negative exponents are prefixed with the localized minus sign.
* @see #setScientificNotation
@@ -1674,8 +1674,15 @@ class U_I18N_API DecimalFormat : public NumberFormat {
int32_t getMinimumGroupingDigits() const;
/**
- * Sets the minimum grouping digits. Setting to a value less than or
- * equal to 1 turns off minimum grouping digits.
+ * Sets the minimum grouping digits. Setting the value to
+ * - 1: Turns off minimum grouping digits.
+ * - 0 or -1: The behavior is undefined.
+ * - UNUM_MINIMUM_GROUPING_DIGITS_AUTO: Display grouping using the default
+ * strategy for all locales.
+ * - UNUM_MINIMUM_GROUPING_DIGITS_MIN2: Display grouping using locale
+ * defaults, except do not show grouping on values smaller than 10000
+ * (such that there is a minimum of two digits before the first
+ * separator).
*
* For more control over grouping strategies, use NumberFormatter.
*
@@ -1689,7 +1696,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* Allows you to get the behavior of the decimal separator with integers.
* (The decimal separator will always appear with decimals.)
*
- * @return TRUE if the decimal separator always appear with decimals.
+ * @return true if the decimal separator always appear with decimals.
* Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345
* @stable ICU 2.0
*/
@@ -1699,7 +1706,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* Allows you to set the behavior of the decimal separator with integers.
* (The decimal separator will always appear with decimals.)
*
- * @param newValue set TRUE if the decimal separator will always appear with decimals.
+ * @param newValue set true if the decimal separator will always appear with decimals.
* Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345
* @stable ICU 2.0
*/
@@ -1708,7 +1715,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
/**
* Allows you to get the parse behavior of the pattern decimal mark.
*
- * @return TRUE if input must contain a match to decimal mark in pattern
+ * @return true if input must contain a match to decimal mark in pattern
* @stable ICU 54
*/
UBool isDecimalPatternMatchRequired(void) const;
@@ -1716,10 +1723,10 @@ class U_I18N_API DecimalFormat : public NumberFormat {
/**
* Allows you to set the parse behavior of the pattern decimal mark.
*
- * if TRUE, the input must have a decimal mark if one was specified in the pattern. When
- * FALSE the decimal mark may be omitted from the input.
+ * if true, the input must have a decimal mark if one was specified in the pattern. When
+ * false the decimal mark may be omitted from the input.
*
- * @param newValue set TRUE if input must contain a match to decimal mark in pattern
+ * @param newValue set true if input must contain a match to decimal mark in pattern
* @stable ICU 54
*/
virtual void setDecimalPatternMatchRequired(UBool newValue);
@@ -1824,13 +1831,13 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* This means a minimum of 2 integer digits, 1 fraction digit, and
* a maximum of 2 fraction digits.
* <pre>
- * . Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.
+ * . Example: "#,#00.0#;(#,#00.0#)" for negatives in parentheses.
* </pre>
* In negative patterns, the minimum and maximum counts are ignored;
* these are presumed to be set in the positive pattern.
*
* @param pattern The pattern to be applied.
- * @param parseError Struct to recieve information on position
+ * @param parseError Struct to receive information on position
* of error if an error is encountered
* @param status Output param set to success/failure code on
* exit. If the pattern is invalid, this will be
@@ -1866,13 +1873,13 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* This means a minimum of 2 integer digits, 1 fraction digit, and
* a maximum of 2 fraction digits.
*
- * Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.
+ * Example: "#,#00.0#;(#,#00.0#)" for negatives in parentheses.
*
* In negative patterns, the minimum and maximum counts are ignored;
* these are presumed to be set in the positive pattern.
*
* @param pattern The localized pattern to be applied.
- * @param parseError Struct to recieve information on position
+ * @param parseError Struct to receive information on position
* of error if an error is encountered
* @param status Output param set to success/failure code on
* exit. If the pattern is invalid, this will be
@@ -1962,7 +1969,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* to one. If the maximum significant digits count is less than
* <code>min</code>, then it is set to <code>min</code>.
* This function also enables the use of significant digits
- * by this formatter - areSignificantDigitsUsed() will return TRUE.
+ * by this formatter - areSignificantDigitsUsed() will return true.
* @see #areSignificantDigitsUsed
* @param min the fewest significant digits to be shown
* @stable ICU 3.0
@@ -1975,7 +1982,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* to one. If the minimum significant digits count is greater
* than <code>max</code>, then it is set to <code>max</code>.
* This function also enables the use of significant digits
- * by this formatter - areSignificantDigitsUsed() will return TRUE.
+ * by this formatter - areSignificantDigitsUsed() will return true.
* @see #areSignificantDigitsUsed
* @param max the most significant digits to be shown
* @stable ICU 3.0
diff --git a/contrib/libs/icu/include/unicode/dtfmtsym.h b/contrib/libs/icu/include/unicode/dtfmtsym.h
index c6d76fe98e..200b3a6ef1 100644
--- a/contrib/libs/icu/include/unicode/dtfmtsym.h
+++ b/contrib/libs/icu/include/unicode/dtfmtsym.h
@@ -174,7 +174,7 @@ public:
* @return true if other is semantically equal to this.
* @stable ICU 2.0
*/
- UBool operator==(const DateFormatSymbols& other) const;
+ bool operator==(const DateFormatSymbols& other) const;
/**
* Return true if another object is semantically unequal to this one.
@@ -183,7 +183,7 @@ public:
* @return true if other is semantically unequal to this.
* @stable ICU 2.0
*/
- UBool operator!=(const DateFormatSymbols& other) const { return !operator==(other); }
+ bool operator!=(const DateFormatSymbols& other) const { return !operator==(other); }
/**
* Gets abbreviated era strings. For example: "AD" and "BC".
@@ -388,8 +388,7 @@ public:
* Gets quarter strings by width and context. For example: "1st Quarter", "2nd Quarter", etc.
* @param count Filled in with length of the array.
* @param context The formatting context, either FORMAT or STANDALONE
- * @param width The width of returned strings, either WIDE or ABBREVIATED. There
- * are no NARROW quarters.
+ * @param width The width of returned strings, either WIDE, ABBREVIATED, or NARROW.
* @return the quarter strings. (DateFormatSymbols retains ownership.)
* @stable ICU 3.6
*/
@@ -401,8 +400,7 @@ public:
* @param quarters The new quarter strings. (not adopted; caller retains ownership)
* @param count Filled in with length of the array.
* @param context The formatting context, either FORMAT or STANDALONE
- * @param width The width of returned strings, either WIDE or ABBREVIATED. There
- * are no NARROW quarters.
+ * @param width The width of returned strings, either WIDE, ABBREVIATED, or NARROW.
* @stable ICU 3.6
*/
void setQuarters(const UnicodeString* quarters, int32_t count, DtContextType context, DtWidthType width);
@@ -554,7 +552,7 @@ public:
/**
* Sets timezone strings. These strings are stored in a 2-dimensional array.
* <p><b>Note:</b> SimpleDateFormat no longer use the zone strings stored in
- * a DateFormatSymbols. Therefore, the time zone strings set by this mthod
+ * a DateFormatSymbols. Therefore, the time zone strings set by this method
* have no effects in an instance of SimpleDateFormat for formatting time
* zones.
* @param strings The timezone strings as a 2-d array to be copied. (not adopted; caller retains ownership)
@@ -630,7 +628,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -776,6 +774,13 @@ private:
int32_t fShortQuartersCount;
/**
+ * Narrow quarters. For example: "1", "2", etc.
+ * (In many, but not all, locales, this is the same as "Q", but there are locales for which this isn't true.)
+ */
+ UnicodeString *fNarrowQuarters;
+ int32_t fNarrowQuartersCount;
+
+ /**
* Standalone quarter strings. For example: "1st quarter", "2nd quarter", etc.
*/
UnicodeString *fStandaloneQuarters;
@@ -788,6 +793,13 @@ private:
int32_t fStandaloneShortQuartersCount;
/**
+ * Standalone narrow quarter strings. For example: "1", "2", etc.
+ * (In many, but not all, locales, this is the same as "q", but there are locales for which this isn't true.)
+ */
+ UnicodeString *fStandaloneNarrowQuarters;
+ int32_t fStandaloneNarrowQuartersCount;
+
+ /**
* All leap month patterns, for example "{0}bis".
*/
UnicodeString *fLeapMonthPatterns;
@@ -919,13 +931,14 @@ private:
* failure code upon return.
* @param useLastResortData determine if use last resort data
*/
- void initializeData(const Locale& locale, const char *type, UErrorCode& status, UBool useLastResortData = FALSE);
+ void initializeData(const Locale& locale, const char *type,
+ UErrorCode& status, UBool useLastResortData = false);
/**
* Copy or alias an array in another object, as appropriate.
*
* @param dstArray the copy destination array.
- * @param dstCount fill in with the lenth of 'dstArray'.
+ * @param dstCount fill in with the length of 'dstArray'.
* @param srcArray the source array to be copied.
* @param srcCount the length of items to be copied from the 'srcArray'.
*/
@@ -983,12 +996,12 @@ private:
static UDateFormatField U_EXPORT2 getPatternCharIndex(char16_t c);
/**
- * Returns TRUE if f (with its pattern character repeated count times) is a numeric field.
+ * Returns true if f (with its pattern character repeated count times) is a numeric field.
*/
static UBool U_EXPORT2 isNumericField(UDateFormatField f, int32_t count);
/**
- * Returns TRUE if c (repeated count times) is the pattern character for a numeric field.
+ * Returns true if c (repeated count times) is the pattern character for a numeric field.
*/
static UBool U_EXPORT2 isNumericPatternChar(char16_t c, int32_t count);
public:
diff --git a/contrib/libs/icu/include/unicode/dtintrv.h b/contrib/libs/icu/include/unicode/dtintrv.h
index 15e15c9d40..46a94ce349 100644
--- a/contrib/libs/icu/include/unicode/dtintrv.h
+++ b/contrib/libs/icu/include/unicode/dtintrv.h
@@ -89,7 +89,7 @@ public:
* other classes have different class IDs.
* @stable ICU 4.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
@@ -106,17 +106,17 @@ public:
/**
* 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;
+ virtual bool 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;
+ inline bool operator!=(const DateInterval& other) const;
/**
@@ -151,7 +151,7 @@ DateInterval::getToDate() const {
}
-inline UBool
+inline bool
DateInterval::operator!=(const DateInterval& other) const {
return ( !operator==(other) );
}
diff --git a/contrib/libs/icu/include/unicode/dtitvfmt.h b/contrib/libs/icu/include/unicode/dtitvfmt.h
index 4e4d712b4f..85a1b365d8 100644
--- a/contrib/libs/icu/include/unicode/dtitvfmt.h
+++ b/contrib/libs/icu/include/unicode/dtitvfmt.h
@@ -31,6 +31,7 @@
#include "unicode/dtitvinf.h"
#include "unicode/dtptngen.h"
#include "unicode/formattedvalue.h"
+#include "unicode/udisplaycontext.h"
U_NAMESPACE_BEGIN
@@ -433,7 +434,7 @@ public:
* @return A copy of the object.
* @stable ICU 4.0
*/
- virtual DateIntervalFormat* clone() const;
+ virtual DateIntervalFormat* clone() const override;
/**
* Return true if the given Format objects are semantically equal. Objects
@@ -442,7 +443,7 @@ public:
* @return true if the given Format objects are semantically equal.
* @stable ICU 4.0
*/
- virtual UBool operator==(const Format& other) const;
+ virtual bool operator==(const Format& other) const override;
/**
* Return true if the given Format objects are not semantically equal.
@@ -451,7 +452,7 @@ public:
* @return true if the given Format objects are not semantically equal.
* @stable ICU 4.0
*/
- UBool operator!=(const Format& other) const;
+ bool operator!=(const Format& other) const;
using Format::format;
@@ -478,7 +479,7 @@ public:
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPosition& fieldPosition,
- UErrorCode& status) const ;
+ UErrorCode& status) const override;
@@ -594,7 +595,7 @@ public:
*/
virtual void parseObject(const UnicodeString& source,
Formattable& result,
- ParsePosition& parse_pos) const;
+ ParsePosition& parse_pos) const override;
/**
@@ -652,6 +653,32 @@ public:
virtual void setTimeZone(const TimeZone& zone);
/**
+ * Set a particular UDisplayContext value in the formatter, such as
+ * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. This causes the formatted
+ * result to be capitalized appropriately for the context in which
+ * it is intended to be used, considering both the locale and the
+ * type of field at the beginning of the formatted result.
+ * @param value The UDisplayContext value to set.
+ * @param status Input/output status. If at entry this indicates a failure
+ * status, the function will do nothing; otherwise this will be
+ * updated with any new status from the function.
+ * @stable ICU 68
+ */
+ virtual void setContext(UDisplayContext value, UErrorCode& status);
+
+ /**
+ * Get the formatter's UDisplayContext value for the specified UDisplayContextType,
+ * such as UDISPCTX_TYPE_CAPITALIZATION.
+ * @param type The UDisplayContextType whose value to return
+ * @param status Input/output status. If at entry this indicates a failure
+ * status, the function will do nothing; otherwise this will be
+ * updated with any new status from the function.
+ * @return The UDisplayContextValue for the specified type.
+ * @stable ICU 68
+ */
+ virtual UDisplayContext getContext(UDisplayContextType type, UErrorCode& status) const;
+
+ /**
* Return the class ID for this class. This is useful only for comparing to
* a return value from getDynamicClassID(). For example:
* <pre>
@@ -675,7 +702,7 @@ public:
* other classes have different class IDs.
* @stable ICU 4.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
protected:
@@ -713,7 +740,7 @@ private:
* Whether the first date in interval pattern is later date or not.
* Fallback format set the default ordering.
* And for a particular interval pattern, the order can be
- * overriden by prefixing the interval pattern with "latestFirst:" or
+ * overridden by prefixing the interval pattern with "latestFirst:" or
* "earliestFirst:"
* For example, given 2 date, Jan 10, 2007 to Feb 10, 2007.
* if the fallback format is "{0} - {1}",
@@ -796,7 +823,7 @@ private:
* to be formatted into date interval string
* @param toCalendar calendar set to the to date in date interval
* to be formatted into date interval string
- * @param fromToOnSameDay TRUE iff from and to dates are on the same day
+ * @param fromToOnSameDay true iff from and to dates are on the same day
* (any difference is in ampm/hours or below)
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
@@ -864,6 +891,19 @@ private:
void setFallbackPattern(UCalendarDateFields field,
const UnicodeString& skeleton,
UErrorCode& status);
+
+
+
+ /**
+ * Converts special hour metacharacters (such as 'j') in the skeleton into locale-appropriate
+ * pattern characters.
+ *
+ *
+ * @param skeleton The skeleton to convert
+ * @return A copy of the skeleton, which "j" and any other special hour metacharacters converted to the regular ones.
+ *
+ */
+ UnicodeString normalizeHourMetacharacters(const UnicodeString& skeleton) const;
@@ -919,8 +959,8 @@ private:
* @param dateSkeleton normalized date skeleton
* @param timeSkeleton normalized time skeleton
* @return whether the resource is found for the skeleton.
- * TRUE if interval pattern found for the skeleton,
- * FALSE otherwise.
+ * true if interval pattern found for the skeleton,
+ * false otherwise.
*/
UBool setSeparateDateTimePtn(const UnicodeString& dateSkeleton,
const UnicodeString& timeSkeleton);
@@ -948,8 +988,8 @@ private:
* @param extendedBestSkeleton extended best match skeleton
* @return whether the interval pattern is found
* through extending skeleton or not.
- * TRUE if interval pattern is found by
- * extending skeleton, FALSE otherwise.
+ * true if interval pattern is found by
+ * extending skeleton, false otherwise.
*/
UBool setIntervalPattern(UCalendarDateFields field,
const UnicodeString* skeleton,
@@ -984,6 +1024,7 @@ private:
* @param differenceInfo the difference between 2 skeletons
* 1 means only field width differs
* 2 means v/z exchange
+ * @param suppressDayPeriodField if true, remove the day period field from the pattern, if there is one
* @param adjustedIntervalPattern adjusted interval pattern
*/
static void U_EXPORT2 adjustFieldWidth(
@@ -991,9 +1032,21 @@ private:
const UnicodeString& bestMatchSkeleton,
const UnicodeString& bestMatchIntervalPattern,
int8_t differenceInfo,
+ UBool suppressDayPeriodField,
UnicodeString& adjustedIntervalPattern);
/**
+ * Does the same thing as UnicodeString::findAndReplace(), except that it won't perform
+ * the substitution inside quoted literal text.
+ * @param targetString The string to perform the find-replace operation on.
+ * @param strToReplace The string to search for and replace in the target string.
+ * @param strToReplaceWith The string to substitute in wherever `stringToReplace` was found.
+ */
+ static void U_EXPORT2 findReplaceInPattern(UnicodeString& targetString,
+ const UnicodeString& strToReplace,
+ const UnicodeString& strToReplaceWith);
+
+ /**
* Concat a single date pattern with a time interval pattern,
* set it into the intervalPatterns, while field is time field.
* This is used to handle time interval patterns on skeleton with
@@ -1137,9 +1190,14 @@ private:
UnicodeString* fDatePattern;
UnicodeString* fTimePattern;
UnicodeString* fDateTimeFormat;
+
+ /**
+ * Other formatting information
+ */
+ UDisplayContext fCapitalizationContext;
};
-inline UBool
+inline bool
DateIntervalFormat::operator!=(const Format& other) const {
return !operator==(other);
}
diff --git a/contrib/libs/icu/include/unicode/dtitvinf.h b/contrib/libs/icu/include/unicode/dtitvinf.h
index 68bfa4352a..b5afc06467 100644
--- a/contrib/libs/icu/include/unicode/dtitvinf.h
+++ b/contrib/libs/icu/include/unicode/dtitvinf.h
@@ -45,7 +45,7 @@ U_NAMESPACE_BEGIN
* <P>
* For power users, who want to create their own date interval patterns,
* or want to re-set date interval patterns, they could do so by
- * directly creating DateIntervalInfo and manupulating it.
+ * directly creating DateIntervalInfo and manipulating it.
*
* <P>
* Logically, the interval patterns are mappings
@@ -114,7 +114,7 @@ U_NAMESPACE_BEGIN
* the first date in the interval pattern for this locale is earlier date.
* If the fallback format is &quot;{1} - {0}&quot;, it means the first date is the
* later date.
- * For a particular interval pattern, the default order can be overriden
+ * For a particular interval pattern, the default order can be overridden
* by prefixing &quot;latestFirst:&quot; or &quot;earliestFirst:&quot; to the interval pattern.
* For example, if the fallback format is &quot;{0}-{1}&quot;,
* but for skeleton &quot;yMMMd&quot;, the interval pattern when day is different is
@@ -214,7 +214,7 @@ public:
* @return true if other is semantically equal to this.
* @stable ICU 4.0
*/
- virtual UBool operator==(const DateIntervalInfo& other) const;
+ virtual bool operator==(const DateIntervalInfo& other) const;
/**
* Return true if another object is semantically unequal to this one.
@@ -223,7 +223,7 @@ public:
* @return true if other is semantically unequal to this.
* @stable ICU 4.0
*/
- UBool operator!=(const DateIntervalInfo& other) const;
+ bool operator!=(const DateIntervalInfo& other) const;
@@ -307,8 +307,8 @@ public:
/** Get default order -- whether the first date in pattern is later date
or not.
- * return default date ordering in interval pattern. TRUE if the first date
- * in pattern is later date, FALSE otherwise.
+ * return default date ordering in interval pattern. true if the first date
+ * in pattern is later date, false otherwise.
* @stable ICU 4.0
*/
UBool getDefaultOrder() const;
@@ -319,7 +319,7 @@ public:
*
* @stable ICU 4.0
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -406,7 +406,7 @@ private:
* and the best match skeleton.
*
* TODO (xji): set field weight or
- * isolate the funtionality in DateTimePatternGenerator
+ * isolate the functionality in DateTimePatternGenerator
* @param skeleton input skeleton
* @param bestMatchDistanceInfo the difference between input skeleton
* and best match skeleton.
@@ -508,7 +508,7 @@ private:
};// end class DateIntervalInfo
-inline UBool
+inline bool
DateIntervalInfo::operator!=(const DateIntervalInfo& other) const {
return !operator==(other);
}
diff --git a/contrib/libs/icu/include/unicode/dtptngen.h b/contrib/libs/icu/include/unicode/dtptngen.h
index dd99d58e65..250a0e089f 100644
--- a/contrib/libs/icu/include/unicode/dtptngen.h
+++ b/contrib/libs/icu/include/unicode/dtptngen.h
@@ -77,6 +77,13 @@ public:
#ifndef U_HIDE_INTERNAL_API
/**
+ * For ICU use only. Skips loading the standard date/time patterns (which is done via DateFormat).
+ *
+ * @internal
+ */
+ static DateTimePatternGenerator* U_EXPORT2 createInstanceNoStdPat(const Locale& uLocale, UErrorCode& status);
+
+ /**
* For ICU use only
*
* @internal
@@ -113,7 +120,7 @@ public:
* @return true if other is semantically equal to this.
* @stable ICU 3.8
*/
- UBool operator==(const DateTimePatternGenerator& other) const;
+ bool operator==(const DateTimePatternGenerator& other) const;
/**
* Return true if another object is semantically unequal to this one.
@@ -122,7 +129,7 @@ public:
* @return true if other is semantically unequal to this.
* @stable ICU 3.8
*/
- UBool operator!=(const DateTimePatternGenerator& other) const;
+ bool operator!=(const DateTimePatternGenerator& other) const;
/**
* Utility to return a unique skeleton from a given pattern. For example,
@@ -195,7 +202,7 @@ public:
/**
* Adds a pattern to the generator. If the pattern has the same skeleton as
* an existing pattern, and the override parameter is set, then the previous
- * value is overriden. Otherwise, the previous value is retained. In either
+ * value is overridden. Otherwise, the previous value is retained. In either
* case, the conflicting status is set and previous vale is stored in
* conflicting pattern.
* <p>
@@ -485,7 +492,6 @@ public:
#if !UCONFIG_NO_FORMATTING
-#ifndef U_HIDE_DRAFT_API
/**
* Get the default hour cycle for a locale. Uses the locale that the
* DateTimePatternGenerator was initially created with.
@@ -496,10 +502,9 @@ public:
* which must not indicate a failure before the function call.
* Set to U_UNSUPPORTED_ERROR if used on an empty instance.
* @return the default hour cycle.
- * @draft ICU 67
+ * @stable ICU 67
*/
UDateFormatHourCycle getDefaultHourCycle(UErrorCode& status) const;
-#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
@@ -508,7 +513,7 @@ public:
*
* @stable ICU 3.8
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -526,7 +531,7 @@ private:
/**
* Constructor.
*/
- DateTimePatternGenerator(const Locale& locale, UErrorCode & status);
+ DateTimePatternGenerator(const Locale& locale, UErrorCode & status, UBool skipStdPatterns = false);
/**
* Copy constructor.
@@ -573,7 +578,7 @@ private:
// with #13183, no longer need flags for b, B
};
- void initData(const Locale &locale, UErrorCode &status);
+ void initData(const Locale &locale, UErrorCode &status, UBool skipStdPatterns = false);
void addCanonicalItems(UErrorCode &status);
void addICUPatterns(const Locale& locale, UErrorCode& status);
void hackTimes(const UnicodeString& hackPattern, UErrorCode& status);
diff --git a/contrib/libs/icu/include/unicode/dtrule.h b/contrib/libs/icu/include/unicode/dtrule.h
index adab8967f6..19e94bc981 100644
--- a/contrib/libs/icu/include/unicode/dtrule.h
+++ b/contrib/libs/icu/include/unicode/dtrule.h
@@ -40,11 +40,11 @@ public:
enum DateRuleType {
DOM = 0, /**< The exact day of month,
for example, March 11. */
- DOW, /**< The Nth occurence of the day of week,
+ DOW, /**< The Nth occurrence of the day of week,
for example, 2nd Sunday in March. */
- DOW_GEQ_DOM, /**< The first occurence of the day of week on or after the day of monnth,
+ DOW_GEQ_DOM, /**< The first occurrence of the day of week on or after the day of monnth,
for example, first Sunday on or after March 8. */
- DOW_LEQ_DOM /**< The last occurence of the day of week on or before the day of month,
+ DOW_LEQ_DOM /**< The last occurrence of the day of week on or before the day of month,
for example, first Sunday on or before March 14. */
};
@@ -74,7 +74,7 @@ public:
int32_t millisInDay, TimeRuleType timeType);
/**
- * Constructs a <code>DateTimeRule</code> by the day of week and its oridinal
+ * Constructs a <code>DateTimeRule</code> by the day of week and its ordinal
* number and the time rule. The date rule type for an instance created
* by this constructor is <code>DOW</code>.
*
@@ -144,7 +144,7 @@ public:
* @return true if the given DateTimeRule objects are semantically equal.
* @stable ICU 3.8
*/
- UBool operator==(const DateTimeRule& that) const;
+ bool operator==(const DateTimeRule& that) const;
/**
* Return true if the given DateTimeRule objects are semantically unequal. Objects
@@ -153,7 +153,7 @@ public:
* @return true if the given DateTimeRule objects are semantically unequal.
* @stable ICU 3.8
*/
- UBool operator!=(const DateTimeRule& that) const;
+ bool operator!=(const DateTimeRule& that) const;
/**
* Gets the date rule type, such as <code>DOM</code>
@@ -194,7 +194,7 @@ public:
int32_t getRuleDayOfWeek(void) const;
/**
- * Gets the ordinal number of the occurence of the day of week
+ * Gets the ordinal number of the occurrence of the day of week
* in the month. When the date rule type is not <code>DOW</code>,
* the value is always 0.
* @return The rule day of week ordinal number in the month.
@@ -243,7 +243,7 @@ public:
* other classes have different class IDs.
* @stable ICU 3.8
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/include/unicode/edits.h b/contrib/libs/icu/include/unicode/edits.h
index c3ceaccb3b..bfa07fa676 100644
--- a/contrib/libs/icu/include/unicode/edits.h
+++ b/contrib/libs/icu/include/unicode/edits.h
@@ -159,7 +159,7 @@ public:
* @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 @@ public:
*/
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 @@ public:
*/
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 @@ public:
* @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 @@ public:
* @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 @@ public:
* @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 @@ public:
/**
* 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 @@ public:
* {@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 @@ public:
* @stable ICU 59
*/
Iterator getCoarseChangesIterator() const {
- return Iterator(array, length, TRUE, TRUE);
+ return Iterator(array, length, true, true);
}
/**
@@ -448,7 +448,7 @@ public:
* @stable ICU 59
*/
Iterator getCoarseIterator() const {
- return Iterator(array, length, FALSE, TRUE);
+ return Iterator(array, length, false, true);
}
/**
@@ -460,7 +460,7 @@ public:
* @stable ICU 59
*/
Iterator getFineChangesIterator() const {
- return Iterator(array, length, TRUE, FALSE);
+ return Iterator(array, length, true, false);
}
/**
@@ -471,7 +471,7 @@ public:
* @stable ICU 59
*/
Iterator getFineIterator() const {
- return Iterator(array, length, FALSE, FALSE);
+ return Iterator(array, length, false, false);
}
/**
diff --git a/contrib/libs/icu/include/unicode/fieldpos.h b/contrib/libs/icu/include/unicode/fieldpos.h
index 23ee38624b..b985f3b2f7 100644
--- a/contrib/libs/icu/include/unicode/fieldpos.h
+++ b/contrib/libs/icu/include/unicode/fieldpos.h
@@ -161,18 +161,18 @@ public:
/**
* Equality operator.
* @param that the object to be compared with.
- * @return TRUE if the two field positions are equal, FALSE otherwise.
+ * @return true if the two field positions are equal, false otherwise.
* @stable ICU 2.0
*/
- UBool operator==(const FieldPosition& that) const;
+ bool operator==(const FieldPosition& that) const;
/**
* Equality operator.
* @param that the object to be compared with.
- * @return TRUE if the two field positions are not equal, FALSE otherwise.
+ * @return true if the two field positions are not equal, false otherwise.
* @stable ICU 2.0
*/
- UBool operator!=(const FieldPosition& that) const;
+ bool operator!=(const FieldPosition& that) const;
/**
* Clone this object.
@@ -236,7 +236,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -274,7 +274,7 @@ FieldPosition::operator=(const FieldPosition& copy)
return *this;
}
-inline UBool
+inline bool
FieldPosition::operator==(const FieldPosition& copy) const
{
return (fField == copy.fField &&
@@ -282,7 +282,7 @@ FieldPosition::operator==(const FieldPosition& copy) const
fBeginIndex == copy.fBeginIndex);
}
-inline UBool
+inline bool
FieldPosition::operator!=(const FieldPosition& copy) const
{
return !operator==(copy);
diff --git a/contrib/libs/icu/include/unicode/filteredbrk.h b/contrib/libs/icu/include/unicode/filteredbrk.h
index 4293676325..8b07e39ae1 100644
--- a/contrib/libs/icu/include/unicode/filteredbrk.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/fmtable.h b/contrib/libs/icu/include/unicode/fmtable.h
index 7bec4f6906..e1c6dec35e 100644
--- a/contrib/libs/icu/include/unicode/fmtable.h
+++ b/contrib/libs/icu/include/unicode/fmtable.h
@@ -179,18 +179,18 @@ public:
/**
* Equality comparison.
* @param other the object to be compared with.
- * @return TRUE if other are equal to this, FALSE otherwise.
+ * @return true if other are equal to this, false otherwise.
* @stable ICU 2.0
*/
- UBool operator==(const Formattable &other) const;
+ bool operator==(const Formattable &other) const;
/**
* Equality operator.
* @param other the object to be compared with.
- * @return TRUE if other are unequal to this, FALSE otherwise.
+ * @return true if other are unequal to this, false otherwise.
* @stable ICU 2.0
*/
- UBool operator!=(const Formattable& other) const
+ bool operator!=(const Formattable& other) const
{ return !operator==(other); }
/**
@@ -277,9 +277,9 @@ public:
Type getType(void) const;
/**
- * Returns TRUE if the data type of this Formattable object
+ * Returns true if the data type of this Formattable object
* is kDouble, kLong, or kInt64
- * @return TRUE if this is a pure numeric object
+ * @return true if this is a pure numeric object
* @stable ICU 3.0
*/
UBool isNumeric() const;
@@ -294,7 +294,7 @@ public:
/**
* Gets the double value of this object. If this object is of type
- * long, int64 or Decimal Number then a conversion is peformed, with
+ * long, int64 or Decimal Number then a conversion is performed, with
* possible loss of precision. If the type is kObject and the
* object is a Measure, then the result of
* getNumber().getDouble(status) is returned. If this object is
@@ -320,7 +320,7 @@ public:
* as appropriate, is returned and the status is set to
* U_INVALID_FORMAT_ERROR. If this object is of type kInt64 and
* it fits within a long, then no precision is lost. If it is of
- * type kDouble, then a conversion is peformed, with
+ * type kDouble, then a conversion is performed, with
* truncation of any fractional part. If the type is kObject and
* the object is a Measure, then the result of
* getNumber().getLong(status) is returned. If this object is
@@ -346,7 +346,7 @@ public:
* the maximum or minimum int64 value, as appropriate, is returned
* and the status is set to U_INVALID_FORMAT_ERROR. If the
* magnitude fits in an int64, then a casting conversion is
- * peformed, with truncation of any fractional part. If the type
+ * performed, with truncation of any fractional part. If the type
* is kObject and the object is a Measure, then the result of
* getNumber().getDouble(status) is returned. If this object is
* neither a numeric type nor a Measure, then 0 is returned and
@@ -479,7 +479,7 @@ public:
* the full precision and range of the original input, unconstrained by
* the limits of a double floating point or a 64 bit int.
*
- * This function is not thread safe, and therfore is not declared const,
+ * This function is not thread safe, and therefore is not declared const,
* even though it is logically const.
*
* Possible errors include U_MEMORY_ALLOCATION_ERROR, and
@@ -587,7 +587,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
diff --git a/contrib/libs/icu/include/unicode/format.h b/contrib/libs/icu/include/unicode/format.h
index 96883a81a2..a21e61ad56 100644
--- a/contrib/libs/icu/include/unicode/format.h
+++ b/contrib/libs/icu/include/unicode/format.h
@@ -88,7 +88,7 @@ U_NAMESPACE_BEGIN
* 0xFFFD is returned.
* <P>
* If there is no match when parsing, a parse failure UErrorCode is
- * retured for methods which take no ParsePosition. For the method
+ * returned for methods which take no ParsePosition. For the method
* that takes a ParsePosition, the index parameter is left unchanged.
* <P>
* <em>User subclasses are not supported.</em> While clients may write
@@ -111,7 +111,7 @@ public:
* Objects of different subclasses are considered unequal.
* @stable ICU 2.0
*/
- virtual UBool operator==(const Format& other) const = 0;
+ virtual bool operator==(const Format& other) const = 0;
/**
* Return true if the given Format objects are not semantically
@@ -120,7 +120,7 @@ public:
* @return Return true if the given Format objects are not semantically.
* @stable ICU 2.0
*/
- UBool operator!=(const Format& other) const { return !operator==(other); }
+ bool operator!=(const Format& other) const { return !operator==(other); }
/**
* Clone this object polymorphically. The caller is responsible
@@ -288,7 +288,7 @@ protected:
* Simple function for initializing a UParseError from a UnicodeString.
*
* @param pattern The pattern to copy into the parseError
- * @param pos The position in pattern where the error occured
+ * @param pos The position in pattern where the error occurred
* @param parseError The UParseError object to fill in
* @stable ICU 2.4
*/
diff --git a/contrib/libs/icu/include/unicode/formattedvalue.h b/contrib/libs/icu/include/unicode/formattedvalue.h
index e7ba4ec245..5febea0661 100644
--- a/contrib/libs/icu/include/unicode/formattedvalue.h
+++ b/contrib/libs/icu/include/unicode/formattedvalue.h
@@ -116,7 +116,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
* Gets the field category for the current position.
*
* The return value is well-defined only after
- * FormattedValue#nextPosition returns TRUE.
+ * FormattedValue#nextPosition returns true.
*
* @return The field category saved in the instance.
* @stable ICU 64
@@ -129,7 +129,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
* Gets the field for the current position.
*
* The return value is well-defined only after
- * FormattedValue#nextPosition returns TRUE.
+ * FormattedValue#nextPosition returns true.
*
* @return The field saved in the instance.
* @stable ICU 64
@@ -141,7 +141,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
/**
* Gets the INCLUSIVE start index for the current position.
*
- * The return value is well-defined only after FormattedValue#nextPosition returns TRUE.
+ * The return value is well-defined only after FormattedValue#nextPosition returns true.
*
* @return The start index saved in the instance.
* @stable ICU 64
@@ -153,7 +153,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
/**
* Gets the EXCLUSIVE end index stored for the current position.
*
- * The return value is well-defined only after FormattedValue#nextPosition returns TRUE.
+ * The return value is well-defined only after FormattedValue#nextPosition returns true.
*
* @return The end index saved in the instance.
* @stable ICU 64
@@ -301,8 +301,8 @@ class U_I18N_API FormattedValue /* not : public UObject because this is an inter
* see ConstrainedFieldPosition#constrainCategory
* and ConstrainedFieldPosition#constrainField.
* @param status Set if an error occurs.
- * @return TRUE if a new occurrence of the field was found;
- * FALSE otherwise or if an error was set.
+ * @return true if a new occurrence of the field was found;
+ * false otherwise or if an error was set.
*
* @stable ICU 64
*/
diff --git a/contrib/libs/icu/include/unicode/fpositer.h b/contrib/libs/icu/include/unicode/fpositer.h
index 3e8a0108f1..0e38d0b78b 100644
--- a/contrib/libs/icu/include/unicode/fpositer.h
+++ b/contrib/libs/icu/include/unicode/fpositer.h
@@ -84,7 +84,7 @@ public:
* equal array of run values.
* @stable ICU 4.4
*/
- UBool operator==(const FieldPositionIterator&) const;
+ bool operator==(const FieldPositionIterator&) const;
/**
* Returns the complement of the result of operator==
@@ -92,11 +92,11 @@ public:
* @return the complement of the result of operator==
* @stable ICU 4.4
*/
- UBool operator!=(const FieldPositionIterator& rhs) const { return !operator==(rhs); }
+ bool operator!=(const FieldPositionIterator& rhs) const { return !operator==(rhs); }
/**
* If the current position is valid, updates the FieldPosition values, advances the iterator,
- * and returns TRUE, otherwise returns FALSE.
+ * and returns true, otherwise returns false.
* @stable ICU 4.4
*/
UBool next(FieldPosition& fp);
diff --git a/contrib/libs/icu/include/unicode/gregocal.h b/contrib/libs/icu/include/unicode/gregocal.h
index 4ce40daf3a..4c2be18251 100644
--- a/contrib/libs/icu/include/unicode/gregocal.h
+++ b/contrib/libs/icu/include/unicode/gregocal.h
@@ -78,9 +78,9 @@ U_NAMESPACE_BEGIN
* \code
* // get the supported ids for GMT-08:00 (Pacific Standard Time)
* UErrorCode success = U_ZERO_ERROR;
- * const StringEnumeration *ids = TimeZone::createEnumeration(-8 * 60 * 60 * 1000);
+ * const StringEnumeration *ids = TimeZone::createEnumeration(-8 * 60 * 60 * 1000, success);
* // if no ids were returned, something is wrong. get out.
- * if (ids == 0 || ids->count(success) == 0) {
+ * if (U_FAILURE(success)) {
* return;
* }
*
@@ -141,7 +141,7 @@ U_NAMESPACE_BEGIN
* cout << "DST_OFFSET: " << (calendar->get( UCAL_DST_OFFSET, success )/(60*60*1000)) << endl; // in hours
*
* if (U_FAILURE(success)) {
- * cout << "An error occured. success=" << u_errorName(success) << endl;
+ * cout << "An error occurred. success=" << u_errorName(success) << endl;
* }
*
* delete ids;
@@ -303,7 +303,7 @@ public:
* @return return a polymorphic copy of this calendar.
* @stable ICU 2.0
*/
- virtual GregorianCalendar* clone() const;
+ virtual GregorianCalendar* clone() const override;
/**
* Sets the GregorianCalendar change date. This is the point when the switch from
@@ -344,13 +344,13 @@ public:
UBool isLeapYear(int32_t year) const;
/**
- * Returns TRUE if the given Calendar object is equivalent to this
+ * Returns true if the given Calendar object is equivalent to this
* one. Calendar override.
*
* @param other the Calendar to be compared with this Calendar
* @stable ICU 2.4
*/
- virtual UBool isEquivalentTo(const Calendar& other) const;
+ virtual UBool isEquivalentTo(const Calendar& other) const override;
#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
@@ -364,7 +364,7 @@ public:
* an error status.
* @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
*/
- virtual void roll(EDateFields field, int32_t amount, UErrorCode& status);
+ virtual void roll(EDateFields field, int32_t amount, UErrorCode& status) override;
#endif // U_FORCE_HIDE_DEPRECATED_API
/**
@@ -378,7 +378,7 @@ public:
* an error status.
* @stable ICU 2.6.
*/
- virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode& status);
+ virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) override;
#ifndef U_HIDE_DEPRECATED_API
/**
@@ -409,7 +409,7 @@ public:
* @return the minimum value that this field could have, given the current date.
* @stable ICU 3.0
*/
- int32_t getActualMinimum(UCalendarDateFields field, UErrorCode &status) const;
+ int32_t getActualMinimum(UCalendarDateFields field, UErrorCode &status) const override;
#ifndef U_HIDE_DEPRECATED_API
/**
@@ -434,7 +434,7 @@ public:
* @return the maximum value that this field could have, given the current date.
* @stable ICU 2.6
*/
- virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const;
+ virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const override;
/**
* (Overrides Calendar) Return true if the current date for this Calendar is in
@@ -445,7 +445,7 @@ public:
* false, otherwise.
* @stable ICU 2.0
*/
- virtual UBool inDaylightTime(UErrorCode& status) const;
+ virtual UBool inDaylightTime(UErrorCode& status) const override;
public:
@@ -459,7 +459,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Return the class ID for this class. This is useful only for comparing to a return
@@ -484,7 +484,7 @@ public:
* @return legacy calendar type name string
* @stable ICU 49
*/
- virtual const char * getType() const;
+ virtual const char * getType() const override;
private:
GregorianCalendar(); // default constructor not implemented
@@ -512,7 +512,7 @@ public:
* @internal
*/
virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month,
- UBool useMonth) const;
+ UBool useMonth) const override;
/**
* Subclasses may override this. This method calls
@@ -522,7 +522,7 @@ public:
* @return julian day specified by calendar fields.
* @internal
*/
- virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField) ;
+ virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField) override;
/**
* Return the number of days in the given month of the given extended
@@ -531,7 +531,7 @@ public:
* implementation than the default implementation in Calendar.
* @internal
*/
- virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const;
+ virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override;
/**
* Return the number of days in the given extended year of this
@@ -540,7 +540,7 @@ public:
* default implementation in Calendar.
* @stable ICU 2.0
*/
- virtual int32_t handleGetYearLength(int32_t eyear) const;
+ virtual int32_t handleGetYearLength(int32_t eyear) const override;
/**
* return the length of the given month.
@@ -615,7 +615,7 @@ public:
* <code>LEAST_MAXIMUM</code>, or <code>MAXIMUM</code>
* @internal
*/
- virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const;
+ virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override;
/**
* Return the extended year defined by the current fields. This will
@@ -625,7 +625,7 @@ public:
* @return the extended year
* @internal
*/
- virtual int32_t handleGetExtendedYear();
+ virtual int32_t handleGetExtendedYear() override;
/**
* Subclasses may override this to convert from week fields
@@ -635,7 +635,7 @@ public:
* @return the extended year, UCAL_EXTENDED_YEAR
* @internal
*/
- virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy);
+ virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy) override;
/**
@@ -653,7 +653,7 @@ public:
* a calendar with the specified Julian/Gregorian cutover date.
* @internal
*/
- virtual void handleComputeFields(int32_t julianDay, UErrorCode &status);
+ virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override;
private:
/**
@@ -756,22 +756,22 @@ public:
public: // internal implementation
/**
- * @return TRUE if this calendar has the notion of a default century
+ * @return true if this calendar has the notion of a default century
* @internal
*/
- virtual UBool haveDefaultCentury() const;
+ virtual UBool haveDefaultCentury() const override;
/**
* @return the start of the default century
* @internal
*/
- virtual UDate defaultCenturyStart() const;
+ virtual UDate defaultCenturyStart() const override;
/**
* @return the beginning year of the default century
* @internal
*/
- virtual int32_t defaultCenturyStartYear() const;
+ virtual int32_t defaultCenturyStartYear() const override;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/include/unicode/icudataver.h b/contrib/libs/icu/include/unicode/icudataver.h
index 1cb202e3d4..f218ed8ebc 100644
--- a/contrib/libs/icu/include/unicode/icudataver.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/icuplug.h b/contrib/libs/icu/include/unicode/icuplug.h
index 2e57b149e1..205af360d4 100644
--- a/contrib/libs/icu/include/unicode/icuplug.h
+++ b/contrib/libs/icu/include/unicode/icuplug.h
@@ -117,14 +117,13 @@
/* === Basic types === */
#ifndef U_HIDE_INTERNAL_API
+struct UPlugData;
/**
* @{
- * Opaque structure passed to/from a plugin.
- * use the APIs to access it.
+ * Typedef for opaque structure passed to/from a plugin.
+ * Use the APIs to access it.
* @internal ICU 4.4 Technology Preview
*/
-
-struct UPlugData;
typedef struct UPlugData UPlugData;
/** @} */
@@ -208,7 +207,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 +216,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 +225,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 +235,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 +244,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 +253,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 +262,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 +271,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 +281,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 +291,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 +300,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 +309,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 +320,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 +338,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 +353,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 +367,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 +377,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/contrib/libs/icu/include/unicode/idna.h b/contrib/libs/icu/include/unicode/idna.h
index 6dfcfe48db..1305dc6048 100644
--- a/contrib/libs/icu/include/unicode/idna.h
+++ b/contrib/libs/icu/include/unicode/idna.h
@@ -95,7 +95,7 @@ public:
/**
* 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 @@ public:
/**
* 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 @@ public:
/**
* 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 @@ public:
/**
* 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 @@ public:
* 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 @@ public:
*/
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).
* <ul>
@@ -297,7 +297,7 @@ public:
* <li>With transitional processing, such characters are
* mapped (sharp s/sigma) or removed (joiner/nonjoiner).
* </ul>
- * @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 @@ private:
void reset() {
errors=labelErrors=0;
- isTransDiff=FALSE;
- isBiDi=FALSE;
- isOkBiDi=TRUE;
+ isTransDiff=false;
+ isBiDi=false;
+ isOkBiDi=true;
}
uint32_t errors, labelErrors;
diff --git a/contrib/libs/icu/include/unicode/listformatter.h b/contrib/libs/icu/include/unicode/listformatter.h
index 211055d9d1..d7ab1d2086 100644
--- a/contrib/libs/icu/include/unicode/listformatter.h
+++ b/contrib/libs/icu/include/unicode/listformatter.h
@@ -23,6 +23,8 @@
#if U_SHOW_CPLUSPLUS_API
+#if !UCONFIG_NO_FORMATTING
+
#include "unicode/unistr.h"
#include "unicode/locid.h"
#include "unicode/formattedvalue.h"
@@ -65,7 +67,6 @@ struct ListFormatData : public UMemory {
*/
-#if !UCONFIG_NO_FORMATTING
/**
* An immutable class containing the result of a list formatting operation.
*
@@ -135,7 +136,6 @@ class U_I18N_API FormattedList : public UMemory, public FormattedValue {
: fData(nullptr), fErrorCode(errorCode) {}
friend class ListFormatter;
};
-#endif // !UCONFIG_NO_FORMATTING
/**
@@ -185,8 +185,6 @@ class U_I18N_API ListFormatter : public UObject{
*/
static ListFormatter* createInstance(const Locale& locale, UErrorCode& errorCode);
-#ifndef U_HIDE_DRAFT_API
-#if !UCONFIG_NO_FORMATTING
/**
* Creates a ListFormatter for the given locale, list type, and style.
*
@@ -195,28 +193,10 @@ class U_I18N_API ListFormatter : public UObject{
* @param width The width of formatting to use.
* @param errorCode ICU error code, set if no data available for the given locale.
* @return A ListFormatter object created from internal data derived from CLDR data.
- * @draft ICU 67
+ * @stable ICU 67
*/
static ListFormatter* createInstance(
const Locale& locale, UListFormatterType type, UListFormatterWidth width, UErrorCode& errorCode);
-#endif /* !UCONFIG_NO_FORMATTING */
-#endif /* U_HIDE_DRAFT_API */
-
-#ifndef U_HIDE_INTERNAL_API
- /**
- * Creates a ListFormatter appropriate for a locale and style.
- *
- * TODO(ICU-20888): Remove this in ICU 68.
- *
- * @param locale The locale.
- * @param style the style, either "standard", "or", "unit", "unit-narrow", or "unit-short"
- * @param errorCode ICU error code, set if no data available for the given locale.
- * @return A ListFormatter object created from internal data derived from
- * CLDR data.
- * @internal
- */
- static ListFormatter* createInstance(const Locale& locale, const char* style, UErrorCode& errorCode);
-#endif /* U_HIDE_INTERNAL_API */
/**
* Destructor.
@@ -239,7 +219,6 @@ class U_I18N_API ListFormatter : public UObject{
UnicodeString& format(const UnicodeString items[], int32_t n_items,
UnicodeString& appendTo, UErrorCode& errorCode) const;
-#if !UCONFIG_NO_FORMATTING
/**
* Formats a list of strings to a FormattedList, which exposes field
* position information. The FormattedList contains more information than
@@ -255,7 +234,6 @@ class U_I18N_API ListFormatter : public UObject{
const UnicodeString items[],
int32_t n_items,
UErrorCode& errorCode) const;
-#endif // !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_INTERNAL_API
/**
@@ -279,6 +257,15 @@ class U_I18N_API ListFormatter : public UObject{
#endif /* U_HIDE_INTERNAL_API */
private:
+
+ /**
+ * Creates a ListFormatter appropriate for a locale and style.
+ *
+ * @param locale The locale.
+ * @param style the style, either "standard", "or", "unit", "unit-narrow", or "unit-short"
+ */
+ static ListFormatter* createInstance(const Locale& locale, const char* style, UErrorCode& errorCode);
+
static void initializeHash(UErrorCode& errorCode);
static const ListFormatInternal* getListFormatInternal(const Locale& locale, const char *style, UErrorCode& errorCode);
struct ListPatternsSink;
@@ -296,6 +283,8 @@ class U_I18N_API ListFormatter : public UObject{
U_NAMESPACE_END
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // __LISTFORMATTER_H__
diff --git a/contrib/libs/icu/include/unicode/localebuilder.h b/contrib/libs/icu/include/unicode/localebuilder.h
index c5836fe270..f708a7ed7c 100644
--- a/contrib/libs/icu/include/unicode/localebuilder.h
+++ b/contrib/libs/icu/include/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__
@@ -90,18 +90,17 @@ public:
LocaleBuilder& setLocale(const Locale& locale);
/**
- * 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 <code>language
- * tag</code> must be well-formed, or else the build() method will later
- * report an U_ILLEGAL_ARGUMENT_ERROR.
+ * Resets the LocaleBuilder to match the provided IETF BCP 47 language tag.
+ * 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 <code>language tag</code> must be well-formed,
+ * or else the build() method will later report an U_ILLEGAL_ARGUMENT_ERROR.
*
* <p>This method clears the internal UErrorCode.
*
- * @param tag the language tag, defined as
- * [unicode_locale_id](http://www.unicode.org/reports/tr35/tr35.html#unicode_locale_id).
+ * @param tag the language tag, defined as IETF BCP 47 language tag.
* @return This builder.
* @stable ICU 64
*/
@@ -278,18 +277,16 @@ public:
*/
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/contrib/libs/icu/include/unicode/localematcher.h b/contrib/libs/icu/include/unicode/localematcher.h
index 2e1a7a349f..252bb7fdc2 100644
--- a/contrib/libs/icu/include/unicode/localematcher.h
+++ b/contrib/libs/icu/include/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.)
* </ul>
*
- * @draft ICU 65
+ * @stable ICU 65
*/
ULOCMATCH_DEMOTION_REGION
};
@@ -107,21 +105,21 @@ 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)
- * @draft ICU 67
+ * @see LocaleMatcher::Builder#setDirection(ULocMatchDirection)
+ * @stable ICU 67
*/
enum ULocMatchDirection {
/**
* Locale matching includes one-way matches such as Breton→French. (default)
*
- * @draft ICU 67
+ * @stable ICU 67
*/
ULOCMATCH_DIRECTION_WITH_ONE_WAY,
/**
* Locale matching limited to two-way matches including e.g. Danish↔Norwegian
* but ignoring one-way matches.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
ULOCMATCH_DIRECTION_ONLY_TWO_WAY
};
@@ -181,7 +179,7 @@ class XLikelySubtags;
*
* <p>This class is not intended for public subclassing.
*
- * @draft ICU 65
+ * @stable ICU 65
*/
class U_COMMON_API LocaleMatcher : public UMemory {
public:
@@ -189,7 +187,7 @@ public:
* 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 +196,14 @@ public:
* 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 +212,27 @@ public:
* 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 +241,7 @@ public:
* -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 +253,7 @@ public:
* -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 +267,9 @@ public:
* <p>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 +294,7 @@ public:
* 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 +302,7 @@ public:
* 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 +311,14 @@ public:
* 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 +327,10 @@ public:
* 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
* (<a href="https://tools.ietf.org/html/rfc2616#section-14.4">RFC 2616 Section 14.4</a>),
@@ -346,7 +340,7 @@ public:
*
* @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 +351,7 @@ public:
*
* @param locales the list of locale
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &setSupportedLocales(Locale::Iterator &locales);
@@ -372,7 +366,7 @@ public:
* @param begin Start of range.
* @param end Exclusive end of range.
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
template<typename Iter>
Builder &setSupportedLocales(Iter begin, Iter end) {
@@ -397,7 +391,7 @@ public:
* @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<typename Iter, typename Conv>
Builder &setSupportedLocalesViaConverter(Iter begin, Iter end, Conv converter) {
@@ -415,17 +409,29 @@ public:
*
* @param locale another locale
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &addSupportedLocale(const Locale &locale);
/**
+ * 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.
+ *
+ * @stable ICU 68
+ */
+ Builder &setNoDefaultLocale();
+
+ /**
* 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 +443,7 @@ public:
*
* @param subtag the subtag to favor
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &setFavorSubtag(ULocMatchFavorSubtag subtag);
@@ -447,7 +453,7 @@ public:
*
* @param demotion the demotion per desired locale to set.
* @return this Builder object
- * @draft ICU 65
+ * @stable ICU 65
*/
Builder &setDemotionPerDesiredLocale(ULocMatchDemotion demotion);
@@ -457,7 +463,7 @@ public:
*
* @param direction the match direction to set.
* @return this Builder object
- * @draft ICU 67
+ * @stable ICU 67
*/
Builder &setDirection(ULocMatchDirection direction) {
if (U_SUCCESS(errorCode_)) {
@@ -467,14 +473,37 @@ public:
}
/**
+ * 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
+ * @stable ICU 68
+ */
+ Builder &setMaxDistance(const Locale &desired, const Locale &supported);
+
+ /**
* Sets the UErrorCode if an error occurred while setting parameters.
* Preserves older error codes in the outErrorCode.
*
* @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 +514,10 @@ public:
* @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 +533,11 @@ public:
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 +546,13 @@ public:
* 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 +562,10 @@ public:
* 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 +574,7 @@ public:
* 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 +586,7 @@ public:
* 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 +602,7 @@ public:
* 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 +616,7 @@ public:
* 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,10 +630,24 @@ public:
* 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;
-#endif // 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.
+ * @stable ICU 68
+ */
+ UBool isMatch(const Locale &desired, const Locale &supported, UErrorCode &errorCode) const;
#ifndef U_HIDE_INTERNAL_API
/**
@@ -648,7 +692,7 @@ private:
LSR *lsrs;
int32_t supportedLocalesLength;
// These are in preference order: 1. Default locale 2. paradigm locales 3. others.
- UHashtable *supportedLsrToIndex; // Map<LSR, Integer> stores index+1 because 0 is "not found"
+ UHashtable *supportedLsrToIndex; // Map<LSR, Integer>
// Array versions of the supportedLsrToIndex keys and values.
// The distance lookup loops over the supportedLSRs and returns the index of the best match.
const LSR **supportedLSRs;
@@ -660,6 +704,5 @@ private:
U_NAMESPACE_END
-#endif // U_FORCE_HIDE_DRAFT_API
#endif // U_SHOW_CPLUSPLUS_API
#endif // __LOCALEMATCHER_H__
diff --git a/contrib/libs/icu/include/unicode/localpointer.h b/contrib/libs/icu/include/unicode/localpointer.h
index 61c3020918..96c659d10a 100644
--- a/contrib/libs/icu/include/unicode/localpointer.h
+++ b/contrib/libs/icu/include/unicode/localpointer.h
@@ -35,7 +35,7 @@
* - Need to be able to orphan/release the pointer and its ownership.
* - Need variants for normal C++ object pointers, C++ arrays, and ICU C service objects.
*
- * For details see http://site.icu-project.org/design/cpp/scoped_ptr
+ * For details see https://icu.unicode.org/design/cpp/scoped_ptr
*/
#include "unicode/utypes.h"
@@ -88,13 +88,13 @@ public:
~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/contrib/libs/icu/include/unicode/locid.h b/contrib/libs/icu/include/unicode/locid.h
index 1d031daabc..2f2b3998a7 100644
--- a/contrib/libs/icu/include/unicode/locid.h
+++ b/contrib/libs/icu/include/unicode/locid.h
@@ -253,7 +253,7 @@ public:
/**
* 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"),
@@ -326,20 +326,20 @@ public:
* Checks if two locale keys are the same.
*
* @param other The locale key object to be compared with this.
- * @return True if the two locale keys are the same, false otherwise.
+ * @return true if the two locale keys are the same, false otherwise.
* @stable ICU 2.0
*/
- UBool operator==(const Locale& other) const;
+ bool operator==(const Locale& other) const;
/**
* Checks if two locale keys are not the same.
*
* @param other The locale key object to be compared with this.
- * @return True if the two locale keys are not the same, false
+ * @return true if the two locale keys are not the same, false
* otherwise.
* @stable ICU 2.0
*/
- inline UBool operator!=(const Locale& other) const;
+ inline bool operator!=(const Locale& other) const;
/**
* Clone this object.
@@ -393,13 +393,17 @@ public:
* If the specified language tag contains any ill-formed subtags,
* the first such subtag and all following subtags are ignored.
* <p>
- * 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.
@@ -567,15 +571,13 @@ public:
*/
void minimizeSubtags(UErrorCode& status);
-#ifndef U_HIDE_DRAFT_API
/**
* Canonicalize the locale ID of this object according to CLDR.
* @param status the status code
- * @draft ICU 67
+ * @stable ICU 67
* @see createCanonical
*/
void canonicalize(UErrorCode& status);
-#endif // U_HIDE_DRAFT_API
/**
* Gets the list of keywords for the specified locale.
@@ -795,14 +797,14 @@ public:
/**
* 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 +958,7 @@ public:
/**
* 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;
@@ -1003,34 +1005,33 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
-#ifndef U_HIDE_DRAFT_API
/**
* A Locale iterator interface similar to a Java Iterator<Locale>.
- * @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<typename Iter>
class RangeIterator : public Iterator, public UMemory {
@@ -1042,19 +1043,19 @@ public:
*
* @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 +1067,7 @@ public:
/**
* 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<typename Iter, typename Conv>
class ConvertingIterator : public Iterator, public UMemory {
@@ -1079,20 +1080,20 @@ public:
* @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 +1102,6 @@ public:
const Iter end_;
Conv converter_;
};
-#endif // U_HIDE_DRAFT_API
protected: /* only protected for testing purposes. DO NOT USE. */
#ifndef U_HIDE_INTERNAL_API
@@ -1163,7 +1163,7 @@ private:
friend void U_CALLCONV locale_available_init();
};
-inline UBool
+inline bool
Locale::operator!=(const Locale& other) const
{
return !operator==(other);
diff --git a/contrib/libs/icu/include/unicode/measfmt.h b/contrib/libs/icu/include/unicode/measfmt.h
index b4f9048629..893076145f 100644
--- a/contrib/libs/icu/include/unicode/measfmt.h
+++ b/contrib/libs/icu/include/unicode/measfmt.h
@@ -91,7 +91,8 @@ class DateFormat;
/**
* <p><strong>IMPORTANT:</strong> New users are strongly encouraged to see if
* numberformatter.h fits their use case. Although not deprecated, this header
- * is provided for backwards compatibility only.
+ * is provided for backwards compatibility only, and has much more limited
+ * capabilities.
*
* @see Format
* @author Alan Liu
@@ -147,13 +148,13 @@ class U_I18N_API MeasureFormat : public Format {
* Return true if given Format objects are semantically equal.
* @stable ICU 53
*/
- virtual UBool operator==(const Format &other) const;
+ virtual bool operator==(const Format &other) const override;
/**
* Clones this object polymorphically.
* @stable ICU 53
*/
- virtual MeasureFormat *clone() const;
+ virtual MeasureFormat *clone() const override;
/**
* Formats object to produce a string.
@@ -163,7 +164,7 @@ class U_I18N_API MeasureFormat : public Format {
const Formattable &obj,
UnicodeString &appendTo,
FieldPosition &pos,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
#ifndef U_FORCE_HIDE_DRAFT_API
/**
@@ -175,7 +176,7 @@ class U_I18N_API MeasureFormat : public Format {
virtual void parseObject(
const UnicodeString &source,
Formattable &reslt,
- ParsePosition &pos) const;
+ ParsePosition &pos) const override;
#endif // U_FORCE_HIDE_DRAFT_API
/**
@@ -285,7 +286,7 @@ class U_I18N_API MeasureFormat : public Format {
* other classes have different class IDs.
* @stable ICU 53
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
protected:
/**
@@ -309,7 +310,7 @@ class U_I18N_API MeasureFormat : public Format {
/**
* ICU use only.
* Allows subclass to change locale. Note that this method also changes
- * the NumberFormat object. Returns TRUE if locale changed; FALSE if no
+ * the NumberFormat object. Returns true if locale changed; false if no
* change was made.
* @internal.
*/
diff --git a/contrib/libs/icu/include/unicode/measunit.h b/contrib/libs/icu/include/unicode/measunit.h
index e240092e30..61da62e71f 100644
--- a/contrib/libs/icu/include/unicode/measunit.h
+++ b/contrib/libs/icu/include/unicode/measunit.h
@@ -23,208 +23,342 @@
#include "unicode/localpointer.h"
/**
- * \file
+ * \file
* \brief C++ API: A unit for measuring a quantity.
*/
-
+
U_NAMESPACE_BEGIN
class StringEnumeration;
-struct MeasureUnitImpl;
+class MeasureUnitImpl;
+
+namespace number {
+namespace impl {
+class LongNameHandler;
+}
+} // namespace number
-#ifndef U_HIDE_DRAFT_API
/**
* Enumeration for unit complexity. There are three levels:
- *
- * - SINGLE: A single unit, optionally with a power and/or SI prefix. Examples: hectare,
- * square-kilometer, kilojoule, per-second.
+ *
+ * - SINGLE: A single unit, optionally with a power and/or SI or binary prefix.
+ * Examples: hectare, square-kilometer, kilojoule, per-second, mebibyte.
* - COMPOUND: A unit composed of the product of multiple single units. Examples:
* meter-per-second, kilowatt-hour, kilogram-meter-per-square-second.
* - MIXED: A unit composed of the sum of multiple single units. Examples: foot+inch,
* hour+minute+second, degree+arcminute+arcsecond.
*
* The complexity determines which operations are available. For example, you cannot set the power
- * or SI prefix of a compound unit.
+ * or prefix of a compound unit.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
enum UMeasureUnitComplexity {
/**
* A single unit, like kilojoule.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
UMEASURE_UNIT_SINGLE,
/**
* A compound unit, like meter-per-second.
- *
- * @draft ICU 67
+ *
+ * @stable ICU 67
*/
UMEASURE_UNIT_COMPOUND,
/**
* A mixed unit, like hour+minute.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
UMEASURE_UNIT_MIXED
};
+
+#ifndef U_HIDE_DRAFT_API
/**
- * Enumeration for SI prefixes, such as "kilo".
+ * Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-".
+ *
+ * Enum values should be treated as opaque: use umeas_getPrefixPower() and
+ * umeas_getPrefixBase() to find their corresponding values.
*
- * @draft ICU 67
+ * @draft ICU 69
+ * @see umeas_getPrefixBase
+ * @see umeas_getPrefixPower
*/
-typedef enum UMeasureSIPrefix {
+typedef enum UMeasurePrefix {
+ /**
+ * The absence of an SI or binary prefix.
+ *
+ * The integer representation of this enum value is an arbitrary
+ * implementation detail and should not be relied upon: use
+ * umeas_getPrefixPower() to obtain meaningful values.
+ *
+ * @draft ICU 69
+ */
+ UMEASURE_PREFIX_ONE = 30 + 0,
/**
* SI prefix: yotta, 10^24.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_YOTTA = 24,
+ UMEASURE_PREFIX_YOTTA = UMEASURE_PREFIX_ONE + 24,
+
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * ICU use only.
+ * Used to determine the set of base-10 SI prefixes.
+ * @internal
+ */
+ UMEASURE_PREFIX_INTERNAL_MAX_SI = UMEASURE_PREFIX_YOTTA,
+#endif /* U_HIDE_INTERNAL_API */
/**
* SI prefix: zetta, 10^21.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_ZETTA = 21,
+ UMEASURE_PREFIX_ZETTA = UMEASURE_PREFIX_ONE + 21,
/**
* SI prefix: exa, 10^18.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_EXA = 18,
+ UMEASURE_PREFIX_EXA = UMEASURE_PREFIX_ONE + 18,
/**
* SI prefix: peta, 10^15.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_PETA = 15,
+ UMEASURE_PREFIX_PETA = UMEASURE_PREFIX_ONE + 15,
/**
* SI prefix: tera, 10^12.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_TERA = 12,
+ UMEASURE_PREFIX_TERA = UMEASURE_PREFIX_ONE + 12,
/**
* SI prefix: giga, 10^9.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_GIGA = 9,
+ UMEASURE_PREFIX_GIGA = UMEASURE_PREFIX_ONE + 9,
/**
* SI prefix: mega, 10^6.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_MEGA = 6,
+ UMEASURE_PREFIX_MEGA = UMEASURE_PREFIX_ONE + 6,
/**
* SI prefix: kilo, 10^3.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_KILO = 3,
+ UMEASURE_PREFIX_KILO = UMEASURE_PREFIX_ONE + 3,
/**
* SI prefix: hecto, 10^2.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_HECTO = 2,
+ UMEASURE_PREFIX_HECTO = UMEASURE_PREFIX_ONE + 2,
/**
* SI prefix: deka, 10^1.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_DEKA = 1,
-
- /**
- * The absence of an SI prefix.
- *
- * @draft ICU 67
- */
- UMEASURE_SI_PREFIX_ONE = 0,
+ UMEASURE_PREFIX_DEKA = UMEASURE_PREFIX_ONE + 1,
/**
* SI prefix: deci, 10^-1.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_DECI = -1,
+ UMEASURE_PREFIX_DECI = UMEASURE_PREFIX_ONE + -1,
/**
* SI prefix: centi, 10^-2.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_CENTI = -2,
+ UMEASURE_PREFIX_CENTI = UMEASURE_PREFIX_ONE + -2,
/**
* SI prefix: milli, 10^-3.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_MILLI = -3,
+ UMEASURE_PREFIX_MILLI = UMEASURE_PREFIX_ONE + -3,
/**
* SI prefix: micro, 10^-6.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_MICRO = -6,
+ UMEASURE_PREFIX_MICRO = UMEASURE_PREFIX_ONE + -6,
/**
* SI prefix: nano, 10^-9.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_NANO = -9,
+ UMEASURE_PREFIX_NANO = UMEASURE_PREFIX_ONE + -9,
/**
* SI prefix: pico, 10^-12.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_PICO = -12,
+ UMEASURE_PREFIX_PICO = UMEASURE_PREFIX_ONE + -12,
/**
* SI prefix: femto, 10^-15.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_FEMTO = -15,
+ UMEASURE_PREFIX_FEMTO = UMEASURE_PREFIX_ONE + -15,
/**
* SI prefix: atto, 10^-18.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_ATTO = -18,
+ UMEASURE_PREFIX_ATTO = UMEASURE_PREFIX_ONE + -18,
/**
* SI prefix: zepto, 10^-21.
*
- * @draft ICU 67
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_ZEPTO = -21,
+ UMEASURE_PREFIX_ZEPTO = UMEASURE_PREFIX_ONE + -21,
/**
* SI prefix: yocto, 10^-24.
*
- * @draft ICU 67
+ * @draft ICU 69
+ */
+ UMEASURE_PREFIX_YOCTO = UMEASURE_PREFIX_ONE + -24,
+
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * ICU use only.
+ * Used to determine the set of base-10 SI prefixes.
+ * @internal
+ */
+ UMEASURE_PREFIX_INTERNAL_MIN_SI = UMEASURE_PREFIX_YOCTO,
+#endif // U_HIDE_INTERNAL_API
+
+ // Cannot conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
+ // used in definitions of non-internal enum values
+ /**
+ * ICU use only.
+ * Sets the arbitrary offset of the base-1024 binary prefixes' enum values.
+ * @internal
+ */
+ UMEASURE_PREFIX_INTERNAL_ONE_BIN = -60,
+
+ /**
+ * Binary prefix: kibi, 1024^1.
+ *
+ * @draft ICU 69
*/
- UMEASURE_SI_PREFIX_YOCTO = -24
-} UMeasureSIPrefix;
+ UMEASURE_PREFIX_KIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 1,
+
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * ICU use only.
+ * Used to determine the set of base-1024 binary prefixes.
+ * @internal
+ */
+ UMEASURE_PREFIX_INTERNAL_MIN_BIN = UMEASURE_PREFIX_KIBI,
+#endif // U_HIDE_INTERNAL_API
+
+ /**
+ * Binary prefix: mebi, 1024^2.
+ *
+ * @draft ICU 69
+ */
+ UMEASURE_PREFIX_MEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 2,
+
+ /**
+ * Binary prefix: gibi, 1024^3.
+ *
+ * @draft ICU 69
+ */
+ UMEASURE_PREFIX_GIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 3,
+
+ /**
+ * Binary prefix: tebi, 1024^4.
+ *
+ * @draft ICU 69
+ */
+ UMEASURE_PREFIX_TEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 4,
+
+ /**
+ * Binary prefix: pebi, 1024^5.
+ *
+ * @draft ICU 69
+ */
+ UMEASURE_PREFIX_PEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 5,
+
+ /**
+ * Binary prefix: exbi, 1024^6.
+ *
+ * @draft ICU 69
+ */
+ UMEASURE_PREFIX_EXBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 6,
+
+ /**
+ * Binary prefix: zebi, 1024^7.
+ *
+ * @draft ICU 69
+ */
+ UMEASURE_PREFIX_ZEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 7,
+
+ /**
+ * Binary prefix: yobi, 1024^8.
+ *
+ * @draft ICU 69
+ */
+ UMEASURE_PREFIX_YOBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 8,
+
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * ICU use only.
+ * Used to determine the set of base-1024 binary prefixes.
+ * @internal
+ */
+ UMEASURE_PREFIX_INTERNAL_MAX_BIN = UMEASURE_PREFIX_YOBI,
+#endif // U_HIDE_INTERNAL_API
+} UMeasurePrefix;
+
+/**
+ * Returns the base of the factor associated with the given unit prefix: the
+ * base is 10 for SI prefixes (kilo, micro) and 1024 for binary prefixes (kibi,
+ * mebi).
+ *
+ * @draft ICU 69
+ */
+U_CAPI int32_t U_EXPORT2 umeas_getPrefixBase(UMeasurePrefix unitPrefix);
+
+/**
+ * Returns the exponent of the factor associated with the given unit prefix, for
+ * example 3 for kilo, -6 for micro, 1 for kibi, 2 for mebi, 3 for gibi.
+ *
+ * @draft ICU 69
+ */
+U_CAPI int32_t U_EXPORT2 umeas_getPrefixPower(UMeasurePrefix unitPrefix);
+
#endif // U_HIDE_DRAFT_API
/**
@@ -243,34 +377,33 @@ class U_I18N_API MeasureUnit: public UObject {
* @stable ICU 3.0
*/
MeasureUnit();
-
+
/**
* Copy constructor.
* @stable ICU 3.0
*/
MeasureUnit(const MeasureUnit &other);
-#ifndef U_HIDE_DRAFT_API
/**
* Move constructor.
- * @draft ICU 67
+ * @stable ICU 67
*/
MeasureUnit(MeasureUnit &&other) noexcept;
/**
- * Construct a MeasureUnit from a CLDR Unit Identifier, defined in UTS 35.
- * Validates and canonicalizes the identifier.
+ * Construct a MeasureUnit from a CLDR Core Unit Identifier, defined in UTS
+ * 35. (Core unit identifiers and mixed unit identifiers are supported, long
+ * unit identifiers are not.) Validates and canonicalizes the identifier.
*
* <pre>
* MeasureUnit example = MeasureUnit::forIdentifier("furlong-per-nanosecond")
* </pre>
*
- * @param identifier The CLDR Unit Identifier
+ * @param identifier The CLDR Unit Identifier.
* @param status Set if the identifier is invalid.
- * @draft ICU 67
+ * @stable ICU 67
*/
static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode& status);
-#endif // U_HIDE_DRAFT_API
/**
* Copy assignment operator.
@@ -278,13 +411,11 @@ class U_I18N_API MeasureUnit: public UObject {
*/
MeasureUnit &operator=(const MeasureUnit &other);
-#ifndef U_HIDE_DRAFT_API
/**
* Move assignment operator.
- * @draft ICU 67
+ * @stable ICU 67
*/
MeasureUnit &operator=(MeasureUnit &&other) noexcept;
-#endif // U_HIDE_DRAFT_API
/**
* Returns a polymorphic clone of this object. The result will
@@ -304,14 +435,14 @@ class U_I18N_API MeasureUnit: public UObject {
* to the given object.
* @stable ICU 3.0
*/
- virtual UBool operator==(const UObject& other) const;
+ virtual bool operator==(const UObject& other) const;
/**
* Inequality operator. Return true if this object is not equal
* to the given object.
* @stable ICU 53
*/
- UBool operator!=(const UObject& other) const {
+ bool operator!=(const UObject& other) const {
return !(*this == other);
}
@@ -333,12 +464,11 @@ class U_I18N_API MeasureUnit: public UObject {
*/
const char *getSubtype() const;
-#ifndef U_HIDE_DRAFT_API
/**
- * Get the CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35.
+ * Get CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35.
*
* @return The string form of this unit, owned by this MeasureUnit.
- * @draft ICU 67
+ * @stable ICU 67
*/
const char* getIdentifier() const;
@@ -347,38 +477,43 @@ class U_I18N_API MeasureUnit: public UObject {
*
* @param status Set if an error occurs.
* @return The unit complexity.
- * @draft ICU 67
+ * @stable ICU 67
*/
UMeasureUnitComplexity getComplexity(UErrorCode& status) const;
+#ifndef U_HIDE_DRAFT_API
/**
- * Creates a MeasureUnit which is this SINGLE unit augmented with the specified SI prefix.
- * For example, UMEASURE_SI_PREFIX_KILO for "kilo".
+ * Creates a MeasureUnit which is this SINGLE unit augmented with the specified prefix.
+ * For example, UMEASURE_PREFIX_KILO for "kilo", or UMEASURE_PREFIX_KIBI for "kibi".
*
- * There is sufficient locale data to format all standard SI prefixes.
+ * There is sufficient locale data to format all standard prefixes.
*
* NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
* occur. For more information, see UMeasureUnitComplexity.
*
- * @param prefix The SI prefix, from UMeasureSIPrefix.
+ * @param prefix The prefix, from UMeasurePrefix.
* @param status Set if this is not a SINGLE unit or if another error occurs.
* @return A new SINGLE unit.
- * @draft ICU 67
+ * @draft ICU 69
*/
- MeasureUnit withSIPrefix(UMeasureSIPrefix prefix, UErrorCode& status) const;
+ MeasureUnit withPrefix(UMeasurePrefix prefix, UErrorCode& status) const;
/**
- * Gets the current SI prefix of this SINGLE unit. For example, if the unit has the SI prefix
- * "kilo", then UMEASURE_SI_PREFIX_KILO is returned.
+ * Returns the current SI or binary prefix of this SINGLE unit. For example,
+ * if the unit has the prefix "kilo", then UMEASURE_PREFIX_KILO is
+ * returned.
*
* NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
* occur. For more information, see UMeasureUnitComplexity.
*
* @param status Set if this is not a SINGLE unit or if another error occurs.
- * @return The SI prefix of this SINGLE unit, from UMeasureSIPrefix.
- * @draft ICU 67
+ * @return The prefix of this SINGLE unit, from UMeasurePrefix.
+ * @see umeas_getPrefixBase
+ * @see umeas_getPrefixPower
+ * @draft ICU 69
*/
- UMeasureSIPrefix getSIPrefix(UErrorCode& status) const;
+ UMeasurePrefix getPrefix(UErrorCode& status) const;
+#endif // U_HIDE_DRAFT_API
/**
* Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality
@@ -392,7 +527,7 @@ class U_I18N_API MeasureUnit: public UObject {
* @param dimensionality The dimensionality (power).
* @param status Set if this is not a SINGLE unit or if another error occurs.
* @return A new SINGLE unit.
- * @draft ICU 67
+ * @stable ICU 67
*/
MeasureUnit withDimensionality(int32_t dimensionality, UErrorCode& status) const;
@@ -407,7 +542,7 @@ class U_I18N_API MeasureUnit: public UObject {
*
* @param status Set if this is not a SINGLE unit or if another error occurs.
* @return The dimensionality (power) of this simple unit.
- * @draft ICU 67
+ * @stable ICU 67
*/
int32_t getDimensionality(UErrorCode& status) const;
@@ -421,7 +556,7 @@ class U_I18N_API MeasureUnit: public UObject {
*
* @param status Set if this is a MIXED unit or if another error occurs.
* @return The reciprocal of the target unit.
- * @draft ICU 67
+ * @stable ICU 67
*/
MeasureUnit reciprocal(UErrorCode& status) const;
@@ -434,20 +569,18 @@ class U_I18N_API MeasureUnit: public UObject {
* For example, if the receiver is "kilowatt" and the argument is "hour-per-day", then the
* unit "kilowatt-hour-per-day" is returned.
*
- * NOTE: Only works on SINGLE and COMPOUND units. If either unit (receivee and argument) is a
+ * NOTE: Only works on SINGLE and COMPOUND units. If either unit (receiver and argument) is a
* MIXED unit, an error will occur. For more information, see UMeasureUnitComplexity.
*
* @param other The MeasureUnit to multiply with the target.
* @param status Set if this or other is a MIXED unit or if another error occurs.
* @return The product of the target unit with the provided unit.
- * @draft ICU 67
+ * @stable ICU 67
*/
MeasureUnit product(const MeasureUnit& other, UErrorCode& status) const;
-#endif // U_HIDE_DRAFT_API
-#ifndef U_HIDE_INTERNAL_API
/**
- * Gets the list of SINGLE units contained within a MIXED of COMPOUND unit.
+ * Gets the list of SINGLE units contained within a MIXED or COMPOUND unit.
*
* Examples:
* - Given "meter-kilogram-per-second", three units will be returned: "meter",
@@ -457,15 +590,11 @@ class U_I18N_API MeasureUnit: public UObject {
*
* If this is a SINGLE unit, an array of length 1 will be returned.
*
- * TODO(ICU-21021): Finalize this API and propose it as draft.
- *
- * @param outCount The number of elements in the return array.
* @param status Set if an error occurs.
- * @return An array of single units, owned by the caller.
- * @internal ICU 67 Technical Preview
+ * @return A pair with the list of units as a LocalArray and the number of units in the list.
+ * @stable ICU 68
*/
- LocalArray<MeasureUnit> splitToSingleUnits(int32_t& outCount, UErrorCode& status) const;
-#endif // U_HIDE_INTERNAL_API
+ inline std::pair<LocalArray<MeasureUnit>, int32_t> splitToSingleUnits(UErrorCode& status) const;
/**
* getAvailable gets all of the available units.
@@ -535,45 +664,22 @@ class U_I18N_API MeasureUnit: public UObject {
* other classes have different class IDs.
* @stable ICU 53
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
#ifndef U_HIDE_INTERNAL_API
/**
* ICU use only.
- * Returns associated array index for this measure unit. Only valid for
- * non-currency measure units.
- * @internal
- */
- int32_t getIndex() const;
-
- /**
- * ICU use only.
- * Returns maximum value from getIndex plus 1.
+ * Returns associated array index for this measure unit.
* @internal
*/
- static int32_t getIndexCount();
-
- /**
- * ICU use only.
- * @return the unit.getIndex() of the unit which has this unit.getType() and unit.getSubtype(),
- * or a negative value if there is no such unit
- * @internal
- */
- static int32_t internalGetIndexForTypeAndSubtype(const char *type, const char *subtype);
-
- /**
- * ICU use only.
- * @internal
- */
- static MeasureUnit resolveUnitPerUnit(
- const MeasureUnit &unit, const MeasureUnit &perUnit, bool* isResolved);
+ int32_t getOffset() const;
#endif /* U_HIDE_INTERNAL_API */
// All code between the "Start generated createXXX methods" comment and
// the "End generated createXXX methods" comment is auto generated code
// and must not be edited manually. For instructions on how to correctly
// update this code, refer to:
-// http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit
+// docs/processes/release/tasks/updating-measure-unit.md
//
// Start generated createXXX methods
@@ -849,6 +955,24 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getSquareYard();
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of concentr: item.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getItem()}.
+ * @param status ICU error code.
+ * @draft ICU 70
+ */
+ static MeasureUnit *createItem(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of concentr: item.
+ * Also see {@link #createItem()}.
+ * @draft ICU 70
+ */
+ static MeasureUnit getItem();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of concentr: karat.
* Caller owns returned value and must free it.
@@ -865,6 +989,24 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getKarat();
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of concentr: milligram-ofglucose-per-deciliter.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getMilligramOfglucosePerDeciliter()}.
+ * @param status ICU error code.
+ * @draft ICU 69
+ */
+ static MeasureUnit *createMilligramOfglucosePerDeciliter(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of concentr: milligram-ofglucose-per-deciliter.
+ * Also see {@link #createMilligramOfglucosePerDeciliter()}.
+ * @draft ICU 69
+ */
+ static MeasureUnit getMilligramOfglucosePerDeciliter();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of concentr: milligram-per-deciliter.
* Caller owns returned value and must free it.
@@ -914,22 +1056,6 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getMole();
/**
- * Returns by pointer, unit of concentr: permillion.
- * Caller owns returned value and must free it.
- * Also see {@link #getPartPerMillion()}.
- * @param status ICU error code.
- * @stable ICU 57
- */
- static MeasureUnit *createPartPerMillion(UErrorCode &status);
-
- /**
- * Returns by value, unit of concentr: permillion.
- * Also see {@link #createPartPerMillion()}.
- * @stable ICU 64
- */
- static MeasureUnit getPartPerMillion();
-
- /**
* Returns by pointer, unit of concentr: percent.
* Caller owns returned value and must free it.
* Also see {@link #getPercent()}.
@@ -962,6 +1088,22 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getPermille();
/**
+ * Returns by pointer, unit of concentr: permillion.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getPartPerMillion()}.
+ * @param status ICU error code.
+ * @stable ICU 57
+ */
+ static MeasureUnit *createPartPerMillion(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of concentr: permillion.
+ * Also see {@link #createPartPerMillion()}.
+ * @stable ICU 64
+ */
+ static MeasureUnit getPartPerMillion();
+
+ /**
* Returns by pointer, unit of concentr: permyriad.
* Caller owns returned value and must free it.
* Also see {@link #getPermyriad()}.
@@ -1265,23 +1407,21 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getDayPerson();
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of duration: decade.
* Caller owns returned value and must free it.
* Also see {@link #getDecade()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createDecade(UErrorCode &status);
/**
* Returns by value, unit of duration: decade.
* Also see {@link #createDecade()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getDecade();
-#endif /* U_HIDE_DRAFT_API */
/**
* Returns by pointer, unit of duration: hour.
@@ -1667,22 +1807,38 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getKilowattHour();
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of energy: therm-us.
* Caller owns returned value and must free it.
* Also see {@link #getThermUs()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createThermUs(UErrorCode &status);
/**
* Returns by value, unit of energy: therm-us.
* Also see {@link #createThermUs()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getThermUs();
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of force: kilowatt-hour-per-100-kilometer.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getKilowattHourPer100Kilometer()}.
+ * @param status ICU error code.
+ * @draft ICU 70
+ */
+ static MeasureUnit *createKilowattHourPer100Kilometer(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of force: kilowatt-hour-per-100-kilometer.
+ * Also see {@link #createKilowattHourPer100Kilometer()}.
+ * @draft ICU 70
+ */
+ static MeasureUnit getKilowattHourPer100Kilometer();
#endif /* U_HIDE_DRAFT_API */
/**
@@ -1781,131 +1937,133 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getMegahertz();
-#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of graphics: dot.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getDot()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createDot(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of graphics: dot.
+ * Also see {@link #createDot()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getDot();
+
/**
* Returns by pointer, unit of graphics: dot-per-centimeter.
* Caller owns returned value and must free it.
* Also see {@link #getDotPerCentimeter()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createDotPerCentimeter(UErrorCode &status);
/**
* Returns by value, unit of graphics: dot-per-centimeter.
* Also see {@link #createDotPerCentimeter()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getDotPerCentimeter();
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of graphics: dot-per-inch.
* Caller owns returned value and must free it.
* Also see {@link #getDotPerInch()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createDotPerInch(UErrorCode &status);
/**
* Returns by value, unit of graphics: dot-per-inch.
* Also see {@link #createDotPerInch()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getDotPerInch();
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of graphics: em.
* Caller owns returned value and must free it.
* Also see {@link #getEm()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createEm(UErrorCode &status);
/**
* Returns by value, unit of graphics: em.
* Also see {@link #createEm()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getEm();
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of graphics: megapixel.
* Caller owns returned value and must free it.
* Also see {@link #getMegapixel()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createMegapixel(UErrorCode &status);
/**
* Returns by value, unit of graphics: megapixel.
* Also see {@link #createMegapixel()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getMegapixel();
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of graphics: pixel.
* Caller owns returned value and must free it.
* Also see {@link #getPixel()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createPixel(UErrorCode &status);
/**
* Returns by value, unit of graphics: pixel.
* Also see {@link #createPixel()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getPixel();
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of graphics: pixel-per-centimeter.
* Caller owns returned value and must free it.
* Also see {@link #getPixelPerCentimeter()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createPixelPerCentimeter(UErrorCode &status);
/**
* Returns by value, unit of graphics: pixel-per-centimeter.
* Also see {@link #createPixelPerCentimeter()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getPixelPerCentimeter();
-#endif /* U_HIDE_DRAFT_API */
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of graphics: pixel-per-inch.
* Caller owns returned value and must free it.
* Also see {@link #getPixelPerInch()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createPixelPerInch(UErrorCode &status);
/**
* Returns by value, unit of graphics: pixel-per-inch.
* Also see {@link #createPixelPerInch()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getPixelPerInch();
-#endif /* U_HIDE_DRAFT_API */
/**
* Returns by pointer, unit of length: astronomical-unit.
@@ -1956,6 +2114,22 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getDecimeter();
/**
+ * Returns by pointer, unit of length: earth-radius.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getEarthRadius()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createEarthRadius(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of length: earth-radius.
+ * Also see {@link #createEarthRadius()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getEarthRadius();
+
+ /**
* Returns by pointer, unit of length: fathom.
* Caller owns returned value and must free it.
* Also see {@link #getFathom()}.
@@ -2244,6 +2418,38 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getYard();
/**
+ * Returns by pointer, unit of light: candela.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getCandela()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createCandela(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of light: candela.
+ * Also see {@link #createCandela()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getCandela();
+
+ /**
+ * Returns by pointer, unit of light: lumen.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getLumen()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createLumen(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of light: lumen.
+ * Also see {@link #createLumen()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getLumen();
+
+ /**
* Returns by pointer, unit of light: lux.
* Caller owns returned value and must free it.
* Also see {@link #getLux()}.
@@ -2324,6 +2530,22 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getEarthMass();
/**
+ * Returns by pointer, unit of mass: grain.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getGrain()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createGrain(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of mass: grain.
+ * Also see {@link #createGrain()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getGrain();
+
+ /**
* Returns by pointer, unit of mass: gram.
* Caller owns returned value and must free it.
* Also see {@link #getGram()}.
@@ -2611,23 +2833,21 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getAtmosphere();
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of pressure: bar.
* Caller owns returned value and must free it.
* Also see {@link #getBar()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createBar(UErrorCode &status);
/**
* Returns by value, unit of pressure: bar.
* Also see {@link #createBar()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getBar();
-#endif /* U_HIDE_DRAFT_API */
/**
* Returns by pointer, unit of pressure: hectopascal.
@@ -2725,23 +2945,21 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getMillimeterOfMercury();
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of pressure: pascal.
* Caller owns returned value and must free it.
* Also see {@link #getPascal()}.
* @param status ICU error code.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit *createPascal(UErrorCode &status);
/**
* Returns by value, unit of pressure: pascal.
* Also see {@link #createPascal()}.
- * @draft ICU 65
+ * @stable ICU 65
*/
static MeasureUnit getPascal();
-#endif /* U_HIDE_DRAFT_API */
/**
* Returns by pointer, unit of pressure: pound-force-per-square-inch.
@@ -3144,6 +3362,70 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getDeciliter();
/**
+ * Returns by pointer, unit of volume: dessert-spoon.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getDessertSpoon()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createDessertSpoon(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of volume: dessert-spoon.
+ * Also see {@link #createDessertSpoon()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getDessertSpoon();
+
+ /**
+ * Returns by pointer, unit of volume: dessert-spoon-imperial.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getDessertSpoonImperial()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createDessertSpoonImperial(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of volume: dessert-spoon-imperial.
+ * Also see {@link #createDessertSpoonImperial()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getDessertSpoonImperial();
+
+ /**
+ * Returns by pointer, unit of volume: dram.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getDram()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createDram(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of volume: dram.
+ * Also see {@link #createDram()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getDram();
+
+ /**
+ * Returns by pointer, unit of volume: drop.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getDrop()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createDrop(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of volume: drop.
+ * Also see {@link #createDrop()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getDrop();
+
+ /**
* Returns by pointer, unit of volume: fluid-ounce.
* Caller owns returned value and must free it.
* Also see {@link #getFluidOunce()}.
@@ -3224,6 +3506,22 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getHectoliter();
/**
+ * Returns by pointer, unit of volume: jigger.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getJigger()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createJigger(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of volume: jigger.
+ * Also see {@link #createJigger()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getJigger();
+
+ /**
* Returns by pointer, unit of volume: liter.
* Caller owns returned value and must free it.
* Also see {@link #getLiter()}.
@@ -3272,6 +3570,22 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getMilliliter();
/**
+ * Returns by pointer, unit of volume: pinch.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getPinch()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createPinch(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of volume: pinch.
+ * Also see {@link #createPinch()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getPinch();
+
+ /**
* Returns by pointer, unit of volume: pint.
* Caller owns returned value and must free it.
* Also see {@link #getPint()}.
@@ -3320,6 +3634,22 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getQuart();
/**
+ * Returns by pointer, unit of volume: quart-imperial.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getQuartImperial()}.
+ * @param status ICU error code.
+ * @stable ICU 68
+ */
+ static MeasureUnit *createQuartImperial(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of volume: quart-imperial.
+ * Also see {@link #createQuartImperial()}.
+ * @stable ICU 68
+ */
+ static MeasureUnit getQuartImperial();
+
+ /**
* Returns by pointer, unit of volume: tablespoon.
* Caller owns returned value and must free it.
* Also see {@link #getTablespoon()}.
@@ -3351,7 +3681,6 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getTeaspoon();
-
// End generated createXXX methods
protected:
@@ -3369,12 +3698,6 @@ class U_I18N_API MeasureUnit: public UObject {
*/
void initCurrency(StringPiece isoCurrency);
- /**
- * For ICU use only.
- * @internal
- */
- void initNoUnit(const char *subtype);
-
#endif /* U_HIDE_INTERNAL_API */
private:
@@ -3393,7 +3716,6 @@ private:
MeasureUnit(int32_t typeId, int32_t subTypeId);
MeasureUnit(MeasureUnitImpl&& impl);
void setTo(int32_t typeId, int32_t subTypeId);
- int32_t getOffset() const;
static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status);
/**
@@ -3405,9 +3727,23 @@ private:
*/
static bool findBySubType(StringPiece subType, MeasureUnit* output);
- friend struct MeasureUnitImpl;
+ /** Internal version of public API */
+ LocalArray<MeasureUnit> splitToSingleUnitsImpl(int32_t& outCount, UErrorCode& status) const;
+
+ friend class MeasureUnitImpl;
+
+ // For access to findBySubType
+ friend class number::impl::LongNameHandler;
};
+// inline impl of @stable ICU 68 method
+inline std::pair<LocalArray<MeasureUnit>, int32_t>
+MeasureUnit::splitToSingleUnits(UErrorCode& status) const {
+ int32_t length;
+ auto array = splitToSingleUnitsImpl(length, status);
+ return std::make_pair(std::move(array), length);
+}
+
U_NAMESPACE_END
#endif // !UNCONFIG_NO_FORMATTING
diff --git a/contrib/libs/icu/include/unicode/measure.h b/contrib/libs/icu/include/unicode/measure.h
index fa9c29351e..7b118acfcf 100644
--- a/contrib/libs/icu/include/unicode/measure.h
+++ b/contrib/libs/icu/include/unicode/measure.h
@@ -48,7 +48,7 @@ class U_I18N_API Measure: public UObject {
* Construct an object with the given numeric amount and the given
* unit. After this call, the caller must not delete the given
* unit object.
- * @param number a numeric object; amount.isNumeric() must be TRUE
+ * @param number a numeric object; amount.isNumeric() must be true
* @param adoptedUnit the unit object, which must not be NULL
* @param ec input-output error code. If the amount or the unit
* is invalid, then this will be set to a failing value.
@@ -87,7 +87,7 @@ class U_I18N_API Measure: public UObject {
* to the given object.
* @stable ICU 3.0
*/
- UBool operator==(const UObject& other) const;
+ bool operator==(const UObject& other) const;
/**
* Return a reference to the numeric value of this object. The
@@ -127,7 +127,7 @@ class U_I18N_API Measure: public UObject {
* other classes have different class IDs.
* @stable ICU 53
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
protected:
/**
diff --git a/contrib/libs/icu/include/unicode/messagepattern.h b/contrib/libs/icu/include/unicode/messagepattern.h
index 04f00a8757..4c5be13dbc 100644
--- a/contrib/libs/icu/include/unicode/messagepattern.h
+++ b/contrib/libs/icu/include/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,17 +523,17 @@ public:
/**
* @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;
+ bool 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 {
+ inline bool operator!=(const MessagePattern &other) const {
return !operator==(other);
}
@@ -564,7 +564,7 @@ public:
/**
* 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 @@ public:
/**
* 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 @@ public:
* 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 @@ public:
* 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,17 +794,17 @@ public:
/**
* @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;
+ bool 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 {
+ inline bool operator!=(const Part &other) const {
return !operator==(other);
}
@@ -869,7 +869,7 @@ private:
* 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 start<limit
- * @param allowInfinity TRUE if U+221E is allowed (for ChoiceFormat)
+ * @param allowInfinity true if U+221E is allowed (for ChoiceFormat)
* @param parseError
* @param errorCode
*/
@@ -900,13 +900,13 @@ private:
UBool isOrdinal(int32_t index);
/**
- * @return TRUE if we are inside a MessageFormat (sub-)pattern,
+ * @return true if we are inside a MessageFormat (sub-)pattern,
* as opposed to inside a top-level choice/plural/select pattern.
*/
UBool inMessageFormatPattern(int32_t nestingLevel);
/**
- * @return TRUE if we are in a MessageFormat sub-pattern
+ * @return true if we are in a MessageFormat sub-pattern
* of a top-level ChoiceFormat pattern.
*/
UBool inTopLevelChoiceMessage(int32_t nestingLevel, UMessagePatternArgType parentType);
diff --git a/contrib/libs/icu/include/unicode/msgfmt.h b/contrib/libs/icu/include/unicode/msgfmt.h
index 99b0eaeec1..c949132fda 100644
--- a/contrib/libs/icu/include/unicode/msgfmt.h
+++ b/contrib/libs/icu/include/unicode/msgfmt.h
@@ -132,7 +132,7 @@ class NumberFormat;
* <li>messageText can contain quoted literal strings including syntax characters.
* A quoted literal string begins with an ASCII apostrophe and a syntax character
* (usually a {curly brace}) and continues until the next single apostrophe.
- * A double ASCII apostrohpe inside or outside of a quoted string represents
+ * A double ASCII apostrophe inside or outside of a quoted string represents
* one literal apostrophe.
* <li>Quotable syntax characters are the {curly braces} in all messageText parts,
* plus the '#' sign in a messageText immediately inside a pluralStyle,
@@ -255,7 +255,7 @@ class NumberFormat;
* or preformatted values, but not pattern strings or custom format objects.</p>
*
* <p>For more details, see the
- * <a href="http://userguide.icu-project.org/formatparse/messages">ICU User Guide</a>.</p>
+ * <a href="https://unicode-org.github.io/icu/userguide/format_parse/messages">ICU User Guide</a>.</p>
*
* <h4>Usage Information</h4>
*
@@ -420,7 +420,7 @@ public:
* result and should delete it when done.
* @stable ICU 2.0
*/
- virtual MessageFormat* clone() const;
+ virtual MessageFormat* clone() const override;
/**
* Returns true if the given Format objects are semantically equal.
@@ -429,7 +429,7 @@ public:
* @return true if the given Format objects are semantically equal.
* @stable ICU 2.0
*/
- virtual UBool operator==(const Format& other) const;
+ virtual bool operator==(const Format& other) const override;
/**
* Sets the locale to be used for creating argument Format objects.
@@ -589,7 +589,7 @@ public:
* arguments. If numbered, the formatName is the
* corresponding UnicodeStrings (e.g. "0", "1", "2"...).
* The returned Format object should not be deleted by the caller,
- * nor should the ponter of other object . The pointer and its
+ * nor should the pointer of other object . The pointer and its
* contents remain valid only until the next call to any method
* of this class is made with this object.
* @param formatName the name or number specifying a format
@@ -715,7 +715,7 @@ public:
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPosition& pos,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Formats the given array of arguments into a user-defined argument name
@@ -790,7 +790,7 @@ public:
*/
virtual void parseObject(const UnicodeString& source,
Formattable& result,
- ParsePosition& pos) const;
+ ParsePosition& pos) const override;
/**
* Convert an 'apostrophe-friendly' pattern into a standard
@@ -850,7 +850,7 @@ public:
* other classes have different class IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Return the class ID for this class. This is useful only for
@@ -898,7 +898,7 @@ private:
public:
PluralSelectorProvider(const MessageFormat &mf, UPluralType type);
virtual ~PluralSelectorProvider();
- virtual UnicodeString select(void *ctx, double number, UErrorCode& ec) const;
+ virtual UnicodeString select(void *ctx, double number, UErrorCode& ec) const override;
void reset();
private:
@@ -920,7 +920,7 @@ private:
int32_t argTypeCapacity;
/**
- * TRUE if there are different argTypes for the same argument.
+ * true if there are different argTypes for the same argument.
* This only matters when the MessageFormat is used in the plain C (umsg_xxx) API
* where the pattern argTypes determine how the va_arg list is read.
*/
@@ -1088,22 +1088,22 @@ private:
*/
class U_I18N_API DummyFormat : public Format {
public:
- virtual UBool operator==(const Format&) const;
- virtual DummyFormat* clone() const;
+ virtual bool operator==(const Format&) const override;
+ virtual DummyFormat* clone() const override;
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
UErrorCode& status) const;
virtual UnicodeString& format(const Formattable&,
UnicodeString& appendTo,
FieldPosition&,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPositionIterator* posIter,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
virtual void parseObject(const UnicodeString&,
Formattable&,
- ParsePosition&) const;
+ ParsePosition&) const override;
};
friend class MessageFormatAdapter; // getFormatTypeList() access
diff --git a/contrib/libs/icu/include/unicode/normalizer2.h b/contrib/libs/icu/include/unicode/normalizer2.h
index 4aeb3bb3d8..2d355250c2 100644
--- a/contrib/libs/icu/include/unicode/normalizer2.h
+++ b/contrib/libs/icu/include/unicode/normalizer2.h
@@ -225,10 +225,8 @@ public:
* Normalizes a UTF-8 string and optionally records how source substrings
* relate to changed and unchanged result substrings.
*
- * Currently implemented completely only for "compose" modes,
- * such as for NFC, NFKC, and NFKC_Casefold
- * (UNORM2_COMPOSE and UNORM2_COMPOSE_CONTIGUOUS).
- * Otherwise currently converts to & from UTF-16 and does not support edits.
+ * Implemented completely for all built-in modes except for FCD.
+ * The base class implementation converts to & from UTF-16 and does not support edits.
*
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET.
* @param src Source UTF-8 string.
@@ -290,13 +288,13 @@ public:
* Gets the decomposition mapping of c.
* Roughly equivalent to normalizing the String form of c
* on a UNORM2_DECOMPOSE Normalizer2 instance, but much faster, and except that this function
- * returns FALSE and does not write a string
+ * returns false and does not write a string
* if c does not have a decomposition mapping in this instance's data.
* This function is independent of the mode of the Normalizer2.
* @param c code point
* @param decomposition String object which will be set to c's
* decomposition mapping, if there is one.
- * @return TRUE if c has a decomposition, otherwise FALSE
+ * @return true if c has a decomposition, otherwise false
* @stable ICU 4.6
*/
virtual UBool
@@ -319,11 +317,11 @@ public:
* in this case, the result contains either one or two code points (=1..4 char16_ts).
*
* This function is independent of the mode of the Normalizer2.
- * The default implementation returns FALSE.
+ * The default implementation returns false.
* @param c code point
* @param decomposition String object which will be set to c's
* raw decomposition mapping, if there is one.
- * @return TRUE if c has a decomposition, otherwise FALSE
+ * @return true if c has a decomposition, otherwise false
* @stable ICU 49
*/
virtual UBool
@@ -369,7 +367,7 @@ public:
* 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
*/
virtual UBool
@@ -381,18 +379,16 @@ public:
* resolves to "yes" or "no" to provide a definitive result,
* at the cost of doing more work in those cases.
*
- * This works for all normalization modes,
- * but it is currently optimized for UTF-8 only for "compose" modes,
- * such as for NFC, NFKC, and NFKC_Casefold
- * (UNORM2_COMPOSE and UNORM2_COMPOSE_CONTIGUOUS).
- * For other modes it currently converts to UTF-16 and calls isNormalized().
+ * This works for all normalization modes.
+ * It is optimized for UTF-8 for all built-in modes except for FCD.
+ * The base class implementation converts to UTF-16 and calls isNormalized().
*
* @param s UTF-8 input string
* @param errorCode Standard 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 s is normalized
+ * @return true if s is normalized
* @stable ICU 60
*/
virtual UBool
@@ -452,7 +448,7 @@ public:
* character independently.
* This is used for iterative normalization. See the class documentation for details.
* @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
*/
virtual UBool hasBoundaryBefore(UChar32 c) const = 0;
@@ -468,7 +464,7 @@ public:
* This is used for iterative normalization. See the class documentation for details.
* Note that this operation may be significantly slower than hasBoundaryBefore().
* @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
*/
virtual UBool hasBoundaryAfter(UChar32 c) const = 0;
@@ -483,7 +479,7 @@ public:
* This is used for iterative normalization. See the class documentation for details.
* Note that this operation may be significantly slower than hasBoundaryBefore().
* @param c character to test
- * @return TRUE if c is normalization-inert
+ * @return true if c is normalization-inert
* @stable ICU 4.4
*/
virtual UBool isInert(UChar32 c) const = 0;
@@ -543,10 +539,8 @@ public:
* Normalizes a UTF-8 string and optionally records how source substrings
* relate to changed and unchanged result substrings.
*
- * Currently implemented completely only for "compose" modes,
- * such as for NFC, NFKC, and NFKC_Casefold
- * (UNORM2_COMPOSE and UNORM2_COMPOSE_CONTIGUOUS).
- * Otherwise currently converts to & from UTF-16 and does not support edits.
+ * Implemented completely for most built-in modes except for FCD.
+ * The base class implementation converts to & from UTF-16 and does not support edits.
*
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET.
* @param src Source UTF-8 string.
@@ -612,7 +606,7 @@ public:
* @param c code point
* @param decomposition String object which will be set to c's
* decomposition mapping, if there is one.
- * @return TRUE if c has a decomposition, otherwise FALSE
+ * @return true if c has a decomposition, otherwise false
* @stable ICU 4.6
*/
virtual UBool
@@ -626,7 +620,7 @@ public:
* @param c code point
* @param decomposition String object which will be set to c's
* raw decomposition mapping, if there is one.
- * @return TRUE if c has a decomposition, otherwise FALSE
+ * @return true if c has a decomposition, otherwise false
* @stable ICU 49
*/
virtual UBool
@@ -664,7 +658,7 @@ public:
* 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
*/
virtual UBool
@@ -676,18 +670,16 @@ public:
* resolves to "yes" or "no" to provide a definitive result,
* at the cost of doing more work in those cases.
*
- * This works for all normalization modes,
- * but it is currently optimized for UTF-8 only for "compose" modes,
- * such as for NFC, NFKC, and NFKC_Casefold
- * (UNORM2_COMPOSE and UNORM2_COMPOSE_CONTIGUOUS).
- * For other modes it currently converts to UTF-16 and calls isNormalized().
+ * This works for all normalization modes.
+ * It is optimized for UTF-8 for all built-in modes except for FCD.
+ * The base class implementation converts to UTF-16 and calls isNormalized().
*
* @param s UTF-8 input string
* @param errorCode Standard 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 s is normalized
+ * @return true if s is normalized
* @stable ICU 60
*/
virtual UBool
@@ -724,7 +716,7 @@ public:
* regardless of context.
* For details see the Normalizer2 base class documentation.
* @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
*/
virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE;
@@ -734,7 +726,7 @@ public:
* regardless of context.
* For details see the Normalizer2 base class documentation.
* @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
*/
virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE;
@@ -743,7 +735,7 @@ public:
* Tests if the character is normalization-inert.
* For details see the Normalizer2 base class documentation.
* @param c character to test
- * @return TRUE if c is normalization-inert
+ * @return true if c is normalization-inert
* @stable ICU 4.4
*/
virtual UBool isInert(UChar32 c) const U_OVERRIDE;
diff --git a/contrib/libs/icu/include/unicode/normlzr.h b/contrib/libs/icu/include/unicode/normlzr.h
index 07a596bd11..93661990fe 100644
--- a/contrib/libs/icu/include/unicode/normlzr.h
+++ b/contrib/libs/icu/include/unicode/normlzr.h
@@ -234,7 +234,7 @@ public:
*
* @param source the string to be composed.
* @param compat Perform compatibility decomposition before composition.
- * If this argument is <code>FALSE</code>, only canonical
+ * If this argument is <code>false</code>, 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 @@ public:
*
* @param source the string to be decomposed.
* @param compat Perform compatibility decomposition.
- * If this argument is <code>FALSE</code>, only canonical
+ * If this argument is <code>false</code>, 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 @@ public:
* 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,24 +577,24 @@ public:
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
* @return comparison result
* @deprecated ICU 56 Use Normalizer2 instead.
*/
- UBool operator==(const Normalizer& that) const;
+ bool 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
* @return comparison result
* @deprecated ICU 56 Use Normalizer2 instead.
*/
- inline UBool operator!=(const Normalizer& that) const;
+ inline bool operator!=(const Normalizer& that) const;
/**
* Returns a pointer to a new Normalizer that is a clone of this one.
@@ -655,8 +655,8 @@ public:
* 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 <code>TRUE</code> to
- * turn the option(s) on and <code>FALSE</code> to turn it/them off.
+ * @param value the new setting for the option. Use <code>true</code> to
+ * turn the option(s) on and <code>false</code> to turn it/them off.
*
* @see #getOption
* @deprecated ICU 56 Use Normalizer2 instead.
@@ -666,11 +666,11 @@ public:
/**
* 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.
* <p>
* @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.
*/
@@ -732,7 +732,7 @@ public:
* @return a UClassID for the actual class.
* @deprecated ICU 56 Use Normalizer2 instead.
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
#endif // U_FORCE_HIDE_DEPRECATED_API
private:
@@ -777,7 +777,7 @@ private:
//-------------------------------------------------------------------------
#ifndef U_HIDE_DEPRECATED_API
-inline UBool
+inline bool
Normalizer::operator!= (const Normalizer& other) const
{ return ! operator==(other); }
diff --git a/contrib/libs/icu/include/unicode/nounit.h b/contrib/libs/icu/include/unicode/nounit.h
index 61b5c16ee3..96aca35d01 100644
--- a/contrib/libs/icu/include/unicode/nounit.h
+++ b/contrib/libs/icu/include/unicode/nounit.h
@@ -18,8 +18,6 @@
#include "unicode/measunit.h"
-#ifndef U_HIDE_DRAFT_API
-
/**
* \file
* \brief C++ API: units for percent and permille
@@ -29,84 +27,56 @@ U_NAMESPACE_BEGIN
/**
* Dimensionless unit for percent and permille.
+ * Prior to ICU 68, this namespace was a class with the same name.
* @see NumberFormatter
- * @draft ICU 60
+ * @stable ICU 68
*/
-class U_I18N_API NoUnit: public MeasureUnit {
-public:
+namespace NoUnit {
/**
* Returns an instance for the base unit (dimensionless and no scaling).
*
- * @return a NoUnit instance
- * @draft ICU 60
+ * Prior to ICU 68, this function returned a NoUnit by value.
+ *
+ * Since ICU 68, this function returns the same value as the default MeasureUnit constructor.
+ *
+ * @return a MeasureUnit instance
+ * @stable ICU 68
*/
- static NoUnit U_EXPORT2 base();
+ static inline MeasureUnit U_EXPORT2 base() {
+ return MeasureUnit();
+ }
/**
* Returns an instance for percent, or 1/100 of a base unit.
*
- * @return a NoUnit instance
- * @draft ICU 60
+ * Prior to ICU 68, this function returned a NoUnit by value.
+ *
+ * Since ICU 68, this function returns the same value as MeasureUnit::getPercent().
+ *
+ * @return a MeasureUnit instance
+ * @stable ICU 68
*/
- static NoUnit U_EXPORT2 percent();
+ static inline MeasureUnit U_EXPORT2 percent() {
+ return MeasureUnit::getPercent();
+ }
/**
* Returns an instance for permille, or 1/1000 of a base unit.
*
- * @return a NoUnit instance
- * @draft ICU 60
- */
- static NoUnit U_EXPORT2 permille();
-
- /**
- * Copy operator.
- * @draft ICU 60
- */
- NoUnit(const NoUnit& other);
-
- /**
- * Destructor.
- * @draft ICU 60
- */
- virtual ~NoUnit();
-
- /**
- * Return a polymorphic clone of this object. The result will
- * have the same class as returned by getDynamicClassID().
- * @draft ICU 60
- */
- virtual NoUnit* clone() const;
-
- /**
- * Returns a unique class ID for this object POLYMORPHICALLY.
- * This method implements a simple form of RTTI used by ICU.
- * @return The class ID for this object. All objects of a given
- * class have the same class ID. Objects of other classes have
- * different class IDs.
- * @draft ICU 60
- */
- virtual UClassID getDynamicClassID() const;
-
- /**
- * Returns the class ID for this class. This is used to compare to
- * the return value of getDynamicClassID().
- * @return The class ID for all objects of this class.
- * @draft ICU 60
- */
- static UClassID U_EXPORT2 getStaticClassID();
-
-private:
- /**
- * Constructor
- * @internal (private)
+ * Prior to ICU 68, this function returned a NoUnit by value.
+ *
+ * Since ICU 68, this function returns the same value as MeasureUnit::getPermille().
+ *
+ * @return a MeasureUnit instance
+ * @stable ICU 68
*/
- NoUnit(const char* subtype);
-
-};
+ static inline MeasureUnit U_EXPORT2 permille() {
+ return MeasureUnit::getPermille();
+ }
+}
U_NAMESPACE_END
-#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif /* U_SHOW_CPLUSPLUS_API */
diff --git a/contrib/libs/icu/include/unicode/numberformatter.h b/contrib/libs/icu/include/unicode/numberformatter.h
index 615cf49f7b..ece433b55f 100644
--- a/contrib/libs/icu/include/unicode/numberformatter.h
+++ b/contrib/libs/icu/include/unicode/numberformatter.h
@@ -28,10 +28,9 @@
/**
* \file
- * \brief C++ API: Library for localized number formatting introduced in ICU 60.
- *
- * This library was introduced in ICU 60 to simplify the process of formatting localized number strings.
- * Basic usage examples:
+ * \brief C++ API: All-in-one formatter for localized numbers, currencies, and units.
+ *
+ * For a full list of options, see icu::number::NumberFormatterSettings.
*
* <pre>
* // Most basic usage:
@@ -99,6 +98,13 @@ class MultiplierParseHandler;
}
}
+namespace units {
+
+// Forward declarations:
+class UnitsRouter;
+
+} // namespace units
+
namespace number { // icu::number
// Forward declarations:
@@ -157,6 +163,7 @@ struct RangeMacroProps;
struct UFormattedNumberImpl;
class MutablePatternModifier;
class ImmutablePatternModifier;
+struct DecimalFormatWarehouse;
/**
* Used for NumberRangeFormatter and implemented in numrange_fluent.cpp.
@@ -339,15 +346,15 @@ class U_I18N_API Notation : public UMemory {
union NotationUnion {
// For NTN_SCIENTIFIC
- /** @internal */
+ /** @internal (private) */
struct ScientificSettings {
- /** @internal */
+ /** @internal (private) */
int8_t fEngineeringInterval;
- /** @internal */
+ /** @internal (private) */
bool fRequireMinInt;
- /** @internal */
+ /** @internal (private) */
impl::digits_t fMinExponentDigits;
- /** @internal */
+ /** @internal (private) */
UNumberSignDisplay fExponentSignDisplay;
} scientific;
@@ -371,9 +378,9 @@ class U_I18N_API Notation : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fType == NTN_ERROR) {
status = fUnion.errorCode;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// To allow MacroProps to initialize empty instances:
@@ -652,6 +659,17 @@ class U_I18N_API Precision : public UMemory {
*/
static CurrencyPrecision currency(UCurrencyUsage currencyUsage);
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Configure how trailing zeros are displayed on numbers. For example, to hide trailing zeros
+ * when the number is an integer, use UNUM_TRAILING_ZERO_HIDE_IF_WHOLE.
+ *
+ * @param trailingZeroDisplay Option to configure the display of trailing zeros.
+ * @draft ICU 69
+ */
+ Precision trailingZeroDisplay(UNumberTrailingZeroDisplay trailingZeroDisplay) const;
+#endif // U_HIDE_DRAFT_API
+
private:
enum PrecisionType {
RND_BOGUS,
@@ -676,41 +694,41 @@ class U_I18N_API Precision : public UMemory {
} fType;
union PrecisionUnion {
- /** @internal */
+ /** @internal (private) */
struct FractionSignificantSettings {
// For RND_FRACTION, RND_SIGNIFICANT, and RND_FRACTION_SIGNIFICANT
- /** @internal */
+ /** @internal (private) */
impl::digits_t fMinFrac;
- /** @internal */
+ /** @internal (private) */
impl::digits_t fMaxFrac;
- /** @internal */
+ /** @internal (private) */
impl::digits_t fMinSig;
- /** @internal */
+ /** @internal (private) */
impl::digits_t fMaxSig;
+ /** @internal (private) */
+ UNumberRoundingPriority fPriority;
} fracSig;
- /** @internal */
+ /** @internal (private) */
struct IncrementSettings {
// For RND_INCREMENT, RND_INCREMENT_ONE, and RND_INCREMENT_FIVE
- /** @internal */
+ /** @internal (private) */
double fIncrement;
- /** @internal */
+ /** @internal (private) */
impl::digits_t fMinFrac;
- /** @internal */
+ /** @internal (private) */
impl::digits_t fMaxFrac;
} increment;
UCurrencyUsage currencyUsage; // For RND_CURRENCY
UErrorCode errorCode; // For RND_ERROR
} fUnion;
+ UNumberTrailingZeroDisplay fTrailingZeroDisplay = UNUM_TRAILING_ZERO_AUTO;
+
typedef PrecisionUnion::FractionSignificantSettings FractionSignificantSettings;
typedef PrecisionUnion::IncrementSettings IncrementSettings;
- /** The Precision encapsulates the RoundingMode when used within the implementation. */
- UNumberFormatRoundingMode fRoundingMode;
-
- Precision(const PrecisionType& type, const PrecisionUnion& union_,
- UNumberFormatRoundingMode roundingMode)
- : fType(type), fUnion(union_), fRoundingMode(roundingMode) {}
+ Precision(const PrecisionType& type, const PrecisionUnion& union_)
+ : fType(type), fUnion(union_) {}
Precision(UErrorCode errorCode) : fType(RND_ERROR) {
fUnion.errorCode = errorCode;
@@ -725,9 +743,9 @@ class U_I18N_API Precision : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fType == RND_ERROR) {
status = fUnion.errorCode;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// On the parent type so that this method can be called internally on Precision instances.
@@ -737,15 +755,16 @@ class U_I18N_API Precision : public UMemory {
static Precision constructSignificant(int32_t minSig, int32_t maxSig);
- static Precision
- constructFractionSignificant(const FractionPrecision &base, int32_t minSig, int32_t maxSig);
+ static Precision constructFractionSignificant(
+ const FractionPrecision &base,
+ int32_t minSig,
+ int32_t maxSig,
+ UNumberRoundingPriority priority);
static IncrementPrecision constructIncrement(double increment, int32_t minFrac);
static CurrencyPrecision constructCurrency(UCurrencyUsage usage);
- static Precision constructPassThrough();
-
// To allow MacroProps/MicroProps to initialize bogus instances:
friend struct impl::MacroProps;
friend struct impl::MicroProps;
@@ -766,6 +785,9 @@ class U_I18N_API Precision : public UMemory {
// To allow access to the skeleton generation code:
friend class impl::GeneratorHelpers;
+
+ // To allow access to isBogus and the default (bogus) constructor:
+ friend class units::UnitsRouter;
};
/**
@@ -779,16 +801,38 @@ class U_I18N_API Precision : public UMemory {
*/
class U_I18N_API FractionPrecision : public Precision {
public:
+#ifndef U_HIDE_DRAFT_API
/**
- * Ensure that no less than this number of significant digits are retained when rounding according to fraction
- * rules.
+ * Override maximum fraction digits with maximum significant digits depending on the magnitude
+ * of the number. See UNumberRoundingPriority.
*
- * <p>
- * For example, with integer rounding, the number 3.141 becomes "3". However, with minimum figures set to 2, 3.141
- * becomes "3.1" instead.
+ * @param minSignificantDigits
+ * Pad trailing zeros to achieve this minimum number of significant digits.
+ * @param maxSignificantDigits
+ * Round the number to achieve this maximum number of significant digits.
+ * @param priority
+ * How to disambiguate between fraction digits and significant digits.
+ * @return A precision for chaining or passing to the NumberFormatter precision() setter.
*
- * <p>
- * This setting does not affect the number of trailing zeros. For example, 3.01 would print as "3", not "3.0".
+ * @draft ICU 69
+ */
+ Precision withSignificantDigits(
+ int32_t minSignificantDigits,
+ int32_t maxSignificantDigits,
+ UNumberRoundingPriority priority) const;
+#endif // U_HIDE_DRAFT_API
+
+ /**
+ * Ensure that no less than this number of significant digits are retained when rounding
+ * according to fraction rules.
+ *
+ * For example, with integer rounding, the number 3.141 becomes "3". However, with minimum
+ * figures set to 2, 3.141 becomes "3.1" instead.
+ *
+ * This setting does not affect the number of trailing zeros. For example, 3.01 would print as
+ * "3", not "3.0".
+ *
+ * This is equivalent to `withSignificantDigits(1, minSignificantDigits, RELAXED)`.
*
* @param minSignificantDigits
* The number of significant figures to guarantee.
@@ -798,16 +842,16 @@ class U_I18N_API FractionPrecision : public Precision {
Precision withMinDigits(int32_t minSignificantDigits) const;
/**
- * Ensure that no more than this number of significant digits are retained when rounding according to fraction
- * rules.
+ * Ensure that no more than this number of significant digits are retained when rounding
+ * according to fraction rules.
*
- * <p>
- * For example, with integer rounding, the number 123.4 becomes "123". However, with maximum figures set to 2, 123.4
- * becomes "120" instead.
+ * For example, with integer rounding, the number 123.4 becomes "123". However, with maximum
+ * figures set to 2, 123.4 becomes "120" instead.
*
- * <p>
- * This setting does not affect the number of trailing zeros. For example, with fixed fraction of 2, 123.4 would
- * become "120.00".
+ * This setting does not affect the number of trailing zeros. For example, with fixed fraction
+ * of 2, 123.4 would become "120.00".
+ *
+ * This is equivalent to `withSignificantDigits(1, maxSignificantDigits, STRICT)`.
*
* @param maxSignificantDigits
* Round the number to no more than this number of significant figures.
@@ -969,9 +1013,9 @@ class U_I18N_API IntegerWidth : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fHasError) {
status = fUnion.errorCode;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void apply(impl::DecimalQuantity &quantity, UErrorCode &status) const;
@@ -1095,11 +1139,11 @@ class U_I18N_API Scale : public UMemory {
}
UBool copyErrorTo(UErrorCode &status) const {
- if (fError != U_ZERO_ERROR) {
+ if (U_FAILURE(fError)) {
status = fError;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void applyTo(impl::DecimalQuantity& quantity) const;
@@ -1126,6 +1170,76 @@ class U_I18N_API Scale : public UMemory {
namespace impl {
+// Do not enclose entire StringProp with #ifndef U_HIDE_INTERNAL_API, needed for a protected field
+/**
+ * Manages NumberFormatterSettings::usage()'s char* instance on the heap.
+ * @internal
+ */
+class U_I18N_API StringProp : public UMemory {
+
+#ifndef U_HIDE_INTERNAL_API
+
+ public:
+ /** @internal */
+ StringProp(const StringProp &other);
+
+ /** @internal */
+ StringProp &operator=(const StringProp &other);
+
+ /** @internal */
+ StringProp(StringProp &&src) U_NOEXCEPT;
+
+ /** @internal */
+ StringProp &operator=(StringProp &&src) U_NOEXCEPT;
+
+ /** @internal */
+ ~StringProp();
+
+ /** @internal */
+ int16_t length() const {
+ return fLength;
+ }
+
+ /** @internal
+ * Makes a copy of value. Set to "" to unset.
+ */
+ void set(StringPiece value);
+
+ /** @internal */
+ bool isSet() const {
+ return fLength > 0;
+ }
+
+#endif // U_HIDE_INTERNAL_API
+
+ private:
+ char *fValue;
+ int16_t fLength;
+ UErrorCode fError;
+
+ StringProp() : fValue(nullptr), fLength(0), fError(U_ZERO_ERROR) {
+ }
+
+ /** @internal (private) */
+ UBool copyErrorTo(UErrorCode &status) const {
+ if (U_FAILURE(fError)) {
+ status = fError;
+ return true;
+ }
+ return false;
+ }
+
+ // Allow NumberFormatterImpl to access fValue.
+ friend class impl::NumberFormatterImpl;
+
+ // Allow skeleton generation code to access private members.
+ friend class impl::GeneratorHelpers;
+
+ // Allow MacroProps/MicroProps to initialize empty instances and to call
+ // copyErrorTo().
+ friend struct impl::MacroProps;
+};
+
// Do not enclose entire SymbolsWrapper with #ifndef U_HIDE_INTERNAL_API, needed for a protected field
/** @internal */
class U_I18N_API SymbolsWrapper : public UMemory {
@@ -1192,12 +1306,12 @@ class U_I18N_API SymbolsWrapper : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fType == SYMPTR_DFS && fPtr.dfs == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return TRUE;
+ return true;
} else if (fType == SYMPTR_NS && fPtr.ns == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
private:
@@ -1239,13 +1353,13 @@ class U_I18N_API Grouper : public UMemory {
fGrouping2(grouping2),
fMinGrouping(minGrouping),
fStrategy(strategy) {}
-#endif // U_HIDE_INTERNAL_API
/** @internal */
int16_t getPrimary() const;
/** @internal */
int16_t getSecondary() const;
+#endif // U_HIDE_INTERNAL_API
private:
/**
@@ -1309,10 +1423,10 @@ class U_I18N_API Padder : public UMemory {
/** @internal */
static Padder codePoints(UChar32 cp, int32_t targetWidth, UNumberFormatPadPosition position);
-#endif // U_HIDE_INTERNAL_API
/** @internal */
static Padder forProperties(const DecimalFormatProperties& properties);
+#endif // U_HIDE_INTERNAL_API
private:
UChar32 fWidth; // -3 = error; -2 = bogus; -1 = no padding
@@ -1341,9 +1455,9 @@ class U_I18N_API Padder : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fWidth == -3) {
status = fUnion.errorCode;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool isValid() const {
@@ -1372,10 +1486,10 @@ struct U_I18N_API MacroProps : public UMemory {
Notation notation;
/** @internal */
- MeasureUnit unit; // = NoUnit::base();
+ MeasureUnit unit; // = MeasureUnit(); (the base dimensionless unit)
/** @internal */
- MeasureUnit perUnit; // = NoUnit::base();
+ MeasureUnit perUnit; // = MeasureUnit(); (the base dimensionless unit)
/** @internal */
Precision precision; // = Precision(); (bogus)
@@ -1404,12 +1518,21 @@ struct U_I18N_API MacroProps : public UMemory {
UNumberSignDisplay sign = UNUM_SIGN_COUNT;
/** @internal */
+ bool approximately = false;
+
+ /** @internal */
UNumberDecimalSeparatorDisplay decimal = UNUM_DECIMAL_SEPARATOR_COUNT;
/** @internal */
Scale scale; // = Scale(); (benign value)
/** @internal */
+ StringProp usage; // = StringProp(); (no usage)
+
+ /** @internal */
+ StringProp unitDisplayCase; // = StringProp(); (nominative)
+
+ /** @internal */
const AffixPatternProvider* affixProvider = nullptr; // no ownership
/** @internal */
@@ -1430,7 +1553,8 @@ struct U_I18N_API MacroProps : public UMemory {
bool copyErrorTo(UErrorCode &status) const {
return notation.copyErrorTo(status) || precision.copyErrorTo(status) ||
padder.copyErrorTo(status) || integerWidth.copyErrorTo(status) ||
- symbols.copyErrorTo(status) || scale.copyErrorTo(status);
+ symbols.copyErrorTo(status) || scale.copyErrorTo(status) || usage.copyErrorTo(status) ||
+ unitDisplayCase.copyErrorTo(status);
}
};
@@ -1507,10 +1631,15 @@ class U_I18N_API NumberFormatterSettings {
* All units will be properly localized with locale data, and all units are compatible with notation styles,
* rounding precisions, and other number formatter settings.
*
+ * \note If the usage() is set, the output unit **will be changed** to
+ * produce localised units, according to usage, locale and unit. See
+ * FormattedNumber::getOutputUnit().
+ *
* Pass this method any instance of {@link MeasureUnit}. For units of measure:
*
* <pre>
* NumberFormatter::with().unit(MeasureUnit::getMeter())
+ * NumberFormatter::with().unit(MeasureUnit::forIdentifier("foot-per-second", status))
* </pre>
*
* Currency:
@@ -1693,7 +1822,7 @@ class U_I18N_API NumberFormatterSettings {
*
* The default is HALF_EVEN. For more information on rounding mode, see the ICU userguide here:
*
- * http://userguide.icu-project.org/formatparse/numbers/rounding-modes
+ * https://unicode-org.github.io/icu/userguide/format_parse/numbers/rounding-modes
*
* @param roundingMode The rounding mode to use.
* @return The fluent chain.
@@ -2038,6 +2167,78 @@ class U_I18N_API NumberFormatterSettings {
*/
Derived scale(const Scale &scale) &&;
+ /**
+ * Specifies the usage for which numbers will be formatted ("person-height",
+ * "road", "rainfall", etc.)
+ *
+ * When a `usage` is specified, the output unit will change depending on the
+ * `Locale` and the unit quantity. For example, formatting length
+ * measurements specified in meters:
+ *
+ * `NumberFormatter::with().usage("person").unit(MeasureUnit::getMeter()).locale("en-US")`
+ * * When formatting 0.25, the output will be "10 inches".
+ * * When formatting 1.50, the output will be "4 feet and 11 inches".
+ *
+ * The input unit specified via unit() determines the type of measurement
+ * being formatted (e.g. "length" when the unit is "foot"). The usage
+ * requested will be looked for only within this category of measurement
+ * units.
+ *
+ * The output unit can be found via FormattedNumber::getOutputUnit().
+ *
+ * If the usage has multiple parts (e.g. "land-agriculture-grain") and does
+ * not match a known usage preference, the last part will be dropped
+ * repeatedly until a match is found (e.g. trying "land-agriculture", then
+ * "land"). If a match is still not found, usage will fall back to
+ * "default".
+ *
+ * Setting usage to an empty string clears the usage (disables usage-based
+ * localized formatting).
+ *
+ * Setting a usage string but not a correct input unit will result in an
+ * U_ILLEGAL_ARGUMENT_ERROR.
+ *
+ * When using usage, specifying rounding or precision is unnecessary.
+ * Specifying a precision in some manner will override the default
+ * formatting.
+ *
+ * @param usage A `usage` parameter from the units resource. See the
+ * unitPreferenceData in *source/data/misc/units.txt*, generated from
+ * `unitPreferenceData` in [CLDR's
+ * supplemental/units.xml](https://github.com/unicode-org/cldr/blob/main/common/supplemental/units.xml).
+ * @return The fluent chain.
+ * @stable ICU 68
+ */
+ Derived usage(StringPiece usage) const &;
+
+ /**
+ * Overload of usage() for use on an rvalue reference.
+ *
+ * @param usage The unit `usage`.
+ * @return The fluent chain.
+ * @stable ICU 68
+ */
+ Derived usage(StringPiece usage) &&;
+
+#ifndef U_HIDE_DRAFT_API
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * Specifies the desired case for a unit formatter's output (e.g.
+ * accusative, dative, genitive).
+ *
+ * @internal ICU 69 technology preview
+ */
+ Derived unitDisplayCase(StringPiece unitDisplayCase) const &;
+
+ /**
+ * Overload of unitDisplayCase() for use on an rvalue reference.
+ *
+ * @internal ICU 69 technology preview
+ */
+ Derived unitDisplayCase(StringPiece unitDisplayCase) &&;
+#endif // U_HIDE_INTERNAL_API
+#endif // U_HIDE_DRAFT_API
+
#ifndef U_HIDE_INTERNAL_API
/**
@@ -2090,6 +2291,9 @@ class U_I18N_API NumberFormatterSettings {
* The returned skeleton is in normalized form, such that two number formatters with equivalent
* behavior should produce the same skeleton.
*
+ * For more information on number skeleton strings, see:
+ * https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
+ *
* @return A number skeleton string with behavior corresponding to this number formatter.
* @stable ICU 62
*/
@@ -2120,13 +2324,13 @@ class U_I18N_API NumberFormatterSettings {
/**
* Sets the UErrorCode if an error occurred in the fluent chain.
* Preserves older error codes in the outErrorCode.
- * @return TRUE if U_FAILURE(outErrorCode)
+ * @return true if U_FAILURE(outErrorCode)
* @stable ICU 60
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const {
if (U_FAILURE(outErrorCode)) {
// Do not overwrite the older error code
- return TRUE;
+ return true;
}
fMacros.copyErrorTo(outErrorCode);
return U_FAILURE(outErrorCode);
@@ -2283,6 +2487,12 @@ class U_I18N_API LocalizedNumberFormatter
#ifndef U_HIDE_INTERNAL_API
+
+ /**
+ * @internal
+ */
+ const DecimalFormatSymbols* getDecimalFormatSymbols() const;
+
/** Internal method.
* @internal
*/
@@ -2385,6 +2595,10 @@ class U_I18N_API LocalizedNumberFormatter
const impl::NumberFormatterImpl* fCompiled {nullptr};
char fUnsafeCallCount[8] {}; // internally cast to u_atomic_int32_t
+ // Owned pointer to a DecimalFormatWarehouse, used when copying a LocalizedNumberFormatter
+ // from a DecimalFormat.
+ const impl::DecimalFormatWarehouse* fWarehouse {nullptr};
+
explicit LocalizedNumberFormatter(const NumberFormatterSettings<LocalizedNumberFormatter>& other);
explicit LocalizedNumberFormatter(NumberFormatterSettings<LocalizedNumberFormatter>&& src) U_NOEXCEPT;
@@ -2393,10 +2607,12 @@ class U_I18N_API LocalizedNumberFormatter
LocalizedNumberFormatter(impl::MacroProps &&macros, const Locale &locale);
- void clear();
+ void resetCompiled();
void lnfMoveHelper(LocalizedNumberFormatter&& src);
+ void lnfCopyHelper(const LocalizedNumberFormatter& src, UErrorCode& status);
+
/**
* @return true if the compiled formatter is available.
*/
@@ -2485,7 +2701,6 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
/** @copydoc FormattedValue::nextPosition() */
UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
-#ifndef U_HIDE_DRAFT_API
/**
* Export the formatted number as a "numeric string" conforming to the
* syntax defined in the Decimal Arithmetic Specification, available at
@@ -2502,13 +2717,32 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
* for example, std::string.
* @param status Set if an error occurs.
* @return A StringClass containing the numeric string.
- * @draft ICU 65
+ * @stable ICU 65
*/
template<typename StringClass>
inline StringClass toDecimalNumber(UErrorCode& status) const;
-#endif // U_HIDE_DRAFT_API
+
+ /**
+ * Gets the resolved output unit.
+ *
+ * The output unit is dependent upon the localized preferences for the usage
+ * specified via NumberFormatterSettings::usage(), and may be a unit with
+ * UMEASURE_UNIT_MIXED unit complexity (MeasureUnit::getComplexity()), such
+ * as "foot-and-inch" or "hour-and-minute-and-second".
+ *
+ * @return `MeasureUnit`.
+ * @stable ICU 68
+ */
+ MeasureUnit getOutputUnit(UErrorCode& status) const;
#ifndef U_HIDE_INTERNAL_API
+ /**
+ * Gets the gender of the formatted output. Returns "" when the gender is
+ * unknown, or for ungendered languages.
+ *
+ * @internal ICU 69 technology preview.
+ */
+ const char *getGender(UErrorCode& status) const;
/**
* Gets the raw DecimalQuantity for plural rule selection.
@@ -2533,7 +2767,7 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
/**
* Internal constructor from data type. Adopts the data pointer.
- * @internal
+ * @internal (private)
*/
explicit FormattedNumber(impl::UFormattedNumberData *results)
: fData(results), fErrorCode(U_ZERO_ERROR) {}
@@ -2541,7 +2775,6 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
explicit FormattedNumber(UErrorCode errorCode)
: fData(nullptr), fErrorCode(errorCode) {}
- // TODO(ICU-20775): Propose this as API.
void toDecimalNumber(ByteSink& sink, UErrorCode& status) const;
// To give LocalizedNumberFormatter format methods access to this class's constructor:
@@ -2551,8 +2784,6 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
friend struct impl::UFormattedNumberImpl;
};
-#ifndef U_HIDE_DRAFT_API
-// Note: This is draft ICU 65
template<typename StringClass>
StringClass FormattedNumber::toDecimalNumber(UErrorCode& status) const {
StringClass result;
@@ -2560,7 +2791,6 @@ StringClass FormattedNumber::toDecimalNumber(UErrorCode& status) const {
toDecimalNumber(sink, status);
return result;
}
-#endif // U_HIDE_DRAFT_API
/**
* See the main description in numberformatter.h for documentation and examples.
@@ -2596,6 +2826,9 @@ class U_I18N_API NumberFormatter final {
* It is possible for an error to occur while parsing. See the overload of this method if you are
* interested in the location of a possible parse error.
*
+ * For more information on number skeleton strings, see:
+ * https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
+ *
* @param skeleton
* The skeleton string off of which to base this NumberFormatter.
* @param status
@@ -2612,6 +2845,9 @@ class U_I18N_API NumberFormatter final {
* If an error occurs while parsing the skeleton string, the offset into the skeleton string at
* which the error occurred will be saved into the UParseError, if provided.
*
+ * For more information on number skeleton strings, see:
+ * https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
+ *
* @param skeleton
* The skeleton string off of which to base this NumberFormatter.
* @param perror
@@ -2639,4 +2875,3 @@ U_NAMESPACE_END
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // __NUMBERFORMATTER_H__
-
diff --git a/contrib/libs/icu/include/unicode/numberrangeformatter.h b/contrib/libs/icu/include/unicode/numberrangeformatter.h
index 4d436a7694..363f7d48cf 100644
--- a/contrib/libs/icu/include/unicode/numberrangeformatter.h
+++ b/contrib/libs/icu/include/unicode/numberrangeformatter.h
@@ -16,6 +16,7 @@
#include "unicode/formattedvalue.h"
#include "unicode/fpositer.h"
#include "unicode/numberformatter.h"
+#include "unicode/unumberrangeformatter.h"
/**
* \file
@@ -31,7 +32,7 @@
* .numberFormatterFirst(NumberFormatter::with().adoptUnit(MeasureUnit::createMeter()))
* .numberFormatterSecond(NumberFormatter::with().adoptUnit(MeasureUnit::createKilometer()))
* .locale("en-GB")
- * .formatRange(750, 1.2, status)
+ * .formatFormattableRange(750, 1.2, status)
* .toString(status);
* // => "750 m - 1.2 km"
* </pre>
@@ -44,130 +45,11 @@
*/
-/**
- * Defines how to merge fields that are identical across the range sign.
- *
- * @stable ICU 63
- */
-typedef enum UNumberRangeCollapse {
- /**
- * Use locale data and heuristics to determine how much of the string to collapse. Could end up collapsing none,
- * some, or all repeated pieces in a locale-sensitive way.
- *
- * The heuristics used for this option are subject to change over time.
- *
- * @stable ICU 63
- */
- UNUM_RANGE_COLLAPSE_AUTO,
-
- /**
- * Do not collapse any part of the number. Example: "3.2 thousand kilograms – 5.3 thousand kilograms"
- *
- * @stable ICU 63
- */
- UNUM_RANGE_COLLAPSE_NONE,
-
- /**
- * Collapse the unit part of the number, but not the notation, if present. Example: "3.2 thousand – 5.3 thousand
- * kilograms"
- *
- * @stable ICU 63
- */
- UNUM_RANGE_COLLAPSE_UNIT,
-
- /**
- * Collapse any field that is equal across the range sign. May introduce ambiguity on the magnitude of the
- * number. Example: "3.2 – 5.3 thousand kilograms"
- *
- * @stable ICU 63
- */
- UNUM_RANGE_COLLAPSE_ALL
-} UNumberRangeCollapse;
-
-/**
- * Defines the behavior when the two numbers in the range are identical after rounding. To programmatically detect
- * when the identity fallback is used, compare the lower and upper BigDecimals via FormattedNumber.
- *
- * @stable ICU 63
- * @see NumberRangeFormatter
- */
-typedef enum UNumberRangeIdentityFallback {
- /**
- * Show the number as a single value rather than a range. Example: "$5"
- *
- * @stable ICU 63
- */
- UNUM_IDENTITY_FALLBACK_SINGLE_VALUE,
-
- /**
- * Show the number using a locale-sensitive approximation pattern. If the numbers were the same before rounding,
- * show the single value. Example: "~$5" or "$5"
- *
- * @stable ICU 63
- */
- UNUM_IDENTITY_FALLBACK_APPROXIMATELY_OR_SINGLE_VALUE,
-
- /**
- * Show the number using a locale-sensitive approximation pattern. Use the range pattern always, even if the
- * inputs are the same. Example: "~$5"
- *
- * @stable ICU 63
- */
- UNUM_IDENTITY_FALLBACK_APPROXIMATELY,
-
- /**
- * Show the number as the range of two equal values. Use the range pattern always, even if the inputs are the
- * same. Example (with RangeCollapse.NONE): "$5 – $5"
- *
- * @stable ICU 63
- */
- UNUM_IDENTITY_FALLBACK_RANGE
-} UNumberRangeIdentityFallback;
-
-/**
- * Used in the result class FormattedNumberRange to indicate to the user whether the numbers formatted in the range
- * were equal or not, and whether or not the identity fallback was applied.
- *
- * @stable ICU 63
- * @see NumberRangeFormatter
- */
-typedef enum UNumberRangeIdentityResult {
- /**
- * Used to indicate that the two numbers in the range were equal, even before any rounding rules were applied.
- *
- * @stable ICU 63
- * @see NumberRangeFormatter
- */
- UNUM_IDENTITY_RESULT_EQUAL_BEFORE_ROUNDING,
-
- /**
- * Used to indicate that the two numbers in the range were equal, but only after rounding rules were applied.
- *
- * @stable ICU 63
- * @see NumberRangeFormatter
- */
- UNUM_IDENTITY_RESULT_EQUAL_AFTER_ROUNDING,
-
- /**
- * Used to indicate that the two numbers in the range were not equal, even after rounding rules were applied.
- *
- * @stable ICU 63
- * @see NumberRangeFormatter
- */
- UNUM_IDENTITY_RESULT_NOT_EQUAL,
-
-#ifndef U_HIDE_INTERNAL_API
- /**
- * The number of entries in this enum.
- * @internal
- */
- UNUM_IDENTITY_RESULT_COUNT
-#endif
-
-} UNumberRangeIdentityResult;
-
U_NAMESPACE_BEGIN
+// Forward declarations:
+class PluralRules;
+
namespace number { // icu::number
// Forward declarations:
@@ -182,6 +64,7 @@ struct RangeMacroProps;
class DecimalQuantity;
class UFormattedNumberRangeData;
class NumberRangeFormatterImpl;
+struct UFormattedNumberRangeImpl;
} // namespace impl
@@ -190,7 +73,7 @@ class NumberRangeFormatterImpl;
* Export an explicit template instantiation. See datefmt.h
* (When building DLLs for Windows this is required.)
*/
-#if U_PLATFORM == U_PF_WINDOWS && !defined(U_IN_DOXYGEN)
+#if U_PLATFORM == U_PF_WINDOWS && !defined(U_IN_DOXYGEN) && !defined(U_STATIC_IMPLEMENTATION)
} // namespace icu::number
U_NAMESPACE_END
@@ -418,8 +301,8 @@ class U_I18N_API NumberRangeFormatterSettings {
/**
* Sets the behavior when the two sides of the range are the same. This could happen if the same two numbers are
- * passed to the formatRange function, or if different numbers are passed to the function but they become the same
- * after rounding rules are applied. Possible values:
+ * passed to the formatFormattableRange function, or if different numbers are passed to the function but they
+ * become the same after rounding rules are applied. Possible values:
* <p>
* <ul>
* <li>SINGLE_VALUE: "5 miles"</li>
@@ -474,13 +357,13 @@ class U_I18N_API NumberRangeFormatterSettings {
/**
* Sets the UErrorCode if an error occurred in the fluent chain.
* Preserves older error codes in the outErrorCode.
- * @return TRUE if U_FAILURE(outErrorCode)
+ * @return true if U_FAILURE(outErrorCode)
* @stable ICU 63
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const {
if (U_FAILURE(outErrorCode)) {
// Do not overwrite the older error code
- return TRUE;
+ return true;
}
fMacros.copyErrorTo(outErrorCode);
return U_FAILURE(outErrorCode);
@@ -725,39 +608,27 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
/** @copydoc FormattedValue::nextPosition() */
UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
-#ifndef U_HIDE_DRAFT_API
/**
- * Export the first formatted number as a decimal number. This endpoint
+ * Extracts the formatted range as a pair of decimal numbers. This endpoint
* is useful for obtaining the exact number being printed after scaling
* and rounding have been applied by the number range formatting pipeline.
*
- * The syntax of the unformatted number is a "numeric string"
+ * The syntax of the unformatted numbers is a "numeric string"
* as defined in the Decimal Arithmetic Specification, available at
* http://speleotrove.com/decimal
*
- * @return A decimal representation of the first formatted number.
- * @draft ICU 63
- * @see NumberRangeFormatter
- * @see #getSecondDecimal
- */
- UnicodeString getFirstDecimal(UErrorCode& status) const;
-
- /**
- * Export the second formatted number as a decimal number. This endpoint
- * is useful for obtaining the exact number being printed after scaling
- * and rounding have been applied by the number range formatting pipeline.
- *
- * The syntax of the unformatted number is a "numeric string"
- * as defined in the Decimal Arithmetic Specification, available at
- * http://speleotrove.com/decimal
+ * Example C++17 call site:
+ *
+ * auto [ first, second ] = range.getDecimalNumbers<std::string>(status);
*
- * @return A decimal representation of the second formatted number.
- * @draft ICU 63
- * @see NumberRangeFormatter
- * @see #getFirstDecimal
+ * @tparam StringClass A string class compatible with StringByteSink;
+ * for example, std::string.
+ * @param status Set if an error occurs.
+ * @return A pair of StringClasses containing the numeric strings.
+ * @stable ICU 68
*/
- UnicodeString getSecondDecimal(UErrorCode& status) const;
-#endif // U_HIDE_DRAFT_API
+ template<typename StringClass>
+ inline std::pair<StringClass, StringClass> getDecimalNumbers(UErrorCode& status) const;
/**
* Returns whether the pair of numbers was successfully formatted as a range or whether an identity fallback was
@@ -770,6 +641,15 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
*/
UNumberRangeIdentityResult getIdentityResult(UErrorCode& status) const;
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Default constructor; makes an empty FormattedNumberRange.
+ * @draft ICU 70
+ */
+ FormattedNumberRange()
+ : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Copying not supported; use move constructor instead.
*/
@@ -818,10 +698,31 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
void getAllFieldPositionsImpl(FieldPositionIteratorHandler& fpih, UErrorCode& status) const;
+ void getDecimalNumbers(ByteSink& sink1, ByteSink& sink2, UErrorCode& status) const;
+
+ const impl::UFormattedNumberRangeData* getData(UErrorCode& status) const;
+
+ // To allow PluralRules to access the underlying data
+ friend class ::icu::PluralRules;
+
// To give LocalizedNumberRangeFormatter format methods access to this class's constructor:
friend class LocalizedNumberRangeFormatter;
+
+ // To give C API access to internals
+ friend struct impl::UFormattedNumberRangeImpl;
};
+// inline impl of @stable ICU 68 method
+template<typename StringClass>
+std::pair<StringClass, StringClass> FormattedNumberRange::getDecimalNumbers(UErrorCode& status) const {
+ StringClass str1;
+ StringClass str2;
+ StringByteSink<StringClass> sink1(&str1);
+ StringByteSink<StringClass> sink2(&str2);
+ getDecimalNumbers(sink1, sink2, status);
+ return std::make_pair(str1, str2);
+}
+
/**
* See the main description in numberrangeformatter.h for documentation and examples.
*
diff --git a/contrib/libs/icu/include/unicode/numfmt.h b/contrib/libs/icu/include/unicode/numfmt.h
index 48a69de7e7..135fe5b660 100644
--- a/contrib/libs/icu/include/unicode/numfmt.h
+++ b/contrib/libs/icu/include/unicode/numfmt.h
@@ -16,7 +16,7 @@
* 04/17/97 aliu Changed DigitCount to int per code review.
* 07/20/98 stephen JDK 1.2 sync up. Added scientific support.
* Changed naming conventions to match C++ guidelines
-* Derecated Java style constants (eg, INTEGER_FIELD)
+* Deprecated Java style constants (eg, INTEGER_FIELD)
********************************************************************************
*/
@@ -179,7 +179,7 @@ public:
*
* <p>
* For more detail on rounding modes, see:
- * http://userguide.icu-project.org/formatparse/numbers/rounding-modes
+ * https://unicode-org.github.io/icu/userguide/format_parse/numbers/rounding-modes
*
* @stable ICU 2.4
*/
@@ -266,7 +266,7 @@ public:
* @return clone, or nullptr if an error occurred
* @stable ICU 2.0
*/
- virtual NumberFormat* clone() const = 0;
+ virtual NumberFormat* clone() const override = 0;
/**
* Return true if the given Format objects are semantically equal.
@@ -274,7 +274,7 @@ public:
* @return true if the given Format objects are semantically equal.
* @stable ICU 2.0
*/
- virtual UBool operator==(const Format& other) const;
+ virtual bool operator==(const Format& other) const override;
using Format::format;
@@ -297,7 +297,7 @@ public:
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPosition& pos,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Format an object to produce a string. This method handles
@@ -318,7 +318,7 @@ public:
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPositionIterator* posIter,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Parse a string to produce an object. This methods handles
@@ -350,7 +350,7 @@ public:
*/
virtual void parseObject(const UnicodeString& source,
Formattable& result,
- ParsePosition& parse_pos) const;
+ ParsePosition& parse_pos) const override;
/**
* Format a double number. These methods call the NumberFormat
@@ -685,7 +685,7 @@ public:
* true, the string "1234." would be parsed as the integer value
* 1234 and parsing would stop at the "." character. Of course,
* the exact format accepted by the parse operation is locale
- * dependant and determined by sub-classes of NumberFormat.
+ * dependent and determined by sub-classes of NumberFormat.
* @return true if this format will parse numbers as integers
* only.
* @stable ICU 2.0
@@ -704,8 +704,8 @@ public:
/**
* Sets whether lenient parsing should be enabled (it is off by default).
*
- * @param enable \c TRUE if lenient parsing should be used,
- * \c FALSE otherwise.
+ * @param enable \c true if lenient parsing should be used,
+ * \c false otherwise.
* @stable ICU 4.8
*/
virtual void setLenient(UBool enable);
@@ -713,8 +713,8 @@ public:
/**
* Returns whether lenient parsing is enabled (it is off by default).
*
- * @return \c TRUE if lenient parsing is enabled,
- * \c FALSE otherwise.
+ * @return \c true if lenient parsing is enabled,
+ * \c false otherwise.
* @see #setLenient
* @stable ICU 4.8
*/
@@ -870,7 +870,7 @@ public:
* NumberFormat::createInstance to avoid undefined behavior.
* @param key the registry key returned by a previous call to registerFactory
* @param status the in/out status code, no special meanings are assigned
- * @return TRUE if the factory for the key was successfully unregistered
+ * @return true if the factory for the key was successfully unregistered
* @stable ICU 2.6
*/
static UBool U_EXPORT2 unregister(URegistryKey key, UErrorCode& status);
@@ -1077,7 +1077,7 @@ public:
* other classes have different class IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const = 0;
+ virtual UClassID getDynamicClassID(void) const override = 0;
protected:
@@ -1112,7 +1112,7 @@ protected:
#ifndef U_HIDE_INTERNAL_API
/**
* Creates the specified number format style of the desired locale.
- * If mustBeDecimalFormat is TRUE, then the returned pointer is
+ * If mustBeDecimalFormat is true, then the returned pointer is
* either a DecimalFormat or it is NULL.
* @internal
*/
@@ -1151,7 +1151,7 @@ private:
private:
UBool fParseIntegerOnly;
- UBool fLenient; // TRUE => lenient parse is enabled
+ UBool fLenient; // true => lenient parse is enabled
// ISO currency code
char16_t fCurrency[4];
@@ -1228,7 +1228,7 @@ public:
/**
* @stable ICU 2.6
*/
- SimpleNumberFormatFactory(const Locale& locale, UBool visible = TRUE);
+ SimpleNumberFormatFactory(const Locale& locale, UBool visible = true);
/**
* @stable ICU 3.0
@@ -1238,12 +1238,12 @@ public:
/**
* @stable ICU 2.6
*/
- virtual UBool visible(void) const;
+ virtual UBool visible(void) const override;
/**
* @stable ICU 2.6
*/
- virtual const UnicodeString * getSupportedIDs(int32_t &count, UErrorCode& status) const;
+ virtual const UnicodeString * getSupportedIDs(int32_t &count, UErrorCode& status) const override;
};
#endif /* #if !UCONFIG_NO_SERVICE */
diff --git a/contrib/libs/icu/include/unicode/numsys.h b/contrib/libs/icu/include/unicode/numsys.h
index 7def7032e1..4f839d0f35 100644
--- a/contrib/libs/icu/include/unicode/numsys.h
+++ b/contrib/libs/icu/include/unicode/numsys.h
@@ -102,7 +102,7 @@ public:
/**
* Create a numbering system using the specified radix, type, and description.
* @param radix The radix (base) for this numbering system.
- * @param isAlgorithmic TRUE if the numbering system is algorithmic rather than numeric.
+ * @param isAlgorithmic true if the numbering system is algorithmic rather than numeric.
* @param description The string representing the set of digits used in a numeric system, or the name of the RBNF
* ruleset to be used in an algorithmic system.
* @param status ICU status
@@ -171,10 +171,10 @@ public:
/**
- * Returns TRUE if the given numbering system is algorithmic
+ * Returns true if the given numbering system is algorithmic
*
- * @return TRUE if the numbering system is algorithmic.
- * Otherwise, return FALSE.
+ * @return true if the numbering system is algorithmic.
+ * Otherwise, return false.
* @stable ICU 4.2
*/
UBool isAlgorithmic() const;
@@ -192,7 +192,7 @@ public:
*
* @stable ICU 4.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
private:
diff --git a/contrib/libs/icu/include/unicode/parsepos.h b/contrib/libs/icu/include/unicode/parsepos.h
index 909d288d48..73945f5f97 100644
--- a/contrib/libs/icu/include/unicode/parsepos.h
+++ b/contrib/libs/icu/include/unicode/parsepos.h
@@ -97,17 +97,17 @@ public:
/**
* 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;
+ inline bool 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;
+ inline bool operator!=(const ParsePosition& that) const;
/**
* Clone this object.
@@ -166,7 +166,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
private:
/**
@@ -192,16 +192,16 @@ ParsePosition::operator=(const ParsePosition& copy)
return *this;
}
-inline UBool
+inline bool
ParsePosition::operator==(const ParsePosition& copy) const
{
if(index != copy.index || errorIndex != copy.errorIndex)
- return FALSE;
+ return false;
else
- return TRUE;
+ return true;
}
-inline UBool
+inline bool
ParsePosition::operator!=(const ParsePosition& copy) const
{
return !operator==(copy);
diff --git a/contrib/libs/icu/include/unicode/platform.h b/contrib/libs/icu/include/unicode/platform.h
index 2bb2f8b318..b7e514442c 100644
--- a/contrib/libs/icu/include/unicode/platform.h
+++ b/contrib/libs/icu/include/unicode/platform.h
@@ -814,8 +814,8 @@ namespace std {
/* Use the predefined value. */
#elif defined(U_STATIC_IMPLEMENTATION)
# define U_EXPORT
-#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(dllexport) && \
- UPRV_HAS_DECLSPEC_ATTRIBUTE(dllimport))
+#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllexport__) && \
+ UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__))
# define U_EXPORT __declspec(dllexport)
#elif defined(__GNUC__)
# define U_EXPORT __attribute__((visibility("default")))
@@ -839,8 +839,8 @@ namespace std {
#ifdef U_IMPORT
/* Use the predefined value. */
-#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(dllexport) && \
- UPRV_HAS_DECLSPEC_ATTRIBUTE(dllimport))
+#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllexport__) && \
+ UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__))
/* Windows needs to export/import data. */
# define U_IMPORT __declspec(dllimport)
#else
@@ -880,6 +880,6 @@ namespace std {
#else
# define U_CALLCONV_FPTR
#endif
-/* @} */
+/** @} */
#endif // _PLATFORM_H
diff --git a/contrib/libs/icu/include/unicode/plurfmt.h b/contrib/libs/icu/include/unicode/plurfmt.h
index 2c2116586f..db16054605 100644
--- a/contrib/libs/icu/include/unicode/plurfmt.h
+++ b/contrib/libs/icu/include/unicode/plurfmt.h
@@ -70,7 +70,7 @@ class NFRule;
* use the predefined keywords. The whole plural formatting of messages can
* be done using localized patterns from resource bundles. For predefined plural
* rules, see the CLDR <i>Language Plural Rules</i> page at
- * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
+ * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html
* </ul>
* </p>
* <h4>Usage of <code>PluralFormat</code></h4>
@@ -434,7 +434,7 @@ public:
* @return true if other is semantically equal to this.
* @stable ICU 4.0
*/
- virtual UBool operator==(const Format& other) const;
+ virtual bool operator==(const Format& other) const override;
/**
* Return true if another object is semantically unequal to this one.
@@ -443,14 +443,14 @@ public:
* @return true if other is semantically unequal to this.
* @stable ICU 4.0
*/
- virtual UBool operator!=(const Format& other) const;
+ virtual bool operator!=(const Format& other) const;
/**
* Clones this Format object polymorphically. The caller owns the
* result and should delete it when done.
* @stable ICU 4.0
*/
- virtual PluralFormat* clone() const;
+ virtual PluralFormat* clone() const override;
/**
* Formats a plural message for a number taken from a Formattable object.
@@ -469,7 +469,7 @@ public:
UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPosition& pos,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Returns the pattern from applyPattern() or constructor().
@@ -505,7 +505,7 @@ public:
*/
virtual void parseObject(const UnicodeString& source,
Formattable& result,
- ParsePosition& parse_pos) const;
+ ParsePosition& parse_pos) const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -520,7 +520,7 @@ public:
*
* @stable ICU 4.0
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
private:
/**
@@ -548,7 +548,7 @@ private:
virtual ~PluralSelectorAdapter();
- virtual UnicodeString select(void *context, double number, UErrorCode& /*ec*/) const;
+ virtual UnicodeString select(void *context, double number, UErrorCode& /*ec*/) const override;
void reset();
@@ -587,7 +587,7 @@ private:
*/
static int32_t findSubMessage(
const MessagePattern& pattern, int32_t partIndex,
- const PluralSelector& selector, void *context, double number, UErrorCode& ec); /**< @internal */
+ const PluralSelector& selector, void *context, double number, UErrorCode& ec);
void parseType(const UnicodeString& source, const NFRule *rbnfLenientScanner,
Formattable& result, FieldPosition& pos) const;
diff --git a/contrib/libs/icu/include/unicode/plurrule.h b/contrib/libs/icu/include/unicode/plurrule.h
index 408efbcc4a..e90cd66a7f 100644
--- a/contrib/libs/icu/include/unicode/plurrule.h
+++ b/contrib/libs/icu/include/unicode/plurrule.h
@@ -46,14 +46,20 @@ U_NAMESPACE_BEGIN
class Hashtable;
class IFixedDecimal;
+class FixedDecimal;
class RuleChain;
class PluralRuleParser;
class PluralKeywordEnumeration;
class AndConstraint;
class SharedPluralRules;
+class StandardPluralRanges;
namespace number {
class FormattedNumber;
+class FormattedNumberRange;
+namespace impl {
+class UFormattedNumberRangeData;
+}
}
/**
@@ -65,8 +71,8 @@ class FormattedNumber;
* default rule(other) is returned.
*
* For more information, details, and tips for writing rules, see the
- * LDML spec, C.11 Language Plural Rules:
- * http://www.unicode.org/draft/reports/tr35/tr35.html#Language_Plural_Rules
+ * LDML spec, Part 3.5 Language Plural Rules:
+ * https://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules
*
* Examples:<pre>
* "one: n is 1; few: n in 2..4"</pre>
@@ -194,7 +200,7 @@ class FormattedNumber;
* <p>
* ICU defines plural rules for many locales based on CLDR <i>Language Plural Rules</i>.
* For these predefined rules, see CLDR page at
- * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
+ * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html
* </p>
*/
class U_I18N_API PluralRules : public UObject {
@@ -367,11 +373,33 @@ public:
*/
UnicodeString select(const number::FormattedNumber& number, UErrorCode& status) const;
+ /**
+ * Given a formatted number range, returns the overall plural form of the
+ * range. For example, "3-5" returns "other" in English.
+ *
+ * To get a FormattedNumberRange, see NumberRangeFormatter.
+ *
+ * This method only works if PluralRules was created with a locale. If it was created
+ * from PluralRules::createRules(), this method sets status code U_UNSUPPORTED_ERROR.
+ *
+ * @param range The number range onto which the rules will be applied.
+ * @param status Set if an error occurs while selecting plural keyword.
+ * This could happen if the FormattedNumberRange is invalid,
+ * or if plural ranges data is unavailable.
+ * @return The keyword of the selected rule.
+ * @stable ICU 68
+ */
+ UnicodeString select(const number::FormattedNumberRange& range, UErrorCode& status) const;
+
#ifndef U_HIDE_INTERNAL_API
/**
- * @internal
- */
+ * @internal
+ */
UnicodeString select(const IFixedDecimal &number) const;
+ /**
+ * @internal
+ */
+ UnicodeString select(const number::impl::UFormattedNumberRangeData* urange, UErrorCode& status) const;
#endif /* U_HIDE_INTERNAL_API */
/**
@@ -446,13 +474,39 @@ public:
double *dest, int32_t destCapacity,
UErrorCode& status);
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * Internal-only function that returns FixedDecimals instead of doubles.
+ *
+ * Returns sample values for which select() would return the keyword. If
+ * the keyword is unknown, returns no values, but this is not an error.
+ *
+ * The number of returned values is typically small.
+ *
+ * @param keyword The keyword.
+ * @param dest Array into which to put the returned values. May
+ * be NULL if destCapacity is 0.
+ * @param destCapacity The capacity of the array, must be at least 0.
+ * @param status The error code.
+ * @return The count of values written.
+ * If more than destCapacity samples are available, then
+ * only destCapacity are written, and destCapacity is returned as the count,
+ * rather than setting a U_BUFFER_OVERFLOW_ERROR.
+ * (The actual number of keyword values could be unlimited.)
+ * @internal
+ */
+ int32_t getSamples(const UnicodeString &keyword,
+ FixedDecimal *dest, int32_t destCapacity,
+ UErrorCode& status);
+#endif /* U_HIDE_INTERNAL_API */
+
/**
- * Returns TRUE if the given keyword is defined in this
+ * Returns true if the given keyword is defined in this
* <code>PluralRules</code> object.
*
* @param keyword the input keyword.
- * @return TRUE if the input keyword is defined.
- * Otherwise, return FALSE.
+ * @return true if the input keyword is defined.
+ * Otherwise, return false.
* @stable ICU 4.0
*/
UBool isKeyword(const UnicodeString& keyword) const;
@@ -478,21 +532,21 @@ public:
* Compares the equality of two PluralRules objects.
*
* @param other The other PluralRules object to be compared with.
- * @return True if the given PluralRules is the same as this
+ * @return true if the given PluralRules is the same as this
* PluralRules; false otherwise.
* @stable ICU 4.0
*/
- virtual UBool operator==(const PluralRules& other) const;
+ virtual bool operator==(const PluralRules& other) const;
/**
* Compares the inequality of two PluralRules objects.
*
* @param other The PluralRules object to be compared with.
- * @return True if the given PluralRules is not the same as this
+ * @return true if the given PluralRules is not the same as this
* PluralRules; false otherwise.
* @stable ICU 4.0
*/
- UBool operator!=(const PluralRules& other) const {return !operator==(other);}
+ bool operator!=(const PluralRules& other) const {return !operator==(other);}
/**
@@ -508,17 +562,19 @@ public:
*
* @stable ICU 4.0
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
private:
RuleChain *mRules;
+ StandardPluralRanges *mStandardPluralRanges;
PluralRules(); // default constructor not implemented
void parseDescription(const UnicodeString& ruleData, UErrorCode &status);
int32_t getNumberValue(const UnicodeString& token) const;
UnicodeString getRuleFromResource(const Locale& locale, UPluralType type, UErrorCode& status);
RuleChain *rulesForKeyword(const UnicodeString &keyword) const;
+ PluralRules *clone(UErrorCode& status) const;
/**
* An internal status variable used to indicate that the object is in an 'invalid' state.
diff --git a/contrib/libs/icu/include/unicode/putil.h b/contrib/libs/icu/include/unicode/putil.h
index 759b136c13..500c21252f 100644
--- a/contrib/libs/icu/include/unicode/putil.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/rbbi.h b/contrib/libs/icu/include/unicode/rbbi.h
index 7825f603a5..0ce93819f5 100644
--- a/contrib/libs/icu/include/unicode/rbbi.h
+++ b/contrib/libs/icu/include/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 @@ private:
*/
UBool fDone;
+ /**
+ * Array of look-ahead tentative results.
+ */
+ int32_t *fLookAheadMatches;
+
//=======================================================================
// constructors
//=======================================================================
@@ -246,23 +253,23 @@ public:
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;
+ virtual bool operator==(const BreakIterator& that) const override;
/**
- * 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;
+ inline bool operator!=(const BreakIterator& that) const;
/**
* Returns a newly-constructed RuleBasedBreakIterator with the same
@@ -274,7 +281,7 @@ public:
* @return a newly-constructed RuleBasedBreakIterator
* @stable ICU 2.0
*/
- virtual RuleBasedBreakIterator* clone() const;
+ virtual RuleBasedBreakIterator* clone() const override;
/**
* Compute a hash code for this BreakIterator
@@ -319,7 +326,7 @@ public:
* @return An iterator over the text being analyzed.
* @stable ICU 2.0
*/
- virtual CharacterIterator& getText(void) const;
+ virtual CharacterIterator& getText(void) const override;
/**
@@ -336,7 +343,7 @@ public:
* UText was provided, it will always be returned.
* @stable ICU 3.4
*/
- virtual UText *getUText(UText *fillIn, UErrorCode &status) const;
+ virtual UText *getUText(UText *fillIn, UErrorCode &status) const override;
/**
* Set the iterator to analyze a new piece of text. This function resets
@@ -345,7 +352,7 @@ public:
* takes ownership of the character iterator. The caller MUST NOT delete it!
* @stable ICU 2.0
*/
- virtual void adoptText(CharacterIterator* newText);
+ virtual void adoptText(CharacterIterator* newText) override;
/**
* Set the iterator to analyze a new piece of text. This function resets
@@ -358,7 +365,7 @@ public:
* @param newText The text to analyze.
* @stable ICU 2.0
*/
- virtual void setText(const UnicodeString& newText);
+ virtual void setText(const UnicodeString& newText) override;
/**
* Reset the break iterator to operate over the text represented by
@@ -373,21 +380,21 @@ public:
* @param status Receives any error codes.
* @stable ICU 3.4
*/
- virtual void setText(UText *text, UErrorCode &status);
+ virtual void setText(UText *text, UErrorCode &status) override;
/**
* Sets the current iteration position to the beginning of the text, position zero.
* @return The offset of the beginning of the text, zero.
* @stable ICU 2.0
*/
- virtual int32_t first(void);
+ virtual int32_t first(void) override;
/**
* Sets the current iteration position to the end of the text.
* @return The text's past-the-end offset.
* @stable ICU 2.0
*/
- virtual int32_t last(void);
+ virtual int32_t last(void) override;
/**
* Advances the iterator either forward or backward the specified number of steps.
@@ -399,21 +406,21 @@ public:
* the current one.
* @stable ICU 2.0
*/
- virtual int32_t next(int32_t n);
+ virtual int32_t next(int32_t n) override;
/**
* Advances the iterator to the next boundary position.
* @return The position of the first boundary after this one.
* @stable ICU 2.0
*/
- virtual int32_t next(void);
+ virtual int32_t next(void) override;
/**
* Moves the iterator backwards, to the last boundary preceding this one.
* @return The position of the last boundary position preceding this one.
* @stable ICU 2.0
*/
- virtual int32_t previous(void);
+ virtual int32_t previous(void) override;
/**
* Sets the iterator to refer to the first boundary position following
@@ -422,7 +429,7 @@ public:
* @return The position of the first break after the current position.
* @stable ICU 2.0
*/
- virtual int32_t following(int32_t offset);
+ virtual int32_t following(int32_t offset) override;
/**
* Sets the iterator to refer to the last boundary position before the
@@ -431,7 +438,7 @@ public:
* @return The position of the last boundary before the starting position.
* @stable ICU 2.0
*/
- virtual int32_t preceding(int32_t offset);
+ virtual int32_t preceding(int32_t offset) override;
/**
* Returns true if the specified position is a boundary position. As a side
@@ -441,7 +448,7 @@ public:
* @return True if "offset" is a boundary position.
* @stable ICU 2.0
*/
- virtual UBool isBoundary(int32_t offset);
+ virtual UBool isBoundary(int32_t offset) override;
/**
* Returns the current iteration position. Note that UBRK_DONE is never
@@ -451,7 +458,7 @@ public:
* @return The current iteration position.
* @stable ICU 2.0
*/
- virtual int32_t current(void) const;
+ virtual int32_t current(void) const override;
/**
@@ -485,7 +492,7 @@ public:
* @see UWordBreak
* @stable ICU 2.2
*/
- virtual int32_t getRuleStatus() const;
+ virtual int32_t getRuleStatus() const override;
/**
* Get the status (tag) values from the break rule(s) that determined the boundary
@@ -510,7 +517,7 @@ public:
* @see getRuleStatus
* @stable ICU 3.0
*/
- virtual int32_t getRuleStatusVec(int32_t *fillInVec, int32_t capacity, UErrorCode &status);
+ virtual int32_t getRuleStatusVec(int32_t *fillInVec, int32_t capacity, UErrorCode &status) override;
/**
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override.
@@ -523,7 +530,7 @@ public:
* other classes have different class IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Returns the class ID for this class. This is useful only for
@@ -567,7 +574,7 @@ public:
*/
virtual RuleBasedBreakIterator *createBufferClone(void *stackBuffer,
int32_t &BufferSize,
- UErrorCode &status);
+ UErrorCode &status) override;
#endif // U_FORCE_HIDE_DEPRECATED_API
/**
@@ -614,7 +621,7 @@ public:
*
* @stable ICU 49
*/
- virtual RuleBasedBreakIterator &refreshInputText(UText *input, UErrorCode &status);
+ virtual RuleBasedBreakIterator &refreshInputText(UText *input, UErrorCode &status) override;
private:
@@ -659,6 +666,28 @@ private:
*/
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<typename RowType, PTrieFunc trieFunc>
+ int32_t handleSafePrevious(int32_t fromPosition);
+
+ template<typename RowType, PTrieFunc trieFunc>
+ int32_t handleNext();
+
/**
* This function returns the appropriate LanguageBreakEngine for a
@@ -681,7 +710,6 @@ private:
* @internal
*/
void dumpTables();
-
#endif /* U_HIDE_INTERNAL_API */
};
@@ -691,7 +719,7 @@ private:
//
//------------------------------------------------------------------------------
-inline UBool RuleBasedBreakIterator::operator!=(const BreakIterator& that) const {
+inline bool RuleBasedBreakIterator::operator!=(const BreakIterator& that) const {
return !operator==(that);
}
diff --git a/contrib/libs/icu/include/unicode/rbnf.h b/contrib/libs/icu/include/unicode/rbnf.h
index 62b02324b1..0a5a378e13 100644
--- a/contrib/libs/icu/include/unicode/rbnf.h
+++ b/contrib/libs/icu/include/unicode/rbnf.h
@@ -108,7 +108,7 @@ enum URBNFRuleSetTag {
* <p>In these rules, the <em>base value</em> is spelled out explicitly and set off from the
* rule's output text with a colon. The rules are in a sorted list, and a rule is applicable
* to all numbers from its own base value to one less than the next rule's base value. The
- * &quot;&gt;&gt;&quot; token is called a <em>substitution</em> and tells the fomatter to
+ * &quot;&gt;&gt;&quot; token is called a <em>substitution</em> and tells the formatter to
* isolate the number's ones digit, format it using this same set of rules, and place the
* result at the position of the &quot;&gt;&gt;&quot; token. Text in brackets is omitted if
* the number being formatted is an even multiple of 10 (the hyphen is a literal hyphen; 24
@@ -297,7 +297,7 @@ enum URBNFRuleSetTag {
* </tr>
* <tr>
* <td>x.0:</td>
- * <td>The rule is a <em>master rule</em>. If the full stop in
+ * <td>The rule is a <em>default rule</em>. If the full stop in
* the middle of the rule name is replaced with the decimal point
* that is used in the language or DecimalFormatSymbols, then that rule will
* have precedence when formatting and parsing this rule. For example, some
@@ -332,9 +332,9 @@ enum URBNFRuleSetTag {
* algorithms: If the rule set is a regular rule set, do the following:
*
* <ul>
- * <li>If the rule set includes a master rule (and the number was passed in as a <tt>double</tt>),
- * use the master rule.&nbsp; (If the number being formatted was passed in as a <tt>long</tt>,
- * the master rule is ignored.)</li>
+ * <li>If the rule set includes a default rule (and the number was passed in as a <tt>double</tt>),
+ * use the default rule.&nbsp; (If the number being formatted was passed in as a <tt>long</tt>,
+ * the default rule is ignored.)</li>
* <li>If the number is negative, use the negative-number rule.</li>
* <li>If the number has a fractional part and is greater than 1, use the improper fraction
* rule.</li>
@@ -393,7 +393,7 @@ enum URBNFRuleSetTag {
* </tr>
* <tr>
* <td></td>
- * <td>in fraction or master rule</td>
+ * <td>in fraction or default rule</td>
* <td>Isolate the number's fractional part and format it.</td>
* </tr>
* <tr>
@@ -425,7 +425,7 @@ enum URBNFRuleSetTag {
* </tr>
* <tr>
* <td></td>
- * <td>in fraction or master rule</td>
+ * <td>in fraction or default rule</td>
* <td>Isolate the number's integral part and format it.</td>
* </tr>
* <tr>
@@ -456,7 +456,7 @@ enum URBNFRuleSetTag {
* </tr>
* <tr>
* <td></td>
- * <td>in master rule</td>
+ * <td>in default rule</td>
* <td>Omit the optional text if the number is an integer (same as specifying both an x.x
* rule and an x.0 rule)</td>
* </tr>
@@ -543,7 +543,7 @@ enum URBNFRuleSetTag {
* names in this array will be treated as public rule set names by the API. Each subsequent
* element is an array of localizations of these names. The first element of one of these
* subarrays is the locale name, and the remaining elements are localizations of the
- * public rule set names, in the same order as they were listed in the first arrray.</p>
+ * public rule set names, in the same order as they were listed in the first array.</p>
* <p>In the syntax, angle brackets '<', '>' are used to delimit the arrays, and comma ',' is used
* to separate elements of an array. Whitespace is ignored, unless quoted.</p>
* <p>For example:<pre>
@@ -653,7 +653,7 @@ public:
/**
* Creates a RuleBasedNumberFormat from a predefined ruleset. The selector
- * code choosed among three possible predefined formats: spellout, ordinal,
+ * code chose among three possible predefined formats: spellout, ordinal,
* and duration.
* @param tag A selector code specifying which kind of formatter to create for that
* locale. There are four legal values: URBNF_SPELLOUT, which creates a formatter that
@@ -698,7 +698,7 @@ public:
* @return A copy of the object.
* @stable ICU 2.6
*/
- virtual RuleBasedNumberFormat* clone() const;
+ virtual RuleBasedNumberFormat* clone() const override;
/**
* Return true if the given Format objects are semantically equal.
@@ -707,7 +707,7 @@ public:
* @return true if the given Format objects are semantically equal.
* @stable ICU 2.6
*/
- virtual UBool operator==(const Format& other) const;
+ virtual bool operator==(const Format& other) const override;
//-----------------------------------------------------------------------
// public API functions
@@ -793,7 +793,7 @@ public:
*/
virtual UnicodeString& format(int32_t number,
UnicodeString& toAppendTo,
- FieldPosition& pos) const;
+ FieldPosition& pos) const override;
/**
* Formats the specified 64-bit number using the default ruleset.
@@ -805,7 +805,7 @@ public:
*/
virtual UnicodeString& format(int64_t number,
UnicodeString& toAppendTo,
- FieldPosition& pos) const;
+ FieldPosition& pos) const override;
/**
* Formats the specified number using the default ruleset.
* @param number The number to format.
@@ -816,7 +816,7 @@ public:
*/
virtual UnicodeString& format(double number,
UnicodeString& toAppendTo,
- FieldPosition& pos) const;
+ FieldPosition& pos) const override;
/**
* Formats the specified number using the named ruleset.
@@ -888,13 +888,13 @@ protected:
virtual UnicodeString& format(const number::impl::DecimalQuantity &number,
UnicodeString& appendTo,
FieldPosition& pos,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
public:
using NumberFormat::parse;
/**
- * Parses the specfied string, beginning at the specified position, according
+ * Parses the specified string, beginning at the specified position, according
* to this formatter's rules. This will match the string against all of the
* formatter's public rule sets and return the value corresponding to the longest
* parseable substring. This function's behavior is affected by the lenient
@@ -909,7 +909,7 @@ public:
*/
virtual void parse(const UnicodeString& text,
Formattable& result,
- ParsePosition& parsePosition) const;
+ ParsePosition& parsePosition) const override;
#if !UCONFIG_NO_COLLATION
@@ -946,7 +946,7 @@ public:
* @see RuleBasedCollator
* @stable ICU 2.0
*/
- virtual void setLenient(UBool enabled);
+ virtual void setLenient(UBool enabled) override;
/**
* Returns true if lenient-parse mode is turned on. Lenient parsing is off
@@ -955,7 +955,7 @@ public:
* @see #setLenient
* @stable ICU 2.0
*/
- virtual inline UBool isLenient(void) const;
+ virtual inline UBool isLenient(void) const override;
#endif
@@ -987,21 +987,21 @@ public:
* updated with any new status from the function.
* @stable ICU 53
*/
- virtual void setContext(UDisplayContext value, UErrorCode& status);
+ virtual void setContext(UDisplayContext value, UErrorCode& status) override;
/**
* Get the rounding mode.
* @return A rounding mode
* @stable ICU 60
*/
- virtual ERoundingMode getRoundingMode(void) const;
+ virtual ERoundingMode getRoundingMode(void) const override;
/**
* Set the rounding mode.
* @param roundingMode A rounding mode
* @stable ICU 60
*/
- virtual void setRoundingMode(ERoundingMode roundingMode);
+ virtual void setRoundingMode(ERoundingMode roundingMode) override;
public:
/**
@@ -1016,7 +1016,7 @@ public:
*
* @stable ICU 2.8
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Sets the decimal format symbols, which is generally not changed
diff --git a/contrib/libs/icu/include/unicode/rbtz.h b/contrib/libs/icu/include/unicode/rbtz.h
index d66e1f08ec..1eca70c338 100644
--- a/contrib/libs/icu/include/unicode/rbtz.h
+++ b/contrib/libs/icu/include/unicode/rbtz.h
@@ -76,7 +76,7 @@ public:
*semantically equal.
* @stable ICU 3.8
*/
- virtual UBool operator==(const TimeZone& that) const;
+ virtual bool operator==(const TimeZone& that) const override;
/**
* Return true if the given <code>TimeZone</code> objects are
@@ -86,20 +86,21 @@ public:
* semantically unequal.
* @stable ICU 3.8
*/
- virtual UBool operator!=(const TimeZone& that) const;
+ virtual bool operator!=(const TimeZone& that) const;
/**
- * Adds the <code>TimeZoneRule</code> which represents time transitions.
- * The <code>TimeZoneRule</code> must have start times, that is, the result
- * of isTransitionRule() must be true. Otherwise, U_ILLEGAL_ARGUMENT_ERROR
+ * Adds the `TimeZoneRule` which represents time transitions.
+ * The `TimeZoneRule` must have start times, that is, the result
+ * of `isTransitionRule()` must be true. Otherwise, U_ILLEGAL_ARGUMENT_ERROR
* is set to the error code.
- * The input <code>TimeZoneRule</code> is adopted by this
- * <code>RuleBasedTimeZone</code> on successful completion of this method,
- * thus, the caller must not delete it when no error is returned.
- * After all rules are added, the caller must call complete() method to
- * make this <code>RuleBasedTimeZone</code> ready to handle common time
+ * The input `TimeZoneRule` is adopted by this `RuleBasedTimeZone`;
+ * the caller must not delete it. Should an error condition prevent
+ * the successful adoption of the rule, this function will delete it.
+ *
+ * After all rules are added, the caller must call `complete()` method to
+ * make this `RuleBasedTimeZone` ready to handle common time
* zone functions.
- * @param rule The <code>TimeZoneRule</code>.
+ * @param rule The `TimeZoneRule`.
* @param status Output param to filled in with a success or an error.
* @stable ICU 3.8
*/
@@ -107,7 +108,7 @@ public:
/**
* Makes the <code>TimeZoneRule</code> ready to handle actual timezone
- * calcuation APIs. This method collects time zone rules specified
+ * calculation APIs. This method collects time zone rules specified
* by the caller via the constructor and addTransitionRule() and
* builds internal structure for making the object ready to support
* time zone APIs such as getOffset(), getNextTransition() and others.
@@ -123,7 +124,7 @@ public:
* @return A new copy of this TimeZone object.
* @stable ICU 3.8
*/
- virtual RuleBasedTimeZone* clone() const;
+ virtual RuleBasedTimeZone* clone() const override;
/**
* Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add
@@ -150,7 +151,7 @@ public:
* @stable ICU 3.8
*/
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
- uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const;
+ uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const override;
/**
* Gets the time zone offset, for current date, modified in case of
@@ -173,7 +174,7 @@ public:
*/
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
uint8_t dayOfWeek, int32_t millis,
- int32_t monthLength, UErrorCode& status) const;
+ int32_t monthLength, UErrorCode& status) const override;
/**
* Returns the time zone raw and GMT offset for the given moment
@@ -198,7 +199,7 @@ public:
* @stable ICU 3.8
*/
virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
- int32_t& dstOffset, UErrorCode& ec) const;
+ int32_t& dstOffset, UErrorCode& ec) const override;
/**
* Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
@@ -207,7 +208,7 @@ public:
* @param offsetMillis The new raw GMT offset for this time zone.
* @stable ICU 3.8
*/
- virtual void setRawOffset(int32_t offsetMillis);
+ virtual void setRawOffset(int32_t offsetMillis) override;
/**
* Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
@@ -216,7 +217,7 @@ public:
* @return The TimeZone's raw GMT offset.
* @stable ICU 3.8
*/
- virtual int32_t getRawOffset(void) const;
+ virtual int32_t getRawOffset(void) const override;
/**
* Queries if this time zone uses daylight savings time.
@@ -224,7 +225,7 @@ public:
* false, otherwise.
* @stable ICU 3.8
*/
- virtual UBool useDaylightTime(void) const;
+ virtual UBool useDaylightTime(void) const override;
#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
@@ -240,7 +241,7 @@ public:
* false, otherwise.
* @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead.
*/
- virtual UBool inDaylightTime(UDate date, UErrorCode& status) const;
+ virtual UBool inDaylightTime(UDate date, UErrorCode& status) const override;
#endif // U_FORCE_HIDE_DEPRECATED_API
/**
@@ -251,27 +252,27 @@ public:
* with the possible exception of the ID
* @stable ICU 3.8
*/
- virtual UBool hasSameRules(const TimeZone& other) const;
+ virtual UBool hasSameRules(const TimeZone& other) const override;
/**
* Gets the first time zone transition after the base time.
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
- virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
+ virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const override;
/**
* Gets the most recent time zone transition before the base time.
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
- virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
+ virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const override;
/**
* Returns the number of <code>TimeZoneRule</code>s which represents time transitions,
@@ -281,7 +282,7 @@ public:
* @return The number of <code>TimeZoneRule</code>s representing time transitions.
* @stable ICU 3.8
*/
- virtual int32_t countTransitionRules(UErrorCode& status) const;
+ virtual int32_t countTransitionRules(UErrorCode& status) const override;
/**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
@@ -300,14 +301,18 @@ public:
* @stable ICU 3.8
*/
virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
- const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const;
+ const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const override;
+#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
- * @internal
+ * @draft ICU 69
*/
- virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
- int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const;
+ virtual void getOffsetFromLocal(
+ UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
+ UTimeZoneLocalOption duplicatedTimeOpt,
+ int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override;
+#endif /* U_FORCE_HIDE_DRAFT_API */
private:
void deleteRules(void);
@@ -356,7 +361,7 @@ public:
* other classes have different class IDs.
* @stable ICU 3.8
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/include/unicode/regex.h b/contrib/libs/icu/include/unicode/regex.h
index 7f7d152280..f8e32922f4 100644
--- a/contrib/libs/icu/include/unicode/regex.h
+++ b/contrib/libs/icu/include/unicode/regex.h
@@ -116,20 +116,20 @@ public:
* were constructed from identical source patterns using the same #URegexpFlag
* settings.
* @param that a RegexPattern object to compare with "this".
- * @return TRUE if the objects are equivalent.
+ * @return true if the objects are equivalent.
* @stable ICU 2.4
*/
- UBool operator==(const RegexPattern& that) const;
+ bool operator==(const RegexPattern& that) const;
/**
* Comparison operator. Two RegexPattern objects are considered equal if they
* were constructed from identical source patterns using the same #URegexpFlag
* settings.
* @param that a RegexPattern object to compare with "this".
- * @return TRUE if the objects are different.
+ * @return true if the objects are different.
* @stable ICU 2.4
*/
- inline UBool operator!=(const RegexPattern& that) const {return ! operator ==(that);}
+ inline bool operator!=(const RegexPattern& that) const {return ! operator ==(that);}
/**
* Assignment operator. After assignment, this RegexPattern will behave identically
@@ -569,7 +569,7 @@ public:
*
* @stable ICU 2.4
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -764,7 +764,7 @@ public:
/**
* Attempts to match the entire input region against the pattern.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match
+ * @return true if there is a match
* @stable ICU 2.4
*/
virtual UBool matches(UErrorCode &status);
@@ -777,7 +777,7 @@ public:
* A successful match must extend to the end of the input.
* @param startIndex The input string (native) index at which to begin matching.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match
+ * @return true if there is a match
* @stable ICU 2.8
*/
virtual UBool matches(int64_t startIndex, UErrorCode &status);
@@ -793,7 +793,7 @@ public:
* end(), and group() functions.
*
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match at the start of the input string.
+ * @return true if there is a match at the start of the input string.
* @stable ICU 2.4
*/
virtual UBool lookingAt(UErrorCode &status);
@@ -809,7 +809,7 @@ public:
*
* @param startIndex The input string (native) index at which to begin matching.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match.
+ * @return true if there is a match.
* @stable ICU 2.8
*/
virtual UBool lookingAt(int64_t startIndex, UErrorCode &status);
@@ -824,7 +824,7 @@ public:
* Note that if the input string is changed by the application,
* use find(startPos, status) instead of find(), because the saved starting
* position may not be valid with the altered input string.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 2.4
*/
virtual UBool find();
@@ -841,7 +841,7 @@ public:
* use find(startPos, status) instead of find(), because the saved starting
* position may not be valid with the altered input string.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 55
*/
virtual UBool find(UErrorCode &status);
@@ -852,7 +852,7 @@ public:
*
* @param start The (native) index in the input string to begin the search.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 2.4
*/
virtual UBool find(int64_t start, UErrorCode &status);
@@ -1271,7 +1271,7 @@ public:
* See useTransparentBounds for a description of transparent and opaque bounds.
* By default, a matcher uses opaque region boundaries.
*
- * @return TRUE if this matcher is using opaque bounds, false if it is not.
+ * @return true if this matcher is using opaque bounds, false if it is not.
* @stable ICU 4.0
*/
virtual UBool hasTransparentBounds() const;
@@ -1290,7 +1290,7 @@ public:
*
* By default, a matcher uses opaque bounds.
*
- * @param b TRUE for transparent bounds; FALSE for opaque bounds
+ * @param b true for transparent bounds; false for opaque bounds
* @return This Matcher;
* @stable ICU 4.0
**/
@@ -1301,7 +1301,7 @@ public:
* Return true if this matcher is using anchoring bounds.
* By default, matchers use anchoring region bounds.
*
- * @return TRUE if this matcher is using anchoring bounds.
+ * @return true if this matcher is using anchoring bounds.
* @stable ICU 4.0
*/
virtual UBool hasAnchoringBounds() const;
@@ -1315,7 +1315,7 @@ public:
*
* Anchoring Bounds are the default for regions.
*
- * @param b TRUE if to enable anchoring bounds; FALSE to disable them.
+ * @param b true if to enable anchoring bounds; false to disable them.
* @return This Matcher
* @stable ICU 4.0
*/
@@ -1323,26 +1323,26 @@ public:
/**
- * Return TRUE if the most recent matching operation attempted to access
+ * Return true if the most recent matching operation attempted to access
* additional input beyond the available input text.
* In this case, additional input text could change the results of the match.
*
* hitEnd() is defined for both successful and unsuccessful matches.
- * In either case hitEnd() will return TRUE if if the end of the text was
+ * In either case hitEnd() will return true if if the end of the text was
* reached at any point during the matching process.
*
- * @return TRUE if the most recent match hit the end of input
+ * @return true if the most recent match hit the end of input
* @stable ICU 4.0
*/
virtual UBool hitEnd() const;
/**
- * Return TRUE the most recent match succeeded and additional input could cause
+ * Return true the most recent match succeeded and additional input could cause
* it to fail. If this method returns false and a match was found, then more input
* might change the match but the match won't be lost. If a match was not found,
* then requireEnd has no meaning.
*
- * @return TRUE if more input could cause the most recent match to no longer match.
+ * @return true if more input could cause the most recent match to no longer match.
* @stable ICU 4.0
*/
virtual UBool requireEnd() const;
@@ -1746,7 +1746,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
private:
// Constructors and other object boilerplate are private.
@@ -1781,7 +1781,7 @@ private:
inline REStackFrame *StateSave(REStackFrame *fp, int64_t savePatIdx, UErrorCode &status);
void IncrementTime(UErrorCode &status);
- // Call user find callback function, if set. Return TRUE if operation should be interrupted.
+ // Call user find callback function, if set. Return true if operation should be interrupted.
inline UBool findProgressInterrupt(int64_t matchIndex, UErrorCode &status);
int64_t appendGroup(int32_t groupNum, UText *dest, UErrorCode &status) const;
diff --git a/contrib/libs/icu/include/unicode/region.h b/contrib/libs/icu/include/unicode/region.h
index 9ec8dd4515..ba4a650f4f 100644
--- a/contrib/libs/icu/include/unicode/region.h
+++ b/contrib/libs/icu/include/unicode/region.h
@@ -81,13 +81,13 @@ public:
* Returns true if the two regions are equal.
* @stable ICU 51
*/
- UBool operator==(const Region &that) const;
+ bool operator==(const Region &that) const;
/**
* Returns true if the two regions are NOT equal; that is, if operator ==() returns false.
* @stable ICU 51
*/
- UBool operator!=(const Region &that) const;
+ bool operator!=(const Region &that) const;
/**
* Returns a pointer to a Region using the given region code. The region code can be either 2-letter ISO code,
diff --git a/contrib/libs/icu/include/unicode/reldatefmt.h b/contrib/libs/icu/include/unicode/reldatefmt.h
index d5533bb379..2a3742fd63 100644
--- a/contrib/libs/icu/include/unicode/reldatefmt.h
+++ b/contrib/libs/icu/include/unicode/reldatefmt.h
@@ -175,19 +175,17 @@ typedef enum UDateAbsoluteUnit {
*/
UDAT_ABSOLUTE_QUARTER,
-#ifndef U_HIDE_DRAFT_API
/**
* Hour
- * @draft ICU 65
+ * @stable ICU 65
*/
UDAT_ABSOLUTE_HOUR,
/**
* Minute
- * @draft ICU 65
+ * @stable ICU 65
*/
UDAT_ABSOLUTE_MINUTE,
-#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DEPRECATED_API
/**
diff --git a/contrib/libs/icu/include/unicode/resbund.h b/contrib/libs/icu/include/unicode/resbund.h
index 2894067528..7441592a0f 100644
--- a/contrib/libs/icu/include/unicode/resbund.h
+++ b/contrib/libs/icu/include/unicode/resbund.h
@@ -66,14 +66,14 @@ U_NAMESPACE_BEGIN
/**
* A class representing a collection of resource information pertaining to a given
- * locale. A resource bundle provides a way of accessing locale- specfic information in
+ * locale. A resource bundle provides a way of accessing locale- specific information in
* a data file. You create a resource bundle that manages the resources for a given
* locale and then ask it for individual resources.
* <P>
* Resource bundles in ICU4C are currently defined using text files which conform to the following
- * <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt">BNF definition</a>.
+ * <a href="https://github.com/unicode-org/icu-docs/blob/main/design/bnf_rb.txt">BNF definition</a>.
* More on resource bundle concepts and syntax can be found in the
- * <a href="http://icu-project.org/userguide/ResourceManagement.html">Users Guide</a>.
+ * <a href="https://unicode-org.github.io/icu/userguide/locale/resources">Users Guide</a>.
* <P>
*
* The ResourceBundle class is not suitable for subclassing.
@@ -286,7 +286,7 @@ public:
/**
* 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
@@ -474,7 +474,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
diff --git a/contrib/libs/icu/include/unicode/schriter.h b/contrib/libs/icu/include/unicode/schriter.h
index 1ca5b70fca..9dac099967 100644
--- a/contrib/libs/icu/include/unicode/schriter.h
+++ b/contrib/libs/icu/include/unicode/schriter.h
@@ -124,7 +124,7 @@ public:
* same string and are pointing at the same character.
* @stable ICU 2.0
*/
- virtual UBool operator==(const ForwardCharacterIterator& that) const;
+ virtual bool operator==(const ForwardCharacterIterator& that) const override;
/**
* Returns a new StringCharacterIterator referring to the same
@@ -133,7 +133,7 @@ public:
* @return the newly cloned object.
* @stable ICU 2.0
*/
- virtual StringCharacterIterator* clone() const;
+ virtual StringCharacterIterator* clone() const override;
/**
* Sets the iterator to iterate over the provided string.
@@ -149,14 +149,14 @@ public:
* @param result Receives a copy of the text under iteration.
* @stable ICU 2.0
*/
- virtual void getText(UnicodeString& result);
+ virtual void getText(UnicodeString& result) override;
/**
* Return a class ID for this object (not really public)
* @return a class ID for this object.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Return a class ID for this class (not really public)
diff --git a/contrib/libs/icu/include/unicode/scientificnumberformatter.h b/contrib/libs/icu/include/unicode/scientificnumberformatter.h
index 7f860d4f59..aa7e80543e 100644
--- a/contrib/libs/icu/include/unicode/scientificnumberformatter.h
+++ b/contrib/libs/icu/include/unicode/scientificnumberformatter.h
@@ -159,14 +159,14 @@ public:
class U_I18N_API SuperscriptStyle : public Style {
public:
- virtual SuperscriptStyle *clone() const;
+ virtual SuperscriptStyle *clone() const override;
protected:
virtual UnicodeString &format(
const UnicodeString &original,
FieldPositionIterator &fpi,
const UnicodeString &preExponent,
UnicodeString &appendTo,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
};
class U_I18N_API MarkupStyle : public Style {
@@ -177,14 +177,14 @@ public:
: Style(),
fBeginMarkup(beginMarkup),
fEndMarkup(endMarkup) { }
- virtual MarkupStyle *clone() const;
+ virtual MarkupStyle *clone() const override;
protected:
virtual UnicodeString &format(
const UnicodeString &original,
FieldPositionIterator &fpi,
const UnicodeString &preExponent,
UnicodeString &appendTo,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
private:
UnicodeString fBeginMarkup;
UnicodeString fEndMarkup;
diff --git a/contrib/libs/icu/include/unicode/search.h b/contrib/libs/icu/include/unicode/search.h
index 2865366a33..295a3ce67e 100644
--- a/contrib/libs/icu/include/unicode/search.h
+++ b/contrib/libs/icu/include/unicode/search.h
@@ -59,7 +59,7 @@ U_NAMESPACE_BEGIN
* <p>
* <tt>SearchIterator</tt> provides an API that is similar to that of
* other text iteration classes such as <tt>BreakIterator</tt>. Using
- * this class, it is easy to scan through text looking for all occurances of
+ * this class, it is easy to scan through text looking for all occurrences of
* a given pattern. The following example uses a <tt>StringSearch</tt>
* object to find all instances of "fox" in the target string. Any other
* subclass of <tt>SearchIterator</tt> can be used in an identical
@@ -267,20 +267,20 @@ public:
/**
* Equality operator.
* @param that SearchIterator instance to be compared.
- * @return TRUE if both BreakIterators are of the same class, have the
+ * @return true if both BreakIterators are of the same class, have the
* same behavior, terates over the same text and have the same
- * attributes. FALSE otherwise.
+ * attributes. false otherwise.
* @stable ICU 2.0
*/
- virtual UBool operator==(const SearchIterator &that) const;
+ virtual bool operator==(const SearchIterator &that) const;
/**
* Not-equal operator.
* @param that SearchIterator instance to be compared.
- * @return FALSE if operator== returns TRUE, and vice versa.
+ * @return false if operator== returns true, and vice versa.
* @stable ICU 2.0
*/
- UBool operator!=(const SearchIterator &that) const;
+ bool operator!=(const SearchIterator &that) const;
// public methods ----------------------------------------------------
@@ -566,7 +566,7 @@ protected:
void setMatchNotFound();
};
-inline UBool SearchIterator::operator!=(const SearchIterator &that) const
+inline bool SearchIterator::operator!=(const SearchIterator &that) const
{
return !operator==(that);
}
diff --git a/contrib/libs/icu/include/unicode/selfmt.h b/contrib/libs/icu/include/unicode/selfmt.h
index 9b98f6db7a..bdce00e593 100644
--- a/contrib/libs/icu/include/unicode/selfmt.h
+++ b/contrib/libs/icu/include/unicode/selfmt.h
@@ -259,7 +259,7 @@ public:
* @return true if other is semantically equal to this.
* @stable ICU 4.4
*/
- virtual UBool operator==(const Format& other) const;
+ virtual bool operator==(const Format& other) const override;
/**
* Return true if another object is semantically unequal to this one.
@@ -268,14 +268,14 @@ public:
* @return true if other is semantically unequal to this.
* @stable ICU 4.4
*/
- virtual UBool operator!=(const Format& other) const;
+ virtual bool operator!=(const Format& other) const;
/**
* Clones this Format object polymorphically. The caller owns the
* result and should delete it when done.
* @stable ICU 4.4
*/
- virtual SelectFormat* clone() const;
+ virtual SelectFormat* clone() const override;
/**
* Format an object to produce a string.
@@ -295,7 +295,7 @@ public:
UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPosition& pos,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Returns the pattern from applyPattern() or constructor.
@@ -331,7 +331,7 @@ public:
*/
virtual void parseObject(const UnicodeString& source,
Formattable& result,
- ParsePosition& parse_pos) const;
+ ParsePosition& parse_pos) const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -343,7 +343,7 @@ public:
* ICU "poor man's RTTI", returns a UClassID for the actual class.
* @stable ICU 4.4
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
private:
friend class MessageFormat;
diff --git a/contrib/libs/icu/include/unicode/simpleformatter.h b/contrib/libs/icu/include/unicode/simpleformatter.h
index 9414bca308..6d9c04ace2 100644
--- a/contrib/libs/icu/include/unicode/simpleformatter.h
+++ b/contrib/libs/icu/include/unicode/simpleformatter.h
@@ -125,7 +125,7 @@ public:
* @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 @@ public:
* 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/contrib/libs/icu/include/unicode/simpletz.h b/contrib/libs/icu/include/unicode/simpletz.h
index 980a1b8c62..f5c155de46 100644
--- a/contrib/libs/icu/include/unicode/simpletz.h
+++ b/contrib/libs/icu/include/unicode/simpletz.h
@@ -107,11 +107,11 @@ public:
* the same ID, raw GMT offset, and DST rules.
*
* @param that The SimpleTimeZone object to be compared with.
- * @return True if the given time zone is equal to this time zone; false
+ * @return true if the given time zone is equal to this time zone; false
* otherwise.
* @stable ICU 2.0
*/
- virtual UBool operator==(const TimeZone& that) const;
+ virtual bool operator==(const TimeZone& that) const override;
/**
* Constructs a SimpleTimeZone with the given raw GMT offset and time zone ID,
@@ -134,7 +134,7 @@ public:
* TimeZone.createInstance() to create a TimeZone instead of creating a
* SimpleTimeZone directly with this constructor.
* <P>
- * Various types of daylight-savings time rules can be specfied by using different
+ * Various types of daylight-savings time rules can be specified by using different
* values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a
* complete explanation of how these parameters work, see the documentation for
* setStartRule().
@@ -175,7 +175,7 @@ public:
* TimeZone.createInstance() to create a TimeZone instead of creating a
* SimpleTimeZone directly with this constructor.
* <P>
- * Various types of daylight-savings time rules can be specfied by using different
+ * Various types of daylight-savings time rules can be specified by using different
* values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a
* complete explanation of how these parameters work, see the documentation for
* setStartRule().
@@ -219,7 +219,7 @@ public:
* TimeZone.createInstance() to create a TimeZone instead of creating a
* SimpleTimeZone directly with this constructor.
* <P>
- * Various types of daylight-savings time rules can be specfied by using different
+ * Various types of daylight-savings time rules can be specified by using different
* values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a
* complete explanation of how these parameters work, see the documentation for
* setStartRule().
@@ -293,7 +293,7 @@ public:
* month, regardless of what day of the week it is (e.g., (-2, 0) is the
* next-to-last day of the month).</li>
* <li>If dayOfWeek is negative and dayOfWeekInMonth is positive, they specify the
- * first specified day of the week on or after the specfied day of the month.
+ * first specified day of the week on or after the specified day of the month.
* (e.g., (15, -SUNDAY) is the first Sunday after the 15th of the month
* [or the 15th itself if the 15th is a Sunday].)</li>
* <li>If dayOfWeek and DayOfWeekInMonth are both negative, they specify the
@@ -337,7 +337,7 @@ public:
* month, regardless of what day of the week it is (e.g., (-2, 0) is the
* next-to-last day of the month).</li>
* <li>If dayOfWeek is negative and dayOfWeekInMonth is positive, they specify the
- * first specified day of the week on or after the specfied day of the month.
+ * first specified day of the week on or after the specified day of the month.
* (e.g., (15, -SUNDAY) is the first Sunday after the 15th of the month
* [or the 15th itself if the 15th is a Sunday].)</li>
* <li>If dayOfWeek and DayOfWeekInMonth are both negative, they specify the
@@ -571,7 +571,7 @@ public:
* @stable ICU 2.0
*/
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
- uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const;
+ uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const override;
/**
* Gets the time zone offset, for current date, modified in case of
@@ -590,7 +590,7 @@ public:
*/
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
uint8_t dayOfWeek, int32_t milliseconds,
- int32_t monthLength, UErrorCode& status) const;
+ int32_t monthLength, UErrorCode& status) const override;
/**
* Gets the time zone offset, for current date, modified in case of
* daylight savings. This is the offset to add *to* UTC to get local time.
@@ -618,14 +618,18 @@ public:
* @stable ICU 2.8
*/
virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
- int32_t& dstOffset, UErrorCode& ec) const;
+ int32_t& dstOffset, UErrorCode& ec) const override;
+#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
- * @internal
+ * @draft ICU 69
*/
- virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
- int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const;
+ virtual void getOffsetFromLocal(
+ UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
+ UTimeZoneLocalOption duplicatedTimeOpt,
+ int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override;
+#endif /* U_FORCE_HIDE_DRAFT_API */
/**
* Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
@@ -634,7 +638,7 @@ public:
* @return The TimeZone's raw GMT offset.
* @stable ICU 2.0
*/
- virtual int32_t getRawOffset(void) const;
+ virtual int32_t getRawOffset(void) const override;
/**
* Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
@@ -643,7 +647,7 @@ public:
* @param offsetMillis The new raw GMT offset for this time zone.
* @stable ICU 2.0
*/
- virtual void setRawOffset(int32_t offsetMillis);
+ virtual void setRawOffset(int32_t offsetMillis) override;
/**
* Sets the amount of time in ms that the clock is advanced during DST.
@@ -664,7 +668,7 @@ public:
* but not 0.
* @stable ICU 2.0
*/
- virtual int32_t getDSTSavings(void) const;
+ virtual int32_t getDSTSavings(void) const override;
/**
* Queries if this TimeZone uses Daylight Savings Time.
@@ -672,7 +676,7 @@ public:
* @return True if this TimeZone uses Daylight Savings Time; false otherwise.
* @stable ICU 2.0
*/
- virtual UBool useDaylightTime(void) const;
+ virtual UBool useDaylightTime(void) const override;
#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
@@ -689,7 +693,7 @@ public:
* false otherwise.
* @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead.
*/
- virtual UBool inDaylightTime(UDate date, UErrorCode& status) const;
+ virtual UBool inDaylightTime(UDate date, UErrorCode& status) const override;
#endif // U_FORCE_HIDE_DEPRECATED_API
/**
@@ -698,7 +702,7 @@ public:
* @return true if the given zone has the same rules and offset as this one
* @stable ICU 2.0
*/
- UBool hasSameRules(const TimeZone& other) const;
+ UBool hasSameRules(const TimeZone& other) const override;
/**
* Clones TimeZone objects polymorphically. Clients are responsible for deleting
@@ -707,27 +711,27 @@ public:
* @return A new copy of this TimeZone object.
* @stable ICU 2.0
*/
- virtual SimpleTimeZone* clone() const;
+ virtual SimpleTimeZone* clone() const override;
/**
* Gets the first time zone transition after the base time.
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
- virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
+ virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const override;
/**
* Gets the most recent time zone transition before the base time.
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
- virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
+ virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const override;
/**
* Returns the number of <code>TimeZoneRule</code>s which represents time transitions,
@@ -737,7 +741,7 @@ public:
* @return The number of <code>TimeZoneRule</code>s representing time transitions.
* @stable ICU 3.8
*/
- virtual int32_t countTransitionRules(UErrorCode& status) const;
+ virtual int32_t countTransitionRules(UErrorCode& status) const override;
/**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
@@ -756,7 +760,7 @@ public:
* @stable ICU 3.8
*/
virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
- const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const;
+ const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const override;
public:
@@ -771,7 +775,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Return the class ID for this class. This is useful only for comparing to a return
diff --git a/contrib/libs/icu/include/unicode/smpdtfmt.h b/contrib/libs/icu/include/unicode/smpdtfmt.h
index b4b0e5fb39..733a1cff13 100644
--- a/contrib/libs/icu/include/unicode/smpdtfmt.h
+++ b/contrib/libs/icu/include/unicode/smpdtfmt.h
@@ -81,7 +81,7 @@ class LocalizedNumberFormatter;
* the date and time formatting algorithm and pattern letters defined by
* <a href="http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table">UTS#35
* Unicode Locale Data Markup Language (LDML)</a> and further documented for ICU in the
- * <a href="https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table">ICU
+ * <a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#date-field-symbol-table">ICU
* User Guide</a>. The following pattern letters are currently available (note that the actual
* values depend on CLDR and may change from the examples shown here):</p>
*
@@ -756,7 +756,7 @@ public:
* names of the months), but not to provide the pattern.
* <P>
* A numbering system override is a string containing either the name of a known numbering system,
- * or a set of field and numbering system pairs that specify which fields are to be formattied with
+ * or a set of field and numbering system pairs that specify which fields are to be formatted with
* the alternate numbering system. For example, to specify that all numeric fields in the specified
* date or time pattern are to be rendered using Thai digits, simply specify the numbering system override
* as "thai". To specify that just the year portion of the date be formatted using Hebrew numbering,
@@ -797,7 +797,7 @@ public:
* names of the months), but not to provide the pattern.
* <P>
* A numbering system override is a string containing either the name of a known numbering system,
- * or a set of field and numbering system pairs that specify which fields are to be formattied with
+ * or a set of field and numbering system pairs that specify which fields are to be formatted with
* the alternate numbering system. For example, to specify that all numeric fields in the specified
* date or time pattern are to be rendered using Thai digits, simply specify the numbering system override
* as "thai". To specify that just the year portion of the date be formatted using Hebrew numbering,
@@ -867,7 +867,7 @@ public:
* @return A copy of the object.
* @stable ICU 2.0
*/
- virtual SimpleDateFormat* clone() const;
+ virtual SimpleDateFormat* clone() const override;
/**
* Return true if the given Format objects are semantically equal. Objects
@@ -876,7 +876,7 @@ public:
* @return true if the given Format objects are semantically equal.
* @stable ICU 2.0
*/
- virtual UBool operator==(const Format& other) const;
+ virtual bool operator==(const Format& other) const override;
using DateFormat::format;
@@ -899,7 +899,7 @@ public:
*/
virtual UnicodeString& format( Calendar& cal,
UnicodeString& appendTo,
- FieldPosition& pos) const;
+ FieldPosition& pos) const override;
/**
* Format a date or time, which is the standard millis since 24:00 GMT, Jan
@@ -922,7 +922,7 @@ public:
virtual UnicodeString& format( Calendar& cal,
UnicodeString& appendTo,
FieldPositionIterator* posIter,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
using DateFormat::parse;
@@ -954,7 +954,7 @@ public:
*/
virtual void parse( const UnicodeString& text,
Calendar& cal,
- ParsePosition& pos) const;
+ ParsePosition& pos) const override;
/**
@@ -1097,7 +1097,7 @@ public:
* other classes have different class IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Set the calendar to be used by this date format. Initially, the default
@@ -1108,7 +1108,7 @@ public:
* @param calendarToAdopt Calendar object to be adopted.
* @stable ICU 2.0
*/
- virtual void adoptCalendar(Calendar* calendarToAdopt);
+ virtual void adoptCalendar(Calendar* calendarToAdopt) override;
/* Cannot use #ifndef U_HIDE_INTERNAL_API for the following methods since they are virtual */
/**
@@ -1144,7 +1144,7 @@ public:
* updated with any new status from the function.
* @stable ICU 53
*/
- virtual void setContext(UDisplayContext value, UErrorCode& status);
+ virtual void setContext(UDisplayContext value, UErrorCode& status) override;
/**
* Overrides base class method and
@@ -1153,7 +1153,7 @@ public:
* @param formatToAdopt the NumbeferFormat used
* @stable ICU 54
*/
- void adoptNumberFormat(NumberFormat *formatToAdopt);
+ void adoptNumberFormat(NumberFormat *formatToAdopt) override;
/**
* Allow the user to set the NumberFormat for several fields
@@ -1183,11 +1183,11 @@ public:
/**
* This is for ICU internal use only. Please do not use.
* Check whether the 'field' is smaller than all the fields covered in
- * pattern, return TRUE if it is. The sequence of calendar field,
+ * pattern, return true if it is. The sequence of calendar field,
* from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,...
* @param field the calendar field need to check against
- * @return TRUE if the 'field' is smaller than all the fields
- * covered in pattern. FALSE otherwise.
+ * @return true if the 'field' is smaller than all the fields
+ * covered in pattern. false otherwise.
* @internal ICU 4.0
*/
UBool isFieldUnitIgnored(UCalendarDateFields field) const;
@@ -1196,12 +1196,12 @@ public:
/**
* This is for ICU internal use only. Please do not use.
* Check whether the 'field' is smaller than all the fields covered in
- * pattern, return TRUE if it is. The sequence of calendar field,
+ * pattern, return true if it is. The sequence of calendar field,
* from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,...
* @param pattern the pattern to check against
* @param field the calendar field need to check against
- * @return TRUE if the 'field' is smaller than all the fields
- * covered in pattern. FALSE otherwise.
+ * @return true if the 'field' is smaller than all the fields
+ * covered in pattern. false otherwise.
* @internal ICU 4.0
*/
static UBool isFieldUnitIgnored(const UnicodeString& pattern,
@@ -1299,18 +1299,18 @@ private:
int32_t maxDigits) const;
/**
- * Return true if the given format character, occuring count
+ * Return true if the given format character, occurring count
* times, represents a numeric field.
*/
static UBool isNumeric(char16_t formatChar, int32_t count);
/**
- * Returns TRUE if the patternOffset is at the start of a numeric field.
+ * Returns true if the patternOffset is at the start of a numeric field.
*/
static UBool isAtNumericField(const UnicodeString &pattern, int32_t patternOffset);
/**
- * Returns TRUE if the patternOffset is right after a non-numeric field.
+ * Returns true if the patternOffset is right after a non-numeric field.
*/
static UBool isAfterNonNumericField(const UnicodeString &pattern, int32_t patternOffset);
@@ -1386,15 +1386,15 @@ private:
*
* @param pattern the pattern string
* @param patternOffset the starting offset into the pattern text. On
- * outupt will be set the offset of the first non-literal character in the pattern
+ * output will be set the offset of the first non-literal character in the pattern
* @param text the text being parsed
* @param textOffset the starting offset into the text. On output
* will be set to the offset of the character after the match
- * @param whitespaceLenient <code>TRUE</code> if whitespace parse is lenient, <code>FALSE</code> otherwise.
- * @param partialMatchLenient <code>TRUE</code> if partial match parse is lenient, <code>FALSE</code> otherwise.
- * @param oldLeniency <code>TRUE</code> if old leniency control is lenient, <code>FALSE</code> otherwise.
+ * @param whitespaceLenient <code>true</code> if whitespace parse is lenient, <code>false</code> otherwise.
+ * @param partialMatchLenient <code>true</code> if partial match parse is lenient, <code>false</code> otherwise.
+ * @param oldLeniency <code>true</code> if old leniency control is lenient, <code>false</code> otherwise.
*
- * @return <code>TRUE</code> if the literal text could be matched, <code>FALSE</code> otherwise.
+ * @return <code>true</code> if the literal text could be matched, <code>false</code> otherwise.
*/
static UBool matchLiterals(const UnicodeString &pattern, int32_t &patternOffset,
const UnicodeString &text, int32_t &textOffset,
diff --git a/contrib/libs/icu/include/unicode/sortkey.h b/contrib/libs/icu/include/unicode/sortkey.h
index 34ed7ee692..b1231f18b7 100644
--- a/contrib/libs/icu/include/unicode/sortkey.h
+++ b/contrib/libs/icu/include/unicode/sortkey.h
@@ -145,21 +145,21 @@ public:
* @return Returns true if two collation keys are equal, false otherwise.
* @stable ICU 2.0
*/
- UBool operator==(const CollationKey& source) const;
+ bool operator==(const CollationKey& source) const;
/**
* Compare if two collation keys are not the same.
* @param source the collation key to compare to.
- * @return Returns TRUE if two collation keys are different, FALSE otherwise.
+ * @return Returns true if two collation keys are different, false otherwise.
* @stable ICU 2.0
*/
- UBool operator!=(const CollationKey& source) const;
+ bool operator!=(const CollationKey& source) const;
/**
* Test to see if the key is in an invalid state. The key will be in an
* invalid state if it couldn't allocate memory for some operation.
- * @return Returns TRUE if the key is in an invalid, FALSE otherwise.
+ * @return Returns true if the key is in an invalid, false otherwise.
* @stable ICU 2.0
*/
UBool isBogus(void) const;
@@ -237,7 +237,7 @@ public:
* ICU "poor man's RTTI", returns a UClassID for the actual class.
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -316,7 +316,7 @@ private:
} fUnion;
};
-inline UBool
+inline bool
CollationKey::operator!=(const CollationKey& other) const
{
return !(*this == other);
diff --git a/contrib/libs/icu/include/unicode/strenum.h b/contrib/libs/icu/include/unicode/strenum.h
index 8601f1f7c4..1d1b37940a 100644
--- a/contrib/libs/icu/include/unicode/strenum.h
+++ b/contrib/libs/icu/include/unicode/strenum.h
@@ -149,7 +149,7 @@ public:
* and handles the conversion.
*
* @param status the error code.
- * @param resultLength a ponter to receive the length, can be NULL.
+ * @param resultLength a pointer to receive the length, can be NULL.
* @return a pointer to the string, or NULL.
*
* @stable ICU 2.4
@@ -196,18 +196,18 @@ public:
* 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;
+ virtual bool operator==(const StringEnumeration& that)const;
/**
* 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;
+ virtual bool operator!=(const StringEnumeration& that)const;
protected:
/**
diff --git a/contrib/libs/icu/include/unicode/stringpiece.h b/contrib/libs/icu/include/unicode/stringpiece.h
index 52c1e9ebd2..df7f36089d 100644
--- a/contrib/libs/icu/include/unicode/stringpiece.h
+++ b/contrib/libs/icu/include/unicode/stringpiece.h
@@ -75,12 +75,11 @@ class U_COMMON_API StringPiece : public UMemory {
* @stable ICU 4.2
*/
StringPiece(const char* str);
-#ifndef U_HIDE_DRAFT_API
#if defined(__cpp_char8_t) || defined(U_IN_DOXYGEN)
/**
* Constructs from a NUL-terminated const char8_t * pointer.
* @param str a NUL-terminated const char8_t * pointer
- * @draft ICU 67
+ * @stable ICU 67
*/
StringPiece(const char8_t* str) : StringPiece(reinterpret_cast<const char*>(str)) {}
#endif
@@ -88,10 +87,9 @@ class U_COMMON_API StringPiece : public UMemory {
* Constructs an empty StringPiece.
* Needed for type disambiguation from multiple other overloads.
* @param p nullptr
- * @draft ICU 67
+ * @stable ICU 67
*/
StringPiece(std::nullptr_t p) : ptr_(p), length_(0) {}
-#endif // U_HIDE_DRAFT_API
/**
* Constructs from a std::string.
@@ -99,19 +97,16 @@ class U_COMMON_API StringPiece : public UMemory {
*/
StringPiece(const std::string& str)
: ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { }
-#ifndef U_HIDE_DRAFT_API
#if defined(__cpp_lib_char8_t) || defined(U_IN_DOXYGEN)
/**
* Constructs from a std::u8string.
- * @draft ICU 67
+ * @stable ICU 67
*/
StringPiece(const std::u8string& str)
: ptr_(reinterpret_cast<const char*>(str.data())),
length_(static_cast<int32_t>(str.size())) { }
#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 +127,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 <typename T,
typename = typename std::enable_if<
@@ -145,7 +140,6 @@ class U_COMMON_API StringPiece : public UMemory {
StringPiece(T str)
: ptr_(reinterpret_cast<const char*>(str.data())),
length_(static_cast<int32_t>(str.size())) {}
-#endif // U_HIDE_DRAFT_API
/**
* Constructs from a const char * pointer and a specified length.
@@ -154,18 +148,16 @@ class U_COMMON_API StringPiece : public UMemory {
* @stable ICU 4.2
*/
StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { }
-#ifndef U_HIDE_DRAFT_API
#if defined(__cpp_char8_t) || defined(U_IN_DOXYGEN)
/**
* Constructs from a const char8_t * pointer and a specified length.
* @param str a const char8_t * pointer (need not be terminated)
* @param len the length of the string; must be non-negative
- * @draft ICU 67
+ * @stable ICU 67
*/
StringPiece(const char8_t* str, int32_t len) :
StringPiece(reinterpret_cast<const char*>(str), len) {}
#endif
-#endif // U_HIDE_DRAFT_API
/**
* Substring of another StringPiece.
@@ -209,7 +201,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; }
@@ -235,13 +227,12 @@ class U_COMMON_API StringPiece : public UMemory {
*/
void set(const char* str);
-#ifndef U_HIDE_DRAFT_API
#if defined(__cpp_char8_t) || defined(U_IN_DOXYGEN)
/**
* Resets the stringpiece to refer to new data.
* @param xdata pointer the new string data. Need not be NUL-terminated.
* @param len the length of the new data
- * @draft ICU 67
+ * @stable ICU 67
*/
inline void set(const char8_t* xdata, int32_t len) {
set(reinterpret_cast<const char*>(xdata), len);
@@ -250,13 +241,12 @@ class U_COMMON_API StringPiece : public UMemory {
/**
* Resets the stringpiece to refer to new data.
* @param str a pointer to a NUL-terminated string.
- * @draft ICU 67
+ * @stable ICU 67
*/
inline void set(const char8_t* str) {
set(reinterpret_cast<const char*>(str));
}
#endif
-#endif // U_HIDE_DRAFT_API
/**
* Removes the first n string units.
@@ -288,13 +278,12 @@ class U_COMMON_API StringPiece : public UMemory {
}
}
-#ifndef U_HIDE_DRAFT_API
/**
* Searches the StringPiece for the given search string (needle);
* @param needle The string for which to search.
* @param offset Where to start searching within this string (haystack).
* @return The offset of needle in haystack, or -1 if not found.
- * @draft ICU 67
+ * @stable ICU 67
*/
int32_t find(StringPiece needle, int32_t offset);
@@ -303,10 +292,9 @@ class U_COMMON_API StringPiece : public UMemory {
* similar to std::string::compare().
* @param other The string to compare to.
* @return below zero if this < other; above zero if this > other; 0 if this == other.
- * @draft ICU 67
+ * @stable ICU 67
*/
int32_t compare(StringPiece other);
-#endif // U_HIDE_DRAFT_API
/**
* Maximum integer, used as a default value for substring methods.
@@ -331,7 +319,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,10 +329,10 @@ 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) {
+inline bool operator!=(const StringPiece& x, const StringPiece& y) {
return !(x == y);
}
diff --git a/contrib/libs/icu/include/unicode/stringtriebuilder.h b/contrib/libs/icu/include/unicode/stringtriebuilder.h
index 2c47dd415b..b7a9b23d22 100644
--- a/contrib/libs/icu/include/unicode/stringtriebuilder.h
+++ b/contrib/libs/icu/include/unicode/stringtriebuilder.h
@@ -204,8 +204,8 @@ protected:
// Handles node==NULL.
static inline int32_t hashCode(const Node *node) { return node==NULL ? 0 : node->hashCode(); }
// Base class operator==() compares the actual class types.
- virtual UBool operator==(const Node &other) const;
- inline UBool operator!=(const Node &other) const { return !operator==(other); }
+ virtual bool operator==(const Node &other) const;
+ inline bool operator!=(const Node &other) const { return !operator==(other); }
/**
* Traverses the Node graph and numbers branch edges, with rightmost edges first.
* This is to avoid writing a duplicate node twice.
@@ -265,8 +265,8 @@ protected:
class FinalValueNode : public Node {
public:
FinalValueNode(int32_t v) : Node(0x111111u*37u+v), value(v) {}
- virtual UBool operator==(const Node &other) const;
- virtual void write(StringTrieBuilder &builder);
+ virtual bool operator==(const Node &other) const override;
+ virtual void write(StringTrieBuilder &builder) override;
protected:
int32_t value;
};
@@ -279,10 +279,10 @@ protected:
*/
class ValueNode : public Node {
public:
- ValueNode(int32_t initialHash) : Node(initialHash), hasValue(FALSE), value(0) {}
- virtual UBool operator==(const Node &other) const;
+ ValueNode(int32_t initialHash) : Node(initialHash), hasValue(false), value(0) {}
+ virtual bool operator==(const Node &other) const override;
void setValue(int32_t v) {
- hasValue=TRUE;
+ hasValue=true;
value=v;
hash=hash*37u+v;
}
@@ -299,9 +299,9 @@ protected:
public:
IntermediateValueNode(int32_t v, Node *nextNode)
: ValueNode(0x222222u*37u+hashCode(nextNode)), next(nextNode) { setValue(v); }
- virtual UBool operator==(const Node &other) const;
- virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
- virtual void write(StringTrieBuilder &builder);
+ virtual bool operator==(const Node &other) const override;
+ virtual int32_t markRightEdgesFirst(int32_t edgeNumber) override;
+ virtual void write(StringTrieBuilder &builder) override;
protected:
Node *next;
};
@@ -317,8 +317,8 @@ protected:
LinearMatchNode(int32_t len, Node *nextNode)
: ValueNode((0x333333u*37u+len)*37u+hashCode(nextNode)),
length(len), next(nextNode) {}
- virtual UBool operator==(const Node &other) const;
- virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
+ virtual bool operator==(const Node &other) const override;
+ virtual int32_t markRightEdgesFirst(int32_t edgeNumber) override;
protected:
int32_t length;
Node *next;
@@ -341,9 +341,9 @@ protected:
class ListBranchNode : public BranchNode {
public:
ListBranchNode() : BranchNode(0x444444), length(0) {}
- virtual UBool operator==(const Node &other) const;
- virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
- virtual void write(StringTrieBuilder &builder);
+ virtual bool operator==(const Node &other) const override;
+ virtual int32_t markRightEdgesFirst(int32_t edgeNumber) override;
+ virtual void write(StringTrieBuilder &builder) override;
// Adds a unit with a final value.
void add(int32_t c, int32_t value) {
units[length]=(char16_t)c;
@@ -376,9 +376,9 @@ protected:
: BranchNode(((0x555555u*37u+middleUnit)*37u+
hashCode(lessThanNode))*37u+hashCode(greaterOrEqualNode)),
unit(middleUnit), lessThan(lessThanNode), greaterOrEqual(greaterOrEqualNode) {}
- virtual UBool operator==(const Node &other) const;
- virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
- virtual void write(StringTrieBuilder &builder);
+ virtual bool operator==(const Node &other) const override;
+ virtual int32_t markRightEdgesFirst(int32_t edgeNumber) override;
+ virtual void write(StringTrieBuilder &builder) override;
protected:
char16_t unit;
Node *lessThan;
@@ -392,9 +392,9 @@ protected:
BranchHeadNode(int32_t len, Node *subNode)
: ValueNode((0x666666u*37u+len)*37u+hashCode(subNode)),
length(len), next(subNode) {}
- virtual UBool operator==(const Node &other) const;
- virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
- virtual void write(StringTrieBuilder &builder);
+ virtual bool operator==(const Node &other) const override;
+ virtual int32_t markRightEdgesFirst(int32_t edgeNumber) override;
+ virtual void write(StringTrieBuilder &builder) override;
protected:
int32_t length;
Node *next; // A branch sub-node.
diff --git a/contrib/libs/icu/include/unicode/stsearch.h b/contrib/libs/icu/include/unicode/stsearch.h
index fcb5dbf200..c23e651d89 100644
--- a/contrib/libs/icu/include/unicode/stsearch.h
+++ b/contrib/libs/icu/include/unicode/stsearch.h
@@ -37,7 +37,7 @@ U_NAMESPACE_BEGIN
* StringSearch ensures that language eccentricity can be
* handled, e.g. for the German collator, characters &szlig; and SS will be matched
* if case is chosen to be ignored.
- * See the <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm">
+ * See the <a href="https://htmlpreview.github.io/?https://github.com/unicode-org/icu-docs/blob/main/design/collation/ICU_collation_design.htm">
* "ICU Collation Design Document"</a> for more information.
* <p>
* There are 2 match options for selection:<br>
@@ -292,12 +292,12 @@ public:
/**
* Equality operator.
* @param that instance to be compared.
- * @return TRUE if both instances have the same attributes,
+ * @return true if both instances have the same attributes,
* breakiterators, collators and iterate over the same text
* while looking for the same pattern.
* @stable ICU 2.0
*/
- virtual UBool operator==(const SearchIterator &that) const;
+ virtual bool operator==(const SearchIterator &that) const override;
// public get and set methods ----------------------------------------
@@ -314,7 +314,7 @@ public:
* @param status for errors if it occurs
* @stable ICU 2.0
*/
- virtual void setOffset(int32_t position, UErrorCode &status);
+ virtual void setOffset(int32_t position, UErrorCode &status) override;
/**
* Return the current index in the text being searched.
@@ -324,7 +324,7 @@ public:
* @return current index in the text being searched.
* @stable ICU 2.0
*/
- virtual int32_t getOffset(void) const;
+ virtual int32_t getOffset(void) const override;
/**
* Set the target text to be searched.
@@ -337,7 +337,7 @@ public:
* U_ILLEGAL_ARGUMENT_ERROR is returned.
* @stable ICU 2.0
*/
- virtual void setText(const UnicodeString &text, UErrorCode &status);
+ virtual void setText(const UnicodeString &text, UErrorCode &status) override;
/**
* Set the target text to be searched.
@@ -353,7 +353,7 @@ public:
* U_ILLEGAL_ARGUMENT_ERROR is returned.
* @stable ICU 2.0
*/
- virtual void setText(CharacterIterator &text, UErrorCode &status);
+ virtual void setText(CharacterIterator &text, UErrorCode &status) override;
/**
* Gets the collator used for the language rules.
@@ -403,7 +403,7 @@ public:
* search will begin at the end of the text string.
* @stable ICU 2.0
*/
- virtual void reset();
+ virtual void reset() override;
/**
* Returns a copy of StringSearch with the same behavior, and
@@ -413,14 +413,14 @@ public:
* @return cloned object
* @stable ICU 2.0
*/
- virtual StringSearch * safeClone() const;
+ virtual StringSearch * safeClone() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -455,7 +455,7 @@ protected:
* USEARCH_DONE if no match was found.
* @stable ICU 2.0
*/
- virtual int32_t handleNext(int32_t position, UErrorCode &status);
+ virtual int32_t handleNext(int32_t position, UErrorCode &status) override;
/**
* Search backward for matching text, starting at a given location.
@@ -479,7 +479,7 @@ protected:
* USEARCH_DONE if no match was found.
* @stable ICU 2.0
*/
- virtual int32_t handlePrev(int32_t position, UErrorCode &status);
+ virtual int32_t handlePrev(int32_t position, UErrorCode &status) override;
private :
StringSearch(); // default constructor not implemented
diff --git a/contrib/libs/icu/include/unicode/tblcoll.h b/contrib/libs/icu/include/unicode/tblcoll.h
index f5dc135bc4..2de1af8539 100644
--- a/contrib/libs/icu/include/unicode/tblcoll.h
+++ b/contrib/libs/icu/include/unicode/tblcoll.h
@@ -99,20 +99,20 @@ class UVector64;
* table-based collation.
* <p>
* For more information about the collation service see
- * <a href="http://userguide.icu-project.org/collation">the User Guide</a>.
+ * <a href="https://unicode-org.github.io/icu/userguide/collation">the User Guide</a>.
* <p>
* Collation service provides correct sorting orders for most locales supported in ICU.
* If specific data for a locale is not available, the orders eventually falls back
* to the <a href="http://www.unicode.org/reports/tr35/tr35-collation.html#Root_Collation">CLDR root sort order</a>.
* <p>
* Sort ordering may be customized by providing your own set of rules. For more on
- * this subject see the <a href="http://userguide.icu-project.org/collation/customization">
+ * this subject see the <a href="https://unicode-org.github.io/icu/userguide/collation/customization">
* Collation Customization</a> section of the User Guide.
* <p>
* Note, RuleBasedCollator is not to be subclassed.
* @see Collator
*/
-class U_I18N_API RuleBasedCollator : public Collator {
+class U_I18N_API RuleBasedCollator U_FINAL : public Collator {
public:
/**
* RuleBasedCollator constructor. This takes the table rules and builds a
@@ -223,14 +223,14 @@ public:
* @return true if arguments is the same as this object.
* @stable ICU 2.0
*/
- virtual UBool operator==(const Collator& other) const;
+ virtual bool operator==(const Collator& other) const override;
/**
* Makes a copy of this object.
* @return a copy of this object, owned by the caller
* @stable ICU 2.0
*/
- virtual RuleBasedCollator* clone() const;
+ virtual RuleBasedCollator* clone() const override;
/**
* Creates a collation element iterator for the source string. The caller of
@@ -274,7 +274,7 @@ public:
**/
virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
/**
* Does the same thing as compare but limits the comparison to a specified
@@ -292,7 +292,7 @@ public:
virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target,
int32_t length,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
/**
* The comparison function compares the character data stored in two
@@ -312,7 +312,7 @@ public:
*/
virtual UCollationResult compare(const char16_t* source, int32_t sourceLength,
const char16_t* target, int32_t targetLength,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
/**
* Compares two strings using the Collator.
@@ -327,7 +327,7 @@ public:
*/
virtual UCollationResult compare(UCharIterator &sIter,
UCharIterator &tIter,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
/**
* Compares two UTF-8 strings using the Collator.
@@ -344,7 +344,7 @@ public:
*/
virtual UCollationResult compareUTF8(const StringPiece &source,
const StringPiece &target,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
/**
* Transforms the string into a series of characters
@@ -362,7 +362,7 @@ public:
*/
virtual CollationKey& getCollationKey(const UnicodeString& source,
CollationKey& key,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Transforms a specified region of the string into a series of characters
@@ -382,14 +382,14 @@ public:
virtual CollationKey& getCollationKey(const char16_t *source,
int32_t sourceLength,
CollationKey& key,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Generates the hash code for the rule-based collation object.
* @return the hash code.
* @stable ICU 2.0
*/
- virtual int32_t hashCode() const;
+ virtual int32_t hashCode() const override;
#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
@@ -402,7 +402,7 @@ public:
* was instantiated from rules, locale is empty.
* @deprecated ICU 2.8 likely to change in ICU 3.0, based on feedback
*/
- virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
+ virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const override;
#endif // U_FORCE_HIDE_DEPRECATED_API
/**
@@ -417,7 +417,7 @@ public:
* @param info the version # information, the result will be filled in
* @stable ICU 2.0
*/
- virtual void getVersion(UVersionInfo info) const;
+ virtual void getVersion(UVersionInfo info) const override;
#ifndef U_HIDE_DEPRECATED_API
/**
@@ -449,7 +449,7 @@ public:
* IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Returns the class ID for this class. This is useful only for comparing to
@@ -495,7 +495,7 @@ public:
* just the tailoring.
*
* getRules(void) should normally be used instead.
- * See http://userguide.icu-project.org/collation/customization#TOC-Building-on-Existing-Locales
+ * See https://unicode-org.github.io/icu/userguide/collation/customization#building-on-existing-locales
* @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES.
* @param buffer UnicodeString to store the result rules
* @stable ICU 2.2
@@ -511,7 +511,7 @@ public:
* @stable ICU 2.2
*/
virtual void setAttribute(UColAttribute attr, UColAttributeValue value,
- UErrorCode &status);
+ UErrorCode &status) override;
/**
* Universal attribute getter.
@@ -521,7 +521,7 @@ public:
* @stable ICU 2.2
*/
virtual UColAttributeValue getAttribute(UColAttribute attr,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
/**
* Sets the variable top to the top of the specified reordering group.
@@ -539,7 +539,7 @@ public:
* @see getMaxVariable
* @stable ICU 53
*/
- virtual Collator &setMaxVariable(UColReorderCode group, UErrorCode &errorCode);
+ virtual Collator &setMaxVariable(UColReorderCode group, UErrorCode &errorCode) override;
/**
* Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING.
@@ -547,7 +547,7 @@ public:
* @see setMaxVariable
* @stable ICU 53
*/
- virtual UColReorderCode getMaxVariable() const;
+ virtual UColReorderCode getMaxVariable() const override;
#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
@@ -566,7 +566,7 @@ public:
* @return variable top primary weight
* @deprecated ICU 53 Call setMaxVariable() instead.
*/
- virtual uint32_t setVariableTop(const char16_t *varTop, int32_t len, UErrorCode &status);
+ virtual uint32_t setVariableTop(const char16_t *varTop, int32_t len, UErrorCode &status) override;
/**
* Sets the variable top to the primary weight of the specified string.
@@ -583,7 +583,7 @@ public:
* @return variable top primary weight
* @deprecated ICU 53 Call setMaxVariable() instead.
*/
- virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode &status);
+ virtual uint32_t setVariableTop(const UnicodeString &varTop, UErrorCode &status) override;
/**
* Sets the variable top to the specified primary weight.
@@ -596,7 +596,7 @@ public:
* @param status error code
* @deprecated ICU 53 Call setMaxVariable() instead.
*/
- virtual void setVariableTop(uint32_t varTop, UErrorCode &status);
+ virtual void setVariableTop(uint32_t varTop, UErrorCode &status) override;
#endif // U_FORCE_HIDE_DEPRECATED_API
/**
@@ -606,7 +606,7 @@ public:
* @see getMaxVariable
* @stable ICU 2.0
*/
- virtual uint32_t getVariableTop(UErrorCode &status) const;
+ virtual uint32_t getVariableTop(UErrorCode &status) const override;
/**
* Get a UnicodeSet that contains all the characters and sequences tailored in
@@ -617,7 +617,7 @@ public:
* in the root collator. The object must be disposed of by using delete
* @stable ICU 2.4
*/
- virtual UnicodeSet *getTailoredSet(UErrorCode &status) const;
+ virtual UnicodeSet *getTailoredSet(UErrorCode &status) const override;
/**
* Get the sort key as an array of bytes from a UnicodeString.
@@ -634,7 +634,7 @@ public:
* @stable ICU 2.0
*/
virtual int32_t getSortKey(const UnicodeString& source, uint8_t *result,
- int32_t resultLength) const;
+ int32_t resultLength) const override;
/**
* Get the sort key as an array of bytes from a char16_t buffer.
@@ -653,7 +653,7 @@ public:
* @stable ICU 2.2
*/
virtual int32_t getSortKey(const char16_t *source, int32_t sourceLength,
- uint8_t *result, int32_t resultLength) const;
+ uint8_t *result, int32_t resultLength) const override;
/**
* Retrieves the reordering codes for this collator.
@@ -670,7 +670,7 @@ public:
*/
virtual int32_t getReorderCodes(int32_t *dest,
int32_t destCapacity,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
/**
* Sets the ordering of scripts for this collator.
@@ -685,7 +685,7 @@ public:
*/
virtual void setReorderCodes(const int32_t* reorderCodes,
int32_t reorderCodesLength,
- UErrorCode& status) ;
+ UErrorCode& status) override;
/**
* Implements ucol_strcollUTF8().
@@ -694,7 +694,7 @@ public:
virtual UCollationResult internalCompareUTF8(
const char *left, int32_t leftLength,
const char *right, int32_t rightLength,
- UErrorCode &errorCode) const;
+ UErrorCode &errorCode) const override;
/** Get the short definition string for a collator. This internal API harvests the collator's
* locale and the attribute set and produces a string that can be used for opening
@@ -702,7 +702,7 @@ public:
* This string will be normalized.
* The structure and the syntax of the string is defined in the "Naming collators"
* section of the users guide:
- * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme
+ * https://unicode-org.github.io/icu/userguide/collation/concepts#collator-naming-scheme
* This function supports preflighting.
*
* This is internal, and intended to be used with delegate converters.
@@ -722,7 +722,7 @@ public:
virtual int32_t internalGetShortDefinitionString(const char *locale,
char *buffer,
int32_t capacity,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
/**
* Implements ucol_nextSortKeyPart().
@@ -730,7 +730,7 @@ public:
*/
virtual int32_t internalNextSortKeyPart(
UCharIterator *iter, uint32_t state[2],
- uint8_t *dest, int32_t count, UErrorCode &errorCode) const;
+ uint8_t *dest, int32_t count, UErrorCode &errorCode) const override;
// Do not enclose the default constructor with #ifndef U_HIDE_INTERNAL_API
/**
@@ -752,7 +752,7 @@ public:
* Implements ucol_getContractionsAndExpansions().
* Gets this collator's sets of contraction strings and/or
* characters and strings that map to multiple collation elements (expansions).
- * If addPrefixes is TRUE, then contractions that are expressed as
+ * If addPrefixes is true, then contractions that are expressed as
* prefix/pre-context rules are included.
* @param contractions if not NULL, the set to hold the contractions
* @param expansions if not NULL, the set to hold the expansions
@@ -806,7 +806,7 @@ protected:
* @param actualLocale the actual locale
* @internal
*/
- virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale);
+ virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale) override;
private:
friend class CollationElementIterator;
@@ -857,7 +857,7 @@ private:
* Tests whether a character is "unsafe" for use as a collation starting point.
*
* @param c code point or code unit
- * @return TRUE if c is unsafe
+ * @return true if c is unsafe
* @see CollationElementIterator#setOffset(int)
*/
UBool isUnsafe(UChar32 c) const;
diff --git a/contrib/libs/icu/include/unicode/timezone.h b/contrib/libs/icu/include/unicode/timezone.h
index 433e3b5c46..382ad97d5b 100644
--- a/contrib/libs/icu/include/unicode/timezone.h
+++ b/contrib/libs/icu/include/unicode/timezone.h
@@ -199,16 +199,29 @@ public:
const int32_t* rawOffset,
UErrorCode& ec);
+#ifndef U_HIDE_DEPRECATED_API
/**
* Returns an enumeration over all recognized time zone IDs. (i.e.,
* all strings that createTimeZone() accepts)
*
* @return an enumeration object, owned by the caller.
- * @stable ICU 2.4
+ * @deprecated ICU 70 Use createEnumeration(UErrorCode&) instead.
*/
static StringEnumeration* U_EXPORT2 createEnumeration();
+#endif // U_HIDE_DEPRECATED_API
/**
+ * Returns an enumeration over all recognized time zone IDs. (i.e.,
+ * all strings that createTimeZone() accepts)
+ *
+ * @param status Receives the status.
+ * @return an enumeration object, owned by the caller.
+ * @stable ICU 70
+ */
+ static StringEnumeration* U_EXPORT2 createEnumeration(UErrorCode& status);
+
+#ifndef U_HIDE_DEPRECATED_API
+ /**
* Returns an enumeration over time zone IDs with a given raw
* offset from GMT. There may be several times zones with the
* same GMT offset that differ in the way they handle daylight
@@ -223,21 +236,57 @@ public:
* @param rawOffset an offset from GMT in milliseconds, ignoring
* the effect of daylight savings time, if any
* @return an enumeration object, owned by the caller
- * @stable ICU 2.4
+ * @deprecated ICU 70 Use createEnumerationForRawOffset(int32_t,UErrorCode&) instead.
*/
static StringEnumeration* U_EXPORT2 createEnumeration(int32_t rawOffset);
+#endif // U_HIDE_DEPRECATED_API
+
+ /**
+ * Returns an enumeration over time zone IDs with a given raw
+ * offset from GMT. There may be several times zones with the
+ * same GMT offset that differ in the way they handle daylight
+ * savings time. For example, the state of Arizona doesn't
+ * observe daylight savings time. If you ask for the time zone
+ * IDs corresponding to GMT-7:00, you'll get back an enumeration
+ * over two time zone IDs: "America/Denver," which corresponds to
+ * Mountain Standard Time in the winter and Mountain Daylight Time
+ * in the summer, and "America/Phoenix", which corresponds to
+ * Mountain Standard Time year-round, even in the summer.
+ *
+ * @param rawOffset an offset from GMT in milliseconds, ignoring
+ * the effect of daylight savings time, if any
+ * @param status Receives the status.
+ * @return an enumeration object, owned by the caller
+ * @stable ICU 70
+ */
+ static StringEnumeration* U_EXPORT2 createEnumerationForRawOffset(int32_t rawOffset, UErrorCode& status);
+#ifndef U_HIDE_DEPRECATED_API
/**
* Returns an enumeration over time zone IDs associated with the
- * given country. Some zones are affiliated with no country
+ * given region. Some zones are affiliated with no region
* (e.g., "UTC"); these may also be retrieved, as a group.
*
- * @param country The ISO 3166 two-letter country code, or NULL to
- * retrieve zones not affiliated with any country.
+ * @param region The ISO 3166 two-letter country code, or NULL to
+ * retrieve zones not affiliated with any region.
* @return an enumeration object, owned by the caller
- * @stable ICU 2.4
+ * @deprecated ICU 70 Use createEnumerationForRegion(const char*,UErrorCode&) instead.
*/
- static StringEnumeration* U_EXPORT2 createEnumeration(const char* country);
+ static StringEnumeration* U_EXPORT2 createEnumeration(const char* region);
+#endif // U_HIDE_DEPRECATED_API
+
+ /**
+ * Returns an enumeration over time zone IDs associated with the
+ * given region. Some zones are affiliated with no region
+ * (e.g., "UTC"); these may also be retrieved, as a group.
+ *
+ * @param region The ISO 3166 two-letter country code, or NULL to
+ * retrieve zones not affiliated with any region.
+ * @param status Receives the status.
+ * @return an enumeration object, owned by the caller
+ * @stable ICU 70
+ */
+ static StringEnumeration* U_EXPORT2 createEnumerationForRegion(const char* region, UErrorCode& status);
/**
* Returns the number of IDs in the equivalency group that
@@ -317,6 +366,19 @@ public:
*/
static TimeZone* U_EXPORT2 createDefault(void);
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * If the locale contains the timezone keyword, creates a copy of that TimeZone.
+ * Otherwise, create the default timezone.
+ *
+ * @param locale a locale which may contains 'timezone' keyword/value.
+ * @return A TimeZone. Clients are responsible for deleting the time zone
+ * object returned.
+ * @internal
+ */
+ static TimeZone* U_EXPORT2 forLocaleOrDefault(const Locale& locale);
+#endif /* U_HIDE_INTERNAL_API */
+
/**
* Sets the default time zone (i.e., what's returned by createDefault()) to be the
* specified time zone. If NULL is specified for the time zone, the default time
@@ -392,7 +454,7 @@ public:
*
* <p>This implementation utilizes <a href="http://unicode.org/cldr/charts/supplemental/zone_tzid.html">
* Zone-Tzid mapping data</a>. The mapping data is updated time to time. To get the latest changes,
- * please read the ICU user guide section <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data">
+ * please read the ICU user guide section <a href="https://unicode-org.github.io/icu/userguide/datetime/timezone#updating-the-time-zone-data">
* Updating the Time Zone Data</a>.
*
* @param id A system time zone ID.
@@ -420,7 +482,7 @@ public:
*
* <p>This implementation utilizes <a href="http://unicode.org/cldr/charts/supplemental/zone_tzid.html">
* Zone-Tzid mapping data</a>. The mapping data is updated time to time. To get the latest changes,
- * please read the ICU user guide section <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data">
+ * please read the ICU user guide section <a href="https://unicode-org.github.io/icu/userguide/datetime/timezone#updating-the-time-zone-data">
* Updating the Time Zone Data</a>.
*
* @param winid A Windows time zone ID.
@@ -441,22 +503,22 @@ public:
* IDs, but subclasses are expected to also compare the fields they add.)
*
* @param that The TimeZone object to be compared with.
- * @return True if the given TimeZone is equal to this TimeZone; false
+ * @return true if the given TimeZone is equal to this TimeZone; false
* otherwise.
* @stable ICU 2.0
*/
- virtual UBool operator==(const TimeZone& that) const;
+ virtual bool operator==(const TimeZone& that) const;
/**
* Returns true if the two TimeZones are NOT equal; that is, if operator==() returns
* false.
*
* @param that The TimeZone object to be compared with.
- * @return True if the given TimeZone is not equal to this TimeZone; false
+ * @return true if the given TimeZone is not equal to this TimeZone; false
* otherwise.
* @stable ICU 2.0
*/
- UBool operator!=(const TimeZone& that) const {return !operator==(that);}
+ bool operator!=(const TimeZone& that) const {return !operator==(that);}
/**
* Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add
@@ -696,8 +758,8 @@ public:
* there are time zones that used daylight savings time in the
* past, but no longer used currently. For example, Asia/Tokyo has
* never used daylight savings time since 1951. Most clients would
- * expect that this method to return <code>FALSE</code> for such case.
- * The default implementation of this method returns <code>TRUE</code>
+ * expect that this method to return <code>false</code> for such case.
+ * The default implementation of this method returns <code>true</code>
* when the time zone uses daylight savings time in the current
* (Gregorian) calendar year.
* <p>In Java 7, <code>observesDaylightTime()</code> was added in
@@ -777,7 +839,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const = 0;
+ virtual UClassID getDynamicClassID(void) const override = 0;
/**
* Returns the amount of time to be added to local standard time
@@ -910,11 +972,11 @@ private:
* Parses the given custom time zone identifier
* @param id id A string of the form GMT[+-]hh:mm, GMT[+-]hhmm, or
* GMT[+-]hh.
- * @param sign Receves parsed sign, 1 for positive, -1 for negative.
+ * @param sign Receives parsed sign, 1 for positive, -1 for negative.
* @param hour Receives parsed hour field
* @param minute Receives parsed minute field
* @param second Receives parsed second field
- * @return Returns TRUE when the given custom id is valid.
+ * @return Returns true when the given custom id is valid.
*/
static UBool parseCustomID(const UnicodeString& id, int32_t& sign, int32_t& hour,
int32_t& minute, int32_t& second);
@@ -937,8 +999,8 @@ private:
* @param hour offset hours
* @param min offset minutes
* @param sec offset seconds
- * @param negative sign of the offset, TRUE for negative offset.
- * @param id Receves the format result (normalized custom ID)
+ * @param negative sign of the offset, true for negative offset.
+ * @param id Receives the format result (normalized custom ID)
* @return The reference to id
*/
static UnicodeString& formatCustomID(int32_t hour, int32_t min, int32_t sec,
diff --git a/contrib/libs/icu/include/unicode/tmunit.h b/contrib/libs/icu/include/unicode/tmunit.h
index 2e949ddfbd..24abb49f19 100644
--- a/contrib/libs/icu/include/unicode/tmunit.h
+++ b/contrib/libs/icu/include/unicode/tmunit.h
@@ -73,7 +73,7 @@ public:
* Override clone.
* @stable ICU 4.2
*/
- virtual TimeUnit* clone() const;
+ virtual TimeUnit* clone() const override;
/**
* Copy operator.
@@ -95,7 +95,7 @@ public:
* different class IDs.
* @stable ICU 4.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
/**
* Returns the class ID for this class. This is used to compare to
diff --git a/contrib/libs/icu/include/unicode/tmutamt.h b/contrib/libs/icu/include/unicode/tmutamt.h
index 8bcc684d3a..88e892fb0c 100644
--- a/contrib/libs/icu/include/unicode/tmutamt.h
+++ b/contrib/libs/icu/include/unicode/tmutamt.h
@@ -39,7 +39,7 @@ public:
/**
* Construct TimeUnitAmount object with the given number and the
* given time unit.
- * @param number a numeric object; number.isNumeric() must be TRUE
+ * @param number a numeric object; number.isNumeric() must be true
* @param timeUnitField the time unit field of a time unit
* @param status the input-output error code.
* If the number is not numeric or the timeUnitField
@@ -87,7 +87,7 @@ public:
* @return a polymorphic clone of this object. The result will have the same class as returned by getDynamicClassID().
* @stable ICU 4.2
*/
- virtual TimeUnitAmount* clone() const;
+ virtual TimeUnitAmount* clone() const override;
/**
@@ -103,7 +103,7 @@ public:
* @return true if this object is equal to the given object.
* @stable ICU 4.2
*/
- virtual UBool operator==(const UObject& other) const;
+ virtual bool operator==(const UObject& other) const;
/**
@@ -112,7 +112,7 @@ public:
* @return true if this object is not equal to the given object.
* @stable ICU 4.2
*/
- UBool operator!=(const UObject& other) const;
+ bool operator!=(const UObject& other) const;
/**
@@ -140,7 +140,7 @@ public:
* other classes have different class IDs.
* @stable ICU 4.2
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
@@ -160,7 +160,7 @@ public:
-inline UBool
+inline bool
TimeUnitAmount::operator!=(const UObject& other) const {
return !operator==(other);
}
diff --git a/contrib/libs/icu/include/unicode/tmutfmt.h b/contrib/libs/icu/include/unicode/tmutfmt.h
index ad871f7c09..02e0563a01 100644
--- a/contrib/libs/icu/include/unicode/tmutfmt.h
+++ b/contrib/libs/icu/include/unicode/tmutfmt.h
@@ -126,7 +126,7 @@ public:
* @return A copy of the object.
* @deprecated ICU 53
*/
- virtual TimeUnitFormat* clone() const;
+ virtual TimeUnitFormat* clone() const override;
/**
* Assignment operator
@@ -135,15 +135,6 @@ public:
TimeUnitFormat& operator=(const TimeUnitFormat& other);
/**
- * Return true if the given Format objects are not semantically equal.
- * Objects of different subclasses are considered unequal.
- * @param other the object to be compared with.
- * @return true if the given Format objects are not semantically equal.
- * @deprecated ICU 53
- */
- UBool operator!=(const Format& other) const;
-
- /**
* Set the locale used for formatting or parsing.
* @param locale the locale to be set
* @param status output param set to success/failure code on exit
@@ -167,7 +158,7 @@ public:
*/
virtual void parseObject(const UnicodeString& source,
Formattable& result,
- ParsePosition& pos) const;
+ ParsePosition& pos) const override;
/**
* Return the class ID for this class. This is useful only for comparing to
@@ -193,7 +184,7 @@ public:
* other classes have different class IDs.
* @deprecated ICU 53
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
private:
Hashtable* fTimeUnitToCountToPatterns[TimeUnit::UTIMEUNIT_FIELD_COUNT];
@@ -236,11 +227,6 @@ private:
friend struct TimeUnitFormatReadSink;
};
-inline UBool
-TimeUnitFormat::operator!=(const Format& other) const {
- return !operator==(other);
-}
-
U_NAMESPACE_END
#endif /* U_HIDE_DEPRECATED_API */
diff --git a/contrib/libs/icu/include/unicode/translit.h b/contrib/libs/icu/include/unicode/translit.h
index fe2568d50a..56eb6448ca 100644
--- a/contrib/libs/icu/include/unicode/translit.h
+++ b/contrib/libs/icu/include/unicode/translit.h
@@ -18,7 +18,7 @@
/**
* \file
- * \brief C++ API: Tranforms text from one format to another.
+ * \brief C++ API: Transforms text from one format to another.
*/
#if !UCONFIG_NO_TRANSLITERATION
@@ -157,7 +157,7 @@ class TransliteratorIDParser;
* transliterator <b>B</b> decrements character values, then <b>A</b>
* is an inverse of <b>B</b> and vice versa. If we compose <b>A</b>
* with <b>B</b> in a compound transliterator, the result is the
- * indentity transliterator, that is, a transliterator that does not
+ * identity transliterator, that is, a transliterator that does not
* change its input text.
*
* The <code>Transliterator</code> method <code>getInverse()</code>
@@ -219,7 +219,7 @@ class TransliteratorIDParser;
* acts a template; future calls to {@link #createInstance } with the ID
* of the registered object return clones of that object. Thus any
* object passed to <tt>registerInstance()</tt> must implement
- * <tt>clone()</tt> propertly. To register a transliterator subclass
+ * <tt>clone()</tt> properly. To register a transliterator subclass
* without instantiating it (until it is needed), users may call
* {@link #registerFactory }. In this case, the objects are
* instantiated by invoking the zero-argument public constructor of
@@ -317,7 +317,7 @@ class TransliteratorIDParser;
* replacement. The cursor is the point in the text at which the
* next replacement, if any, will be applied. The cursor is usually
* placed within the replacement text; however, it can actually be
- * placed into the precending or following context by using the
+ * placed into the preceding or following context by using the
* special character '@'. Examples:
*
* <pre>
@@ -375,7 +375,7 @@ class TransliteratorIDParser;
*
* <p>It is also possible to match the beginning or the end of the text using a <code>UnicodeSet</code>.
* This is done by including a virtual anchor character '<code>$</code>' at the end of the
- * set pattern. Although this is usually the match chafacter for the end anchor, the set will
+ * set pattern. Although this is usually the match character for the end anchor, the set will
* match either the beginning or the end of the text, depending on its placement. For
* example:
*
@@ -683,8 +683,8 @@ public:
* unambiguous transliterations. After the last call to this
* method, there may be untransliterated text that is waiting for
* more input to resolve an ambiguity. In order to perform these
- * pending transliterations, clients should call {@link
- * #finishTransliteration } after the last call to this
+ * pending transliterations, clients should call
+ * {@link #finishTransliteration } after the last call to this
* method has been made.
*
* @param text the buffer holding transliterated and untransliterated text
@@ -741,8 +741,7 @@ public:
/**
* Transliterates the portion of the text buffer that can be
* transliterated unambiguosly. This is a convenience method; see
- * {@link
- * #transliterate(Replaceable&, UTransPosition&, const UnicodeString&, UErrorCode&) const }
+ * {@link #transliterate(Replaceable&, UTransPosition&, const UnicodeString&, UErrorCode&) const }
* for details.
* @param text the buffer holding transliterated and
* untransliterated text
@@ -761,8 +760,7 @@ public:
* <code>transliterate()</code>.
* @param text the buffer holding transliterated and
* untransliterated text.
- * @param index the array of indices previously passed to {@link
- * #transliterate }
+ * @param index the array of indices previously passed to {@link #transliterate }
* @stable ICU 2.0
*/
virtual void finishTransliteration(Replaceable& text,
@@ -882,8 +880,8 @@ public:
* another transliterator.
* @param text the text to be transliterated
* @param index the position indices
- * @param incremental if TRUE, then assume more characters may be inserted
- * at index.limit, and postpone processing to accomodate future incoming
+ * @param incremental if true, then assume more characters may be inserted
+ * at index.limit, and postpone processing to accommodate future incoming
* characters
* @stable ICU 2.4
*/
@@ -897,14 +895,14 @@ private:
* Top-level transliteration method, handling filtering, incremental and
* non-incremental transliteration, and rollback. All transliteration
* public API methods eventually call this method with a rollback argument
- * of TRUE. Other entities may call this method but rollback should be
- * FALSE.
+ * of true. Other entities may call this method but rollback should be
+ * false.
*
* <p>If this transliterator has a filter, break up the input text into runs
* of unfiltered characters. Pass each run to
* subclass.handleTransliterate().
*
- * <p>In incremental mode, if rollback is TRUE, perform a special
+ * <p>In incremental mode, if rollback is true, perform a special
* incremental procedure in which several passes are made over the input
* text, adding one character at a time, and committing successful
* transliterations as they occur. Unsuccessful transliterations are rolled
@@ -912,12 +910,12 @@ private:
*
* @param text the text to be transliterated
* @param index the position indices
- * @param incremental if TRUE, then assume more characters may be inserted
- * at index.limit, and postpone processing to accomodate future incoming
+ * @param incremental if true, then assume more characters may be inserted
+ * at index.limit, and postpone processing to accommodate future incoming
* characters
- * @param rollback if TRUE and if incremental is TRUE, then perform special
+ * @param rollback if true and if incremental is true, then perform special
* incremental processing, as described above, and undo partial
- * transliterations where necessary. If incremental is FALSE then this
+ * transliterations where necessary. If incremental is false then this
* parameter is ignored.
*/
virtual void filteredTransliterate(Replaceable& text,
@@ -968,8 +966,8 @@ public:
/**
* Returns a name for this transliterator that is appropriate for
- * display to the user in the default locale. See {@link
- * #getDisplayName } for details.
+ * display to the user in the default locale. See {@link #getDisplayName }
+ * for details.
* @param ID the string identifier for this transliterator
* @param result Output param to receive the display name
* @return A reference to 'result'.
@@ -1063,7 +1061,7 @@ public:
*
* @param ID a valid ID, as enumerated by <code>getAvailableIDs()</code>
* @param dir either FORWARD or REVERSE.
- * @param parseError Struct to recieve information on position
+ * @param parseError Struct to receive information on position
* of error if an error is encountered
* @param status Output param to filled in with a success or an error.
* @return A <code>Transliterator</code> object with the given ID
@@ -1119,7 +1117,7 @@ public:
* to recreate this transliterator.
* @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.
@@ -1168,8 +1166,8 @@ public:
* input text by this Transliterator. This incorporates this
* object's current filter; if the filter is changed, the return
* value of this function will change. The default implementation
- * returns an empty set. Some subclasses may override {@link
- * #handleGetSourceSet } to return a more precise result. The
+ * returns an empty set. Some subclasses may override
+ * {@link #handleGetSourceSet } to return a more precise result. The
* return result is approximate in any case and is intended for
* use by tests, tools, or utilities.
* @param result receives result set; previous contents lost
@@ -1382,7 +1380,7 @@ public:
* Return a registered source specifier.
* @param index which specifier to return, from 0 to n-1, where
* n = countAvailableSources()
- * @param result fill-in paramter to receive the source specifier.
+ * @param result fill-in parameter to receive the source specifier.
* If index is out of range, result will be empty.
* @return reference to result
* @stable ICU 2.0
@@ -1405,7 +1403,7 @@ public:
* @param index which specifier to return, from 0 to n-1, where
* n = countAvailableTargets(source)
* @param source the source specifier
- * @param result fill-in paramter to receive the target specifier.
+ * @param result fill-in parameter to receive the target specifier.
* If source is invalid or if index is out of range, result will
* be empty.
* @return reference to result
@@ -1432,7 +1430,7 @@ public:
* n = countAvailableVariants(source, target)
* @param source the source specifier
* @param target the target specifier
- * @param result fill-in paramter to receive the variant
+ * @param result fill-in parameter to receive the variant
* specifier. If source is invalid or if target is invalid or if
* index is out of range, result will be empty.
* @return reference to result
@@ -1529,7 +1527,7 @@ public:
* different class IDs.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const = 0;
+ virtual UClassID getDynamicClassID(void) const override = 0;
private:
static UBool initializeRegistry(UErrorCode &status);
diff --git a/contrib/libs/icu/include/unicode/tzfmt.h b/contrib/libs/icu/include/unicode/tzfmt.h
index 6d3863b1e5..6db8477026 100644
--- a/contrib/libs/icu/include/unicode/tzfmt.h
+++ b/contrib/libs/icu/include/unicode/tzfmt.h
@@ -295,11 +295,11 @@ public:
* Return true if the given Format objects are semantically equal.
* Objects of different subclasses are considered unequal.
* @param other The object to be compared with.
- * @return Return TRUE if the given Format objects are semantically equal.
+ * @return Return true if the given Format objects are semantically equal.
* Objects of different subclasses are considered unequal.
* @stable ICU 50
*/
- virtual UBool operator==(const Format& other) const;
+ virtual bool operator==(const Format& other) const override;
/**
* Clone this object polymorphically. The caller is responsible
@@ -307,7 +307,7 @@ public:
* @return A copy of the object
* @stable ICU 50
*/
- virtual TimeZoneFormat* clone() const;
+ virtual TimeZoneFormat* clone() const override;
/**
* Creates an instance of <code>TimeZoneFormat</code> for the given locale.
@@ -327,7 +327,7 @@ public:
const TimeZoneNames* getTimeZoneNames() const;
/**
- * Sets the time zone display name data to this format instnace.
+ * Sets the time zone display name data to this format instance.
* The caller should not delete the TimeZoenNames object after it is adopted
* by this call.
* @param tznames TimeZoneNames object to be adopted.
@@ -336,7 +336,7 @@ public:
void adoptTimeZoneNames(TimeZoneNames *tznames);
/**
- * Sets the time zone display name data to this format instnace.
+ * Sets the time zone display name data to this format instance.
* @param tznames TimeZoneNames object to be set.
* @stable ICU 50
*/
@@ -355,7 +355,7 @@ public:
* Sets the localized GMT format pattern. The pattern must contain
* a single argument {0}, for example "GMT {0}".
* @param pattern The localized GMT format pattern to be used by this object.
- * @param status Recieves the status.
+ * @param status Receives the status.
* @see #getGMTPattern
* @stable ICU 50
*/
@@ -437,7 +437,7 @@ public:
* Sets the default parse options.
* <p><b>Note</b>: By default, an instance of <code>TimeZoneFormat</code>
* created by {@link #createInstance} has no parse options set (UTZFMT_PARSE_OPTION_NONE).
- * To specify multipe options, use bitwise flags of UTimeZoneFormatParseOption.
+ * To specify multiple options, use bitwise flags of UTimeZoneFormatParseOption.
* @see #UTimeZoneFormatParseOption
* @stable ICU 50
*/
@@ -590,7 +590,7 @@ public:
* @param text The text contains a time zone string at the position.
* @param style The format style
* @param pos The position.
- * @param parseOptions The parse options repesented by bitwise flags of UTimeZoneFormatParseOption.
+ * @param parseOptions The parse options represented by bitwise flags of UTimeZoneFormatParseOption.
* @param timeType The output argument for receiving the time type (standard/daylight/unknown),
* or NULL if the information is not necessary.
* @return A <code>TimeZone</code>, or null if the input could not be parsed.
@@ -636,7 +636,7 @@ public:
* @stable ICU 50
*/
virtual UnicodeString& format(const Formattable& obj, UnicodeString& appendTo,
- FieldPosition& pos, UErrorCode& status) const;
+ FieldPosition& pos, UErrorCode& status) const override;
/**
* Parse a string to produce an object. This methods handles parsing of
@@ -650,7 +650,7 @@ public:
* delete it when done.
* @stable ICU 50
*/
- virtual void parseObject(const UnicodeString& source, Formattable& result, ParsePosition& parse_pos) const;
+ virtual void parseObject(const UnicodeString& source, Formattable& result, ParsePosition& parse_pos) const override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
@@ -662,7 +662,7 @@ public:
* ICU "poor man's RTTI", returns a UClassID for the actual class.
* @stable ICU 50
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
protected:
/**
@@ -814,7 +814,7 @@ private:
* @param str the string
* @param codeArray receives the result
* @param capacity the capacity of codeArray
- * @return TRUE when the specified code array is fully filled with code points
+ * @return true when the specified code array is fully filled with code points
* (no under/overflow).
*/
static UBool toCodePoints(const UnicodeString& str, UChar32* codeArray, int32_t capacity);
@@ -849,8 +849,8 @@ private:
* @param text the text contains ISO 8601 style time zone string (e.g. "-08:00", "Z")
* at the position.
* @param pos the position, non-negative error index will be set on failure.
- * @param extendedOnly TRUE if parsing the text as ISO 8601 extended offset format (e.g. "-08:00"),
- * or FALSE to evaluate the text as basic format.
+ * @param extendedOnly true if parsing the text as ISO 8601 extended offset format (e.g. "-08:00"),
+ * or false to evaluate the text as basic format.
* @param hasDigitOffset receiving if the parsed zone string contains offset digits.
* @return the offset from GMT(UTC) in milliseconds for the given ISO 8601 style
* time zone string.
@@ -1058,7 +1058,7 @@ private:
* Returns the time zone ID of a match at the specified index within
* the MatchInfoCollection.
* @param matches the collection of matches
- * @param idx the index withing matches
+ * @param idx the index within matches
* @param tzID receives the resolved time zone ID
* @return a reference to tzID.
*/
diff --git a/contrib/libs/icu/include/unicode/tznames.h b/contrib/libs/icu/include/unicode/tznames.h
index 860494221d..b32e9562d5 100644
--- a/contrib/libs/icu/include/unicode/tznames.h
+++ b/contrib/libs/icu/include/unicode/tznames.h
@@ -139,19 +139,19 @@ public:
/**
* Return true if the given TimeZoneNames objects are semantically equal.
* @param other the object to be compared with.
- * @return Return TRUE if the given Format objects are semantically equal.
+ * @return Return true if the given Format objects are semantically equal.
* @stable ICU 50
*/
- virtual UBool operator==(const TimeZoneNames& other) const = 0;
+ virtual bool operator==(const TimeZoneNames& other) const = 0;
/**
* Return true if the given TimeZoneNames objects are not semantically
* equal.
* @param other the object to be compared with.
- * @return Return TRUE if the given Format objects are not semantically equal.
+ * @return Return true if the given Format objects are not semantically equal.
* @stable ICU 50
*/
- UBool operator!=(const TimeZoneNames& other) const { return !operator==(other); }
+ bool operator!=(const TimeZoneNames& other) const { return !operator==(other); }
/**
* Clone this object polymorphically. The caller is responsible
@@ -193,7 +193,7 @@ public:
/**
* Returns an enumeration of all available meta zone IDs used by the given time zone.
- * @param tzID The canoical tiem zone ID.
+ * @param tzID The canonical time zone ID.
* @param status Receives the status.
* @return an enumeration object, owned by the caller.
* @stable ICU 50
@@ -373,7 +373,7 @@ public:
* Gets the zone ID of a match at the specified index.
* @param idx The index
* @param tzID Receives the zone ID.
- * @return TRUE if the zone ID was set to tzID.
+ * @return true if the zone ID was set to tzID.
* @internal
*/
UBool getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const;
@@ -382,7 +382,7 @@ public:
* Gets the metazone ID of a match at the specified index.
* @param idx The index
* @param mzID Receives the metazone ID
- * @return TRUE if the meta zone ID was set to mzID.
+ * @return true if the meta zone ID was set to mzID.
* @internal
*/
UBool getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const;
diff --git a/contrib/libs/icu/include/unicode/tzrule.h b/contrib/libs/icu/include/unicode/tzrule.h
index 795806d90f..ab0b97b6fd 100644
--- a/contrib/libs/icu/include/unicode/tzrule.h
+++ b/contrib/libs/icu/include/unicode/tzrule.h
@@ -56,7 +56,7 @@ public:
* @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
* @stable ICU 3.8
*/
- virtual UBool operator==(const TimeZoneRule& that) const;
+ virtual bool operator==(const TimeZoneRule& that) const;
/**
* Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
@@ -65,7 +65,7 @@ public:
* @return true if the given <code>TimeZoneRule</code> objects are semantically unequal.
* @stable ICU 3.8
*/
- virtual UBool operator!=(const TimeZoneRule& that) const;
+ virtual bool operator!=(const TimeZoneRule& that) const;
/**
* Fills in "name" with the name of this time zone.
@@ -231,7 +231,7 @@ public:
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual InitialTimeZoneRule* clone() const;
+ virtual InitialTimeZoneRule* clone() const override;
/**
* Assignment operator.
@@ -247,7 +247,7 @@ public:
* @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
* @stable ICU 3.8
*/
- virtual UBool operator==(const TimeZoneRule& that) const;
+ virtual bool operator==(const TimeZoneRule& that) const override;
/**
* Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
@@ -256,7 +256,7 @@ public:
* @return true if the given <code>TimeZoneRule</code> objects are semantically unequal.
* @stable ICU 3.8
*/
- virtual UBool operator!=(const TimeZoneRule& that) const;
+ virtual bool operator!=(const TimeZoneRule& that) const override;
/**
* Gets the time when this rule takes effect in the given year.
@@ -280,7 +280,7 @@ public:
* @return true if the other <code>TimeZoneRule</code> is equivalent to this one.
* @stable ICU 3.8
*/
- virtual UBool isEquivalentTo(const TimeZoneRule& that) const;
+ virtual UBool isEquivalentTo(const TimeZoneRule& that) const override;
/**
* Gets the very first time when this rule takes effect.
@@ -293,7 +293,7 @@ public:
* "result" is unchanged.
* @stable ICU 3.8
*/
- virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const;
+ virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const override;
/**
* Gets the final time when this rule takes effect.
@@ -306,7 +306,7 @@ public:
* "result" is unchanged.
* @stable ICU 3.8
*/
- virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const;
+ virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const override;
/**
* Gets the first time when this rule takes effect after the specified time.
@@ -323,7 +323,7 @@ public:
* @stable ICU 3.8
*/
virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings,
- UBool inclusive, UDate& result) const;
+ UBool inclusive, UDate& result) const override;
/**
* Gets the most recent time when this rule takes effect before the specified time.
@@ -340,7 +340,7 @@ public:
* @stable ICU 3.8
*/
virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings,
- UBool inclusive, UDate& result) const;
+ UBool inclusive, UDate& result) const override;
public:
/**
@@ -367,12 +367,12 @@ public:
* other classes have different class IDs.
* @stable ICU 3.8
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
};
/**
* <code>AnnualTimeZoneRule</code> is a class used for representing a time zone
- * rule which takes effect annually. The calenday system used for the rule is
+ * rule which takes effect annually. The calendar system used for the rule is
* is based on Gregorian calendar
*
* @stable ICU 3.8
@@ -442,7 +442,7 @@ public:
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual AnnualTimeZoneRule* clone() const;
+ virtual AnnualTimeZoneRule* clone() const override;
/**
* Assignment operator.
@@ -458,7 +458,7 @@ public:
* @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
* @stable ICU 3.8
*/
- virtual UBool operator==(const TimeZoneRule& that) const;
+ virtual bool operator==(const TimeZoneRule& that) const override;
/**
* Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
@@ -467,7 +467,7 @@ public:
* @return true if the given <code>TimeZoneRule</code> objects are semantically unequal.
* @stable ICU 3.8
*/
- virtual UBool operator!=(const TimeZoneRule& that) const;
+ virtual bool operator!=(const TimeZoneRule& that) const override;
/**
* Gets the start date/time rule used by this rule.
@@ -515,7 +515,7 @@ public:
* @return true if the other <code>TimeZoneRule</code> is equivalent to this one.
* @stable ICU 3.8
*/
- virtual UBool isEquivalentTo(const TimeZoneRule& that) const;
+ virtual UBool isEquivalentTo(const TimeZoneRule& that) const override;
/**
* Gets the very first time when this rule takes effect.
@@ -528,7 +528,7 @@ public:
* "result" is unchanged.
* @stable ICU 3.8
*/
- virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const;
+ virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const override;
/**
* Gets the final time when this rule takes effect.
@@ -541,7 +541,7 @@ public:
* "result" is unchanged.
* @stable ICU 3.8
*/
- virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const;
+ virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const override;
/**
* Gets the first time when this rule takes effect after the specified time.
@@ -558,7 +558,7 @@ public:
* @stable ICU 3.8
*/
virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings,
- UBool inclusive, UDate& result) const;
+ UBool inclusive, UDate& result) const override;
/**
* Gets the most recent time when this rule takes effect before the specified time.
@@ -575,7 +575,7 @@ public:
* @stable ICU 3.8
*/
virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings,
- UBool inclusive, UDate& result) const;
+ UBool inclusive, UDate& result) const override;
private:
@@ -608,7 +608,7 @@ public:
* other classes have different class IDs.
* @stable ICU 3.8
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
};
/**
@@ -658,7 +658,7 @@ public:
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual TimeArrayTimeZoneRule* clone() const;
+ virtual TimeArrayTimeZoneRule* clone() const override;
/**
* Assignment operator.
@@ -674,7 +674,7 @@ public:
* @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
* @stable ICU 3.8
*/
- virtual UBool operator==(const TimeZoneRule& that) const;
+ virtual bool operator==(const TimeZoneRule& that) const override;
/**
* Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
@@ -683,7 +683,7 @@ public:
* @return true if the given <code>TimeZoneRule</code> objects are semantically unequal.
* @stable ICU 3.8
*/
- virtual UBool operator!=(const TimeZoneRule& that) const;
+ virtual bool operator!=(const TimeZoneRule& that) const override;
/**
* Gets the time type of the start times used by this rule. The return value
@@ -721,7 +721,7 @@ public:
* @return true if the other <code>TimeZoneRule</code> is equivalent to this one.
* @stable ICU 3.8
*/
- virtual UBool isEquivalentTo(const TimeZoneRule& that) const;
+ virtual UBool isEquivalentTo(const TimeZoneRule& that) const override;
/**
* Gets the very first time when this rule takes effect.
@@ -734,7 +734,7 @@ public:
* "result" is unchanged.
* @stable ICU 3.8
*/
- virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const;
+ virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const override;
/**
* Gets the final time when this rule takes effect.
@@ -747,7 +747,7 @@ public:
* "result" is unchanged.
* @stable ICU 3.8
*/
- virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const;
+ virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const override;
/**
* Gets the first time when this rule takes effect after the specified time.
@@ -764,7 +764,7 @@ public:
* @stable ICU 3.8
*/
virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings,
- UBool inclusive, UDate& result) const;
+ UBool inclusive, UDate& result) const override;
/**
* Gets the most recent time when this rule takes effect before the specified time.
@@ -781,7 +781,7 @@ public:
* @stable ICU 3.8
*/
virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings,
- UBool inclusive, UDate& result) const;
+ UBool inclusive, UDate& result) const override;
private:
@@ -819,7 +819,7 @@ public:
* other classes have different class IDs.
* @stable ICU 3.8
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
};
diff --git a/contrib/libs/icu/include/unicode/tztrans.h b/contrib/libs/icu/include/unicode/tztrans.h
index 217d711eec..5adbeb35e4 100644
--- a/contrib/libs/icu/include/unicode/tztrans.h
+++ b/contrib/libs/icu/include/unicode/tztrans.h
@@ -86,7 +86,7 @@ public:
* @return true if the given TimeZoneTransition objects are semantically equal.
* @stable ICU 3.8
*/
- UBool operator==(const TimeZoneTransition& that) const;
+ bool operator==(const TimeZoneTransition& that) const;
/**
* Return true if the given TimeZoneTransition objects are semantically unequal. Objects
@@ -95,7 +95,7 @@ public:
* @return true if the given TimeZoneTransition objects are semantically unequal.
* @stable ICU 3.8
*/
- UBool operator!=(const TimeZoneTransition& that) const;
+ bool operator!=(const TimeZoneTransition& that) const;
/**
* Returns the time of transition in milliseconds.
@@ -187,7 +187,7 @@ public:
* other classes have different class IDs.
* @stable ICU 3.8
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/include/unicode/ubidi.h b/contrib/libs/icu/include/unicode/ubidi.h
index f4875c8801..536f4172bc 100644
--- a/contrib/libs/icu/include/unicode/ubidi.h
+++ b/contrib/libs/icu/include/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
@@ -81,7 +84,7 @@
*
* <pre>
* \code
- *#include "unicode/ubidi.h"
+ *#include <unicode/ubidi.h>
*
*typedef enum {
* styleNormal=0, styleSelected=1,
@@ -133,11 +136,11 @@
* int styleLimit;
*
* for(i=0; i<styleRunCount; ++i) {
- * styleLimit=styleRun[i].limit;
+ * styleLimit=styleRuns[i].limit;
* if(start<styleLimit) {
* if(styleLimit>limit) { styleLimit=limit; }
* renderRun(text, start, styleLimit,
- * direction, styleRun[i].style);
+ * direction, styleRuns[i].style);
* if(styleLimit==limit) { break; }
* start=styleLimit;
* }
@@ -147,14 +150,14 @@
*
* for(i=styleRunCount-1; i>=0; --i) {
* if(i>0) {
- * styleStart=styleRun[i-1].limit;
+ * styleStart=styleRuns[i-1].limit;
* } else {
* styleStart=0;
* }
* if(limit>=styleStart) {
* if(styleStart<start) { styleStart=start; }
* renderRun(text, styleStart, limit,
- * direction, styleRun[i].style);
+ * direction, styleRuns[i].style);
* if(styleStart==start) { break; }
* limit=styleStart;
* }
@@ -165,7 +168,8 @@
* // the line object represents text[start..limit-1]
* void renderLine(UBiDi *line, const UChar *text,
* int32_t start, int32_t limit,
- * const StyleRun *styleRuns, int styleRunCount) {
+ * const StyleRun *styleRuns, int styleRunCount,
+ * UErrorCode *pErrorCode) {
* UBiDiDirection direction=ubidi_getDirection(line);
* if(direction!=UBIDI_MIXED) {
* // unidirectional
@@ -180,14 +184,14 @@
* int32_t count, i, length;
* UBiDiLevel level;
*
- * count=ubidi_countRuns(para, pErrorCode);
+ * count=ubidi_countRuns(line, pErrorCode);
* if(U_SUCCESS(*pErrorCode)) {
* if(styleRunCount<=1) {
* Style style=styleRuns[0].style;
*
* // iterate over directional runs
* for(i=0; i<count; ++i) {
- * direction=ubidi_getVisualRun(para, i, &start, &length);
+ * direction=ubidi_getVisualRun(line, i, &start, &length);
* renderRun(text, start, start+length, direction, style);
* }
* } else {
@@ -241,7 +245,7 @@
* startLine(paraLevel, width);
*
* renderLine(para, text, 0, length,
- * styleRuns, styleRunCount);
+ * styleRuns, styleRunCount, pErrorCode);
* } else {
* UBiDi *line;
*
@@ -265,7 +269,7 @@
*
* renderLine(line, text, start, limit,
* styleRuns+styleRunStart,
- * styleRunLimit-styleRunStart);
+ * styleRunLimit-styleRunStart, pErrorCode);
* }
* if(limit==length) { break; }
* start=limit;
@@ -496,7 +500,7 @@ typedef struct UBiDi UBiDi;
* @return An empty <code>UBiDi</code> object.
* @stable ICU 2.0
*/
-U_STABLE UBiDi * U_EXPORT2
+U_CAPI UBiDi * U_EXPORT2
ubidi_open(void);
/**
@@ -533,7 +537,7 @@ ubidi_open(void);
* @return An empty <code>UBiDi</code> 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 +560,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 +598,7 @@ U_NAMESPACE_END
* this "inverse Bidi" and that the current implementation provides only an
* approximation of "inverse Bidi".</p>
*
- * <p>With <code>isInverse</code> set to <code>TRUE</code>,
+ * <p>With <code>isInverse</code> set to <code>true</code>,
* 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 +611,12 @@ U_NAMESPACE_END
* the runs of the logically ordered output.</p>
*
* <p>Calling this function with argument <code>isInverse</code> set to
- * <code>TRUE</code> is equivalent to calling
+ * <code>true</code> is equivalent to calling
* <code>ubidi_setReorderingMode</code> with argument
* <code>reorderingMode</code>
* set to <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.<br>
* Calling this function with argument <code>isInverse</code> set to
- * <code>FALSE</code> is equivalent to calling
+ * <code>false</code> is equivalent to calling
* <code>ubidi_setReorderingMode</code> with argument
* <code>reorderingMode</code>
* set to <code>#UBIDI_REORDER_DEFAULT</code>.
@@ -626,18 +630,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?
* <p>Note: calling this function after setting the reordering mode with
- * <code>ubidi_setReorderingMode</code> will return <code>TRUE</code> if the
+ * <code>ubidi_setReorderingMode</code> will return <code>true</code> if the
* reordering mode was set to <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>,
- * <code>FALSE</code> for all other values.</p>
+ * <code>false</code> for all other values.</p>
*
* @param pBiDi is a <code>UBiDi</code> 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 +649,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 +672,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 +680,13 @@ ubidi_orderParagraphsLTR(UBiDi *pBiDi, UBool orderParagraphsLTR);
* successive paragraphs progress from left to right?
*
* @param pBiDi is a <code>UBiDi</code> 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 +718,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 <code>ubidi_setInverse(TRUE)</code>.
+ * (same algorithm as selected by <code>ubidi_setInverse(true)</code>.
* @see ubidi_setInverse
* @stable ICU 3.6 */
UBIDI_REORDER_INVERSE_NUMBERS_AS_L,
@@ -833,7 +837,7 @@ typedef enum UBiDiReorderingMode {
* reordered sequence (the option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> can
* be used with function <code>ubidi_writeReordered</code> to this end. This
* mode is equivalent to calling <code>ubidi_setInverse()</code> with
- * argument <code>isInverse</code> set to <code>TRUE</code>.</li>
+ * argument <code>isInverse</code> set to <code>true</code>.</li>
*
* <li>When the reordering mode is set to
* <code>#UBIDI_REORDER_INVERSE_LIKE_DIRECT</code>, the "direct" Logical to Visual
@@ -886,7 +890,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 +901,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 +939,7 @@ typedef enum UBiDiReorderingOption {
*
* <p>If this option is set in conjunction with reordering mode
* <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> or with calling
- * <code>ubidi_setInverse(TRUE)</code>, it implies
+ * <code>ubidi_setInverse(true)</code>, it implies
* option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code>
* in calls to function <code>ubidi_writeReordered()</code>.</p>
*
@@ -1016,7 +1020,7 @@ typedef enum UBiDiReorderingOption {
*
* <p>When the <code>UBIDI_OPTION_STREAMING</code> option is used,
* it is recommended to call <code>ubidi_orderParagraphsLTR()</code> with
- * argument <code>orderParagraphsLTR</code> set to <code>TRUE</code> before
+ * argument <code>orderParagraphsLTR</code> set to <code>true</code> before
* calling <code>ubidi_setPara</code> so that later paragraphs may be
* concatenated to previous paragraphs on the right.</p>
*
@@ -1042,7 +1046,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 +1057,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 +1144,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 +1232,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 +1283,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 +1304,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 +1334,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 +1348,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 +1359,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 +1377,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 +1388,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 +1425,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 +1457,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 +1477,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 +1498,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 +1525,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 +1544,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 +1603,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 +1644,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 +1679,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 +1722,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 +1758,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 +1781,7 @@ ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode);
* The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>.
* @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 +1804,7 @@ ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap
* The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>.
* @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 +1839,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 +1944,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 +1974,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 +2032,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 +2062,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 +2079,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 +2147,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 +2199,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/contrib/libs/icu/include/unicode/ubiditransform.h b/contrib/libs/icu/include/unicode/ubiditransform.h
index 5c08ed5df0..2dd7564010 100644
--- a/contrib/libs/icu/include/unicode/ubiditransform.h
+++ b/contrib/libs/icu/include/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 <code>ubidi_setPara</code> with
* <code>paraLevel == UBIDI_DEFAULT_RTL</code>,</li>
* <li><Visual LTR, Logical LTR>: this is equivalent to
- * calling <code>ubidi_setInverse(UBiDi*, TRUE)</code> and then
+ * calling <code>ubidi_setInverse(UBiDi*, true)</code> and then
* <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_LTR</code>,</li>
* <li><Visual LTR, Logical RTL>: this is equivalent to
- * calling <code>ubidi_setInverse(UBiDi*, TRUE)</code> and then
+ * calling <code>ubidi_setInverse(UBiDi*, true)</code> and then
* <code>ubidi_setPara</code> with <code>paraLevel == UBIDI_RTL</code>.</li>
* </ul>
* 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 <code>UBiDiTransform</code> object.
* @stable ICU 58
*/
-U_STABLE UBiDiTransform* U_EXPORT2
+U_CAPI UBiDiTransform* U_EXPORT2
ubiditransform_open(UErrorCode *pErrorCode);
/**
* Deallocates the given <code>UBiDiTransform</code> 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/contrib/libs/icu/include/unicode/ubrk.h b/contrib/libs/icu/include/unicode/ubrk.h
index 73c1553b24..c603f7c13f 100644
--- a/contrib/libs/icu/include/unicode/ubrk.h
+++ b/contrib/libs/icu/include/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.
@@ -91,7 +94,7 @@
* <p>
* Code snippets illustrating the use of the Break Iterator APIs
* are available in the ICU User Guide,
- * http://icu-project.org/userguide/boundaryAnalysis.html
+ * https://unicode-org.github.io/icu/userguide/boundaryanalysis/
* and in the sample program icu/source/samples/break/break.cpp
*/
@@ -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,11 +291,13 @@ 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);
+#ifndef U_HIDE_DEPRECATED_API
+
/**
* Thread safe cloning operation
* @param bi iterator to be cloned
@@ -309,15 +314,32 @@ ubrk_openBinaryRules(const uint8_t *binaryRules, int32_t rulesLength,
* @param status to indicate whether the operation went on smoothly or there were errors
* An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any allocations were necessary.
* @return pointer to the new clone
- * @stable ICU 2.0
+ * @deprecated ICU 69 Use ubrk_clone() instead.
*/
-U_STABLE UBreakIterator * U_EXPORT2
+U_CAPI UBreakIterator * U_EXPORT2
ubrk_safeClone(
const UBreakIterator *bi,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status);
+#endif /* U_HIDE_DEPRECATED_API */
+
+#ifndef U_HIDE_DRAFT_API
+
+/**
+ * Thread safe cloning operation.
+ * @param bi iterator to be cloned
+ * @param status to indicate whether the operation went on smoothly or there were errors
+ * @return pointer to the new clone
+ * @draft ICU 69
+ */
+U_CAPI UBreakIterator * U_EXPORT2
+ubrk_clone(const UBreakIterator *bi,
+ UErrorCode *status);
+
+#endif // U_HIDE_DRAFT_API
+
#ifndef U_HIDE_DEPRECATED_API
/**
@@ -334,7 +356,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 +390,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 +414,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 +429,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 +441,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 +453,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 +463,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 +475,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 +487,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 +500,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 +513,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 +524,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 +537,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 +549,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 +569,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 +581,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 +609,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 +640,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/contrib/libs/icu/include/unicode/ucal.h b/contrib/libs/icu/include/unicode/ucal.h
index c198450ba2..94abae8391 100644
--- a/contrib/libs/icu/include/unicode/ucal.h
+++ b/contrib/libs/icu/include/unicode/ucal.h
@@ -13,7 +13,10 @@
#include "unicode/utypes.h"
#include "unicode/uenum.h"
#include "unicode/uloc.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
@@ -32,7 +35,7 @@
*
* <p>
* Types of <code>UCalendar</code> interpret a <code>UDate</code>
- * according to the rules of a specific calendar system. The U_STABLE
+ * according to the rules of a specific calendar system. The C API
* provides the enum UCalendarType with UCAL_TRADITIONAL and
* UCAL_GREGORIAN.
* <p>
@@ -584,7 +587,7 @@ typedef enum USystemTimeZoneType USystemTimeZoneType;
* *ec will indicate the error.
* @stable ICU 4.8
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* region,
const int32_t* rawOffset, UErrorCode* ec);
@@ -599,7 +602,7 @@ ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* region,
*
* @stable ICU 2.6
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
ucal_openTimeZones(UErrorCode* ec);
/**
@@ -618,7 +621,7 @@ ucal_openTimeZones(UErrorCode* ec);
*
* @stable ICU 2.6
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
ucal_openCountryTimeZones(const char* country, UErrorCode* ec);
/**
@@ -644,7 +647,7 @@ ucal_openCountryTimeZones(const char* country, UErrorCode* ec);
*
* @stable ICU 2.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getDefaultTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec);
/**
@@ -656,11 +659,9 @@ ucal_getDefaultTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec);
*
* @stable ICU 2.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_setDefaultTimeZone(const UChar* zoneID, UErrorCode* ec);
-#ifndef U_HIDE_DRAFT_API
-
/**
* Return the current host time zone. The host time zone is detected from
* the current host system configuration by querying the host operating
@@ -688,13 +689,11 @@ ucal_setDefaultTimeZone(const UChar* zoneID, UErrorCode* ec);
*
* @see #UCAL_UNKNOWN_ZONE_ID
*
- * @draft ICU 65
+ * @stable ICU 65
*/
-U_DRAFT int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getHostTimeZone(UChar *result, int32_t resultCapacity, UErrorCode *ec);
-#endif // U_HIDE_DRAFT_API
-
/**
* Return the amount of time in milliseconds that the clock is
* advanced during daylight savings time for the given time zone, or
@@ -711,7 +710,7 @@ ucal_getHostTimeZone(UChar *result, int32_t resultCapacity, UErrorCode *ec);
*
* @stable ICU 2.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getDSTSavings(const UChar* zoneID, UErrorCode* ec);
/**
@@ -720,7 +719,7 @@ ucal_getDSTSavings(const UChar* zoneID, UErrorCode* ec);
* @return The current date and time.
* @stable ICU 2.0
*/
-U_STABLE UDate U_EXPORT2
+U_CAPI UDate U_EXPORT2
ucal_getNow(void);
/**
@@ -746,7 +745,7 @@ ucal_getNow(void);
* @see #UCAL_UNKNOWN_ZONE_ID
* @stable ICU 2.0
*/
-U_STABLE UCalendar* U_EXPORT2
+U_CAPI UCalendar* U_EXPORT2
ucal_open(const UChar* zoneID,
int32_t len,
const char* locale,
@@ -759,7 +758,7 @@ ucal_open(const UChar* zoneID,
* @param cal The UCalendar to close.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_close(UCalendar *cal);
#if U_SHOW_CPLUSPLUS_API
@@ -789,7 +788,7 @@ U_NAMESPACE_END
* @return A pointer to a UCalendar identical to cal.
* @stable ICU 4.0
*/
-U_STABLE UCalendar* U_EXPORT2
+U_CAPI UCalendar* U_EXPORT2
ucal_clone(const UCalendar* cal,
UErrorCode* status);
@@ -802,7 +801,7 @@ ucal_clone(const UCalendar* cal,
* @param status A pointer to an UErrorCode to receive any errors.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_setTimeZone(UCalendar* cal,
const UChar* zoneID,
int32_t len,
@@ -818,7 +817,7 @@ ucal_setTimeZone(UCalendar* cal,
* @return The total buffer size needed; if greater than resultLength, the output was truncated.
* @stable ICU 51
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getTimeZoneID(const UCalendar *cal,
UChar *result,
int32_t resultLength,
@@ -855,7 +854,7 @@ typedef enum UCalendarDisplayNameType UCalendarDisplayNameType;
* @return The total buffer size needed; if greater than resultLength, the output was truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getTimeZoneDisplayName(const UCalendar* cal,
UCalendarDisplayNameType type,
const char* locale,
@@ -868,10 +867,10 @@ ucal_getTimeZoneDisplayName(const UCalendar* cal,
* Daylight savings time is not used in all parts of the world.
* @param cal The UCalendar to query.
* @param status A pointer to an UErrorCode to receive any errors
- * @return TRUE if cal is currently in daylight savings time, FALSE otherwise
+ * @return true if cal is currently in daylight savings time, false otherwise
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucal_inDaylightTime(const UCalendar* cal,
UErrorCode* status );
@@ -895,7 +894,7 @@ ucal_inDaylightTime(const UCalendar* cal,
* @see ucal_getGregorianChange
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode);
/**
@@ -918,7 +917,7 @@ ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode);
* @see ucal_setGregorianChange
* @stable ICU 3.6
*/
-U_STABLE UDate U_EXPORT2
+U_CAPI UDate U_EXPORT2
ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode);
/**
@@ -999,7 +998,7 @@ typedef enum UCalendarWallTimeOption UCalendarWallTimeOption;
* @see ucal_setAttribute
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getAttribute(const UCalendar* cal,
UCalendarAttribute attr);
@@ -1014,7 +1013,7 @@ ucal_getAttribute(const UCalendar* cal,
* @see ucal_getAttribute
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_setAttribute(UCalendar* cal,
UCalendarAttribute attr,
int32_t newValue);
@@ -1028,7 +1027,7 @@ ucal_setAttribute(UCalendar* cal,
* @see ucal_countAvailable
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
ucal_getAvailable(int32_t localeIndex);
/**
@@ -1039,7 +1038,7 @@ ucal_getAvailable(int32_t localeIndex);
* @see ucal_getAvailable
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_countAvailable(void);
/**
@@ -1053,7 +1052,7 @@ ucal_countAvailable(void);
* @see ucal_setDateTime
* @stable ICU 2.0
*/
-U_STABLE UDate U_EXPORT2
+U_CAPI UDate U_EXPORT2
ucal_getMillis(const UCalendar* cal,
UErrorCode* status);
@@ -1068,7 +1067,7 @@ ucal_getMillis(const UCalendar* cal,
* @see ucal_setDateTime
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_setMillis(UCalendar* cal,
UDate dateTime,
UErrorCode* status );
@@ -1087,7 +1086,7 @@ ucal_setMillis(UCalendar* cal,
* @see ucal_setDateTime
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_setDate(UCalendar* cal,
int32_t year,
int32_t month,
@@ -1111,7 +1110,7 @@ ucal_setDate(UCalendar* cal,
* @see ucal_setDate
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_setDateTime(UCalendar* cal,
int32_t year,
int32_t month,
@@ -1122,15 +1121,15 @@ ucal_setDateTime(UCalendar* cal,
UErrorCode* status);
/**
- * Returns TRUE if two UCalendars are equivalent. Equivalent
+ * Returns true if two UCalendars are equivalent. Equivalent
* UCalendars will behave identically, but they may be set to
* different times.
* @param cal1 The first of the UCalendars to compare.
* @param cal2 The second of the UCalendars to compare.
- * @return TRUE if cal1 and cal2 are equivalent, FALSE otherwise.
+ * @return true if cal1 and cal2 are equivalent, false otherwise.
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucal_equivalentTo(const UCalendar* cal1,
const UCalendar* cal2);
@@ -1152,7 +1151,7 @@ ucal_equivalentTo(const UCalendar* cal1,
* @see ucal_roll
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_add(UCalendar* cal,
UCalendarDateFields field,
int32_t amount,
@@ -1182,7 +1181,7 @@ ucal_add(UCalendar* cal,
* @see ucal_add
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_roll(UCalendar* cal,
UCalendarDateFields field,
int32_t amount,
@@ -1204,7 +1203,7 @@ ucal_roll(UCalendar* cal,
* @see ucal_clear
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_get(const UCalendar* cal,
UCalendarDateFields field,
UErrorCode* status );
@@ -1224,7 +1223,7 @@ ucal_get(const UCalendar* cal,
* @see ucal_clear
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_set(UCalendar* cal,
UCalendarDateFields field,
int32_t value);
@@ -1237,14 +1236,14 @@ ucal_set(UCalendar* cal,
* UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK,
* UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND,
* UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET.
- * @return TRUE if field is set, FALSE otherwise.
+ * @return true if field is set, false otherwise.
* @see ucal_get
* @see ucal_set
* @see ucal_clearField
* @see ucal_clear
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucal_isSet(const UCalendar* cal,
UCalendarDateFields field);
@@ -1262,7 +1261,7 @@ ucal_isSet(const UCalendar* cal,
* @see ucal_clear
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_clearField(UCalendar* cal,
UCalendarDateFields field);
@@ -1276,7 +1275,7 @@ ucal_clearField(UCalendar* cal,
* @see ucal_clearField
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucal_clear(UCalendar* calendar);
/**
@@ -1290,7 +1289,7 @@ enum UCalendarLimitType {
UCAL_MAXIMUM,
/** Greatest minimum value */
UCAL_GREATEST_MINIMUM,
- /** Leaest maximum value */
+ /** Least maximum value */
UCAL_LEAST_MAXIMUM,
/** Actual minimum value */
UCAL_ACTUAL_MINIMUM,
@@ -1315,7 +1314,7 @@ typedef enum UCalendarLimitType UCalendarLimitType;
* @return The requested value.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getLimit(const UCalendar* cal,
UCalendarDateFields field,
UCalendarLimitType type,
@@ -1328,7 +1327,7 @@ ucal_getLimit(const UCalendar* cal,
* @return the locale name
* @stable ICU 2.8
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode* status);
/**
@@ -1337,7 +1336,7 @@ ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode*
* @return the version string, such as "2007f"
* @stable ICU 3.8
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucal_getTZDataVersion(UErrorCode* status);
/**
@@ -1358,7 +1357,7 @@ ucal_getTZDataVersion(UErrorCode* status);
* null.
* @stable ICU 4.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status);
/**
@@ -1368,7 +1367,7 @@ ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
* @return The resource keyword value string.
* @stable ICU 4.2
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucal_getType(const UCalendar *cal, UErrorCode* status);
/**
@@ -1387,7 +1386,7 @@ ucal_getType(const UCalendar *cal, UErrorCode* status);
* @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
ucal_getKeywordValuesForLocale(const char* key,
const char* locale,
UBool commonlyUsed,
@@ -1442,7 +1441,7 @@ typedef enum UCalendarWeekdayType UCalendarWeekdayType;
* @return The UCalendarWeekdayType for the day of the week.
* @stable ICU 4.4
*/
-U_STABLE UCalendarWeekdayType U_EXPORT2
+U_CAPI UCalendarWeekdayType U_EXPORT2
ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status);
/**
@@ -1460,20 +1459,20 @@ ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErro
* @return The milliseconds after midnight at which the weekend begins or ends.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status);
/**
- * Returns TRUE if the given UDate is in the weekend in
+ * Returns true if the given UDate is in the weekend in
* this calendar system.
* @param cal The UCalendar to query.
* @param date The UDate in question.
* @param status The error code for the operation.
- * @return TRUE if the given UDate is in the weekend in
- * this calendar system, FALSE otherwise.
+ * @return true if the given UDate is in the weekend in
+ * this calendar system, false otherwise.
* @stable ICU 4.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
/**
@@ -1500,7 +1499,7 @@ ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
* @return The date difference for the specified field.
* @stable ICU 4.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getFieldDifference(UCalendar* cal,
UDate target,
UCalendarDateFields field,
@@ -1544,17 +1543,17 @@ typedef enum UTimeZoneTransitionType UTimeZoneTransitionType; /**< @stable ICU 5
* the calendar's current date, in the time zone to which the calendar
* is currently set. If there is no known time zone transition of the
* requested type relative to the calendar's date, the function returns
-* FALSE.
+* false.
* @param cal The UCalendar to query.
* @param type The type of transition desired.
* @param transition A pointer to a UDate to be set to the transition time.
-* If the function returns FALSE, the value set is unspecified.
+* If the function returns false, the value set is unspecified.
* @param status A pointer to a UErrorCode to receive any errors.
-* @return TRUE if a valid transition time is set in *transition, FALSE
+* @return true if a valid transition time is set in *transition, false
* otherwise.
* @stable ICU 50
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType type,
UDate* transition, UErrorCode* status);
@@ -1569,7 +1568,7 @@ ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType typ
*
* <p>This implementation utilizes <a href="http://unicode.org/cldr/charts/supplemental/zone_tzid.html">
* Zone-Tzid mapping data</a>. The mapping data is updated time to time. To get the latest changes,
-* please read the ICU user guide section <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data">
+* please read the ICU user guide section <a href="https://unicode-org.github.io/icu/userguide/datetime/timezone#updating-the-time-zone-data">
* Updating the Time Zone Data</a>.
*
* @param id A system time zone ID.
@@ -1582,7 +1581,7 @@ ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType typ
*
* @stable ICU 52
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getWindowsTimeZoneID(const UChar* id, int32_t len,
UChar* winid, int32_t winidCapacity, UErrorCode* status);
@@ -1600,7 +1599,7 @@ ucal_getWindowsTimeZoneID(const UChar* id, int32_t len,
*
* <p>This implementation utilizes <a href="http://unicode.org/cldr/charts/supplemental/zone_tzid.html">
* Zone-Tzid mapping data</a>. The mapping data is updated time to time. To get the latest changes,
-* please read the ICU user guide section <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data">
+* please read the ICU user guide section <a href="https://unicode-org.github.io/icu/userguide/datetime/timezone#updating-the-time-zone-data">
* Updating the Time Zone Data</a>.
*
* @param winid A Windows time zone ID.
@@ -1614,10 +1613,113 @@ ucal_getWindowsTimeZoneID(const UChar* id, int32_t len,
*
* @stable ICU 52
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucal_getTimeZoneIDForWindowsID(const UChar* winid, int32_t len, const char* region,
UChar* id, int32_t idCapacity, UErrorCode* status);
+#ifndef U_FORCE_HIDE_DRAFT_API
+/**
+ * Options used by ucal_getTimeZoneOffsetFromLocal and BasicTimeZone::getOffsetFromLocal()
+ * to specify how to interpret an input time when it does not exist, or when it is ambiguous,
+ * around a time zone transition.
+ * @draft ICU 69
+ */
+enum UTimeZoneLocalOption {
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * An input time is always interpreted as local time before
+ * a time zone transition.
+ * @draft ICU 69
+ */
+ UCAL_TZ_LOCAL_FORMER = 0x04,
+ /**
+ * An input time is always interpreted as local time after
+ * a time zone transition.
+ * @draft ICU 69
+ */
+ UCAL_TZ_LOCAL_LATTER = 0x0C,
+ /**
+ * An input time is interpreted as standard time when local
+ * time is switched to/from daylight saving time. When both
+ * sides of a time zone transition are standard time,
+ * or daylight saving time, the local time before the
+ * transition is used.
+ * @draft ICU 69
+ */
+ UCAL_TZ_LOCAL_STANDARD_FORMER = UCAL_TZ_LOCAL_FORMER | 0x01,
+ /**
+ * An input time is interpreted as standard time when local
+ * time is switched to/from daylight saving time. When both
+ * sides of a time zone transition are standard time,
+ * or daylight saving time, the local time after the
+ * transition is used.
+ * @draft ICU 69
+ */
+ UCAL_TZ_LOCAL_STANDARD_LATTER = UCAL_TZ_LOCAL_LATTER | 0x01,
+ /**
+ * An input time is interpreted as daylight saving time when
+ * local time is switched to/from standard time. When both
+ * sides of a time zone transition are standard time,
+ * or daylight saving time, the local time before the
+ * transition is used.
+ * @draft ICU 69
+ */
+ UCAL_TZ_LOCAL_DAYLIGHT_FORMER = UCAL_TZ_LOCAL_FORMER | 0x03,
+ /**
+ * An input time is interpreted as daylight saving time when
+ * local time is switched to/from standard time. When both
+ * sides of a time zone transition are standard time,
+ * or daylight saving time, the local time after the
+ * transition is used.
+ * @draft ICU 69
+ */
+ UCAL_TZ_LOCAL_DAYLIGHT_LATTER = UCAL_TZ_LOCAL_LATTER | 0x03,
+#else /* U_HIDE_DRAFT_API */
+ /**
+ * Dummy value to prevent empty enum if U_HIDE_DRAFT_API.
+ * This will go away when draft conditionals are removed.
+ * @internal
+ */
+ UCAL_TZ_LOCAL_NONE = 0,
+#endif /* U_HIDE_DRAFT_API */
+};
+typedef enum UTimeZoneLocalOption UTimeZoneLocalOption; /**< @draft ICU 69 */
+
+/**
+* Returns the time zone raw and GMT offset for the given moment
+* in time. Upon return, local-millis = GMT-millis + rawOffset +
+* dstOffset. All computations are performed in the proleptic
+* Gregorian calendar.
+*
+* @param cal The UCalendar which specify the local date and time value to query.
+* @param nonExistingTimeOpt The option to indicate how to interpret the date and
+* time in the calendar represent a local time that skipped at a positive time
+* zone transitions (e.g. when the daylight saving time starts or the time zone
+* offset is increased due to a time zone rule change).
+* @param duplicatedTimeOpt The option to indicate how to interpret the date and
+* time in the calendar represent a local time that repeating multiple times at a
+* negative time zone transition (e.g. when the daylight saving time ends or the
+* time zone offset is decreased due to a time zone rule change)
+* @param rawOffset output parameter to receive the raw offset, that
+* is, the offset not including DST adjustments.
+* If the status is set to one of the error code, the value set is unspecified.
+* @param dstOffset output parameter to receive the DST offset,
+* that is, the offset to be added to `rawOffset' to obtain the
+* total offset between local and GMT time. If DST is not in
+* effect, this value is zero; otherwise it is a positive value,
+* typically one hour.
+* If the status is set to one of the error code, the value set is unspecified.
+* @param status A pointer to a UErrorCode to receive any errors.
+* @draft ICU 69
+*/
+U_CAPI void U_EXPORT2
+ucal_getTimeZoneOffsetFromLocal(
+ const UCalendar* cal,
+ UTimeZoneLocalOption nonExistingTimeOpt,
+ UTimeZoneLocalOption duplicatedTimeOpt,
+ int32_t* rawOffset, int32_t* dstOffset, UErrorCode* status);
+#endif /* U_FORCE_HIDE_DRAFT_API */
+
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif
diff --git a/contrib/libs/icu/include/unicode/ucasemap.h b/contrib/libs/icu/include/unicode/ucasemap.h
index 6b253e3d63..d1c1b483ab 100644
--- a/contrib/libs/icu/include/unicode/ucasemap.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/ucat.h b/contrib/libs/icu/include/unicode/ucat.h
index 4d1ff3f6b2..93850348ff 100644
--- a/contrib/libs/icu/include/unicode/ucat.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/uchar.h b/contrib/libs/icu/include/unicode/uchar.h
index 3b55b2326d..253e6db173 100644
--- a/contrib/libs/icu/include/unicode/uchar.h
+++ b/contrib/libs/icu/include/unicode/uchar.h
@@ -60,7 +60,7 @@ U_CDECL_BEGIN
* @see u_getUnicodeVersion
* @stable ICU 2.0
*/
-#define U_UNICODE_VERSION "13.0"
+#define U_UNICODE_VERSION "14.0"
/**
* \file
@@ -77,10 +77,10 @@ U_CDECL_BEGIN
*
* For more information see
* "About the Unicode Character Database" (http://www.unicode.org/ucd/)
- * and the ICU User Guide chapter on Properties (http://icu-project.org/userguide/properties.html).
+ * and the ICU User Guide chapter on Properties (https://unicode-org.github.io/icu/userguide/strings/properties).
*
* 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
@@ -483,12 +483,63 @@ typedef enum UProperty {
* @stable ICU 62
*/
UCHAR_EXTENDED_PICTOGRAPHIC=64,
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Binary property of strings Basic_Emoji.
+ * See https://www.unicode.org/reports/tr51/#Emoji_Sets
+ *
+ * @draft ICU 70
+ */
+ UCHAR_BASIC_EMOJI=65,
+ /**
+ * Binary property of strings Emoji_Keycap_Sequence.
+ * See https://www.unicode.org/reports/tr51/#Emoji_Sets
+ *
+ * @draft ICU 70
+ */
+ UCHAR_EMOJI_KEYCAP_SEQUENCE=66,
+ /**
+ * Binary property of strings RGI_Emoji_Modifier_Sequence.
+ * See https://www.unicode.org/reports/tr51/#Emoji_Sets
+ *
+ * @draft ICU 70
+ */
+ UCHAR_RGI_EMOJI_MODIFIER_SEQUENCE=67,
+ /**
+ * Binary property of strings RGI_Emoji_Flag_Sequence.
+ * See https://www.unicode.org/reports/tr51/#Emoji_Sets
+ *
+ * @draft ICU 70
+ */
+ UCHAR_RGI_EMOJI_FLAG_SEQUENCE=68,
+ /**
+ * Binary property of strings RGI_Emoji_Tag_Sequence.
+ * See https://www.unicode.org/reports/tr51/#Emoji_Sets
+ *
+ * @draft ICU 70
+ */
+ UCHAR_RGI_EMOJI_TAG_SEQUENCE=69,
+ /**
+ * Binary property of strings RGI_Emoji_ZWJ_Sequence.
+ * See https://www.unicode.org/reports/tr51/#Emoji_Sets
+ *
+ * @draft ICU 70
+ */
+ UCHAR_RGI_EMOJI_ZWJ_SEQUENCE=70,
+ /**
+ * Binary property of strings RGI_Emoji.
+ * See https://www.unicode.org/reports/tr51/#Emoji_Sets
+ *
+ * @draft ICU 70
+ */
+ UCHAR_RGI_EMOJI=71,
+#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the last constant for binary Unicode properties.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- UCHAR_BINARY_LIMIT,
+ UCHAR_BINARY_LIMIT=72,
#endif // U_HIDE_DEPRECATED_API
/** Enumerated property Bidi_Class.
@@ -1807,6 +1858,33 @@ enum UBlockCode {
/** @stable ICU 66 */
UBLOCK_YEZIDI = 308, /*[10E80]*/
+ // New blocks in Unicode 14.0
+
+ /** @stable ICU 70 */
+ UBLOCK_ARABIC_EXTENDED_B = 309, /*[0870]*/
+ /** @stable ICU 70 */
+ UBLOCK_CYPRO_MINOAN = 310, /*[12F90]*/
+ /** @stable ICU 70 */
+ UBLOCK_ETHIOPIC_EXTENDED_B = 311, /*[1E7E0]*/
+ /** @stable ICU 70 */
+ UBLOCK_KANA_EXTENDED_B = 312, /*[1AFF0]*/
+ /** @stable ICU 70 */
+ UBLOCK_LATIN_EXTENDED_F = 313, /*[10780]*/
+ /** @stable ICU 70 */
+ UBLOCK_LATIN_EXTENDED_G = 314, /*[1DF00]*/
+ /** @stable ICU 70 */
+ UBLOCK_OLD_UYGHUR = 315, /*[10F70]*/
+ /** @stable ICU 70 */
+ UBLOCK_TANGSA = 316, /*[16A70]*/
+ /** @stable ICU 70 */
+ UBLOCK_TOTO = 317, /*[1E290]*/
+ /** @stable ICU 70 */
+ UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A = 318, /*[11AB0]*/
+ /** @stable ICU 70 */
+ UBLOCK_VITHKUQI = 319, /*[10570]*/
+ /** @stable ICU 70 */
+ UBLOCK_ZNAMENNY_MUSICAL_NOTATION = 320, /*[1CF00]*/
+
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UBlockCode value.
@@ -1814,7 +1892,7 @@ enum UBlockCode {
*
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- UBLOCK_COUNT = 309,
+ UBLOCK_COUNT = 321,
#endif // U_HIDE_DEPRECATED_API
/** @stable ICU 2.0 */
@@ -2106,6 +2184,9 @@ typedef enum UJoiningGroup {
U_JG_HANIFI_ROHINGYA_KINNA_YA, /**< @stable ICU 62 */
U_JG_HANIFI_ROHINGYA_PA, /**< @stable ICU 62 */
+ U_JG_THIN_YEH, /**< @stable ICU 70 */
+ U_JG_VERTICAL_TAIL, /**< @stable ICU 70 */
+
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UJoiningGroup value.
@@ -2585,10 +2666,10 @@ 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<UCHAR_BINARY_LIMIT.
- * @return TRUE or FALSE according to the binary Unicode property value for c.
- * Also FALSE if 'which' is out of bounds or if the Unicode version
- * does not have data for the property at all, or not for this code point.
+ * Must be UCHAR_BINARY_START&lt;=which&lt;UCHAR_BINARY_LIMIT.
+ * @return true or false according to the binary Unicode property value for c.
+ * Also false if 'which' is out of bounds or if the Unicode version
+ * does not have data for the property at all.
*
* @see UProperty
* @see u_getBinaryPropertySet
@@ -2596,9 +2677,40 @@ typedef enum UVerticalOrientation {
* @see u_getUnicodeVersion
* @stable ICU 2.1
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_hasBinaryProperty(UChar32 c, UProperty which);
+#ifndef U_HIDE_DRAFT_API
+
+/**
+ * Returns true if the property is true for the string.
+ * Same as u_hasBinaryProperty(single code point, which)
+ * if the string contains exactly one code point.
+ *
+ * Most properties apply only to single code points.
+ * <a href="https://www.unicode.org/reports/tr51/#Emoji_Sets">UTS #51 Unicode Emoji</a>
+ * defines several properties of strings.
+ *
+ * @param s String to test.
+ * @param length Length of the string, or negative if NUL-terminated.
+ * @param which UProperty selector constant, identifies which binary property to check.
+ * Must be UCHAR_BINARY_START&lt;=which&lt;UCHAR_BINARY_LIMIT.
+ * @return true or false according to the binary Unicode property value for the string.
+ * Also false if 'which' is out of bounds or if the Unicode version
+ * does not have data for the property at all.
+ *
+ * @see UProperty
+ * @see u_hasBinaryProperty
+ * @see u_getBinaryPropertySet
+ * @see u_getIntPropertyValue
+ * @see u_getUnicodeVersion
+ * @draft ICU 70
+ */
+U_CAPI UBool U_EXPORT2
+u_stringHasBinaryProperty(const UChar *s, int32_t length, UProperty which);
+
+#endif // U_HIDE_DRAFT_API
+
/**
* Returns a frozen USet for a binary property.
* The library retains ownership over the returned object.
@@ -2629,7 +2741,7 @@ u_getBinaryPropertySet(UProperty property, UErrorCode *pErrorCode);
* @see u_hasBinaryProperty
* @stable ICU 2.1
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isUAlphabetic(UChar32 c);
/**
@@ -2644,7 +2756,7 @@ u_isUAlphabetic(UChar32 c);
* @see u_hasBinaryProperty
* @stable ICU 2.1
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isULowercase(UChar32 c);
/**
@@ -2659,7 +2771,7 @@ u_isULowercase(UChar32 c);
* @see u_hasBinaryProperty
* @stable ICU 2.1
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isUUppercase(UChar32 c);
/**
@@ -2680,7 +2792,7 @@ u_isUUppercase(UChar32 c);
* @see u_hasBinaryProperty
* @stable ICU 2.1
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isUWhiteSpace(UChar32 c);
/**
@@ -2708,7 +2820,7 @@ u_isUWhiteSpace(UChar32 c);
* for enumerated properties, corresponds to the numeric value of the enumerated
* constant of the respective property value enumeration type
* (cast to enum type if necessary).
- * Returns 0 or 1 (for FALSE/TRUE) for binary Unicode properties.
+ * Returns 0 or 1 (for false/true) for binary Unicode properties.
* Returns a bit-mask for mask properties.
* Returns 0 if 'which' is out of bounds or if the Unicode version
* does not have data for the property at all, or not for this code point.
@@ -2721,7 +2833,7 @@ u_isUWhiteSpace(UChar32 c);
* @see u_getUnicodeVersion
* @stable ICU 2.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_getIntPropertyValue(UChar32 c, UProperty which);
/**
@@ -2742,7 +2854,7 @@ u_getIntPropertyValue(UChar32 c, UProperty which);
* @see u_getIntPropertyValue
* @stable ICU 2.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_getIntPropertyMinValue(UProperty which);
/**
@@ -2754,7 +2866,7 @@ u_getIntPropertyMinValue(UProperty which);
*
* - UCHAR_BIDI_CLASS: 0/18 (U_LEFT_TO_RIGHT/U_BOUNDARY_NEUTRAL)
* - UCHAR_SCRIPT: 0/45 (USCRIPT_COMMON/USCRIPT_TAGBANWA)
- * - UCHAR_IDEOGRAPHIC: 0/1 (FALSE/TRUE)
+ * - UCHAR_IDEOGRAPHIC: 0/1 (false/true)
*
* For undefined UProperty constant values, min/max values will be 0/-1.
*
@@ -2771,7 +2883,7 @@ u_getIntPropertyMinValue(UProperty which);
* @see u_getIntPropertyValue
* @stable ICU 2.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_getIntPropertyMaxValue(UProperty which);
/**
@@ -2814,7 +2926,7 @@ u_getIntPropertyMap(UProperty property, UErrorCode *pErrorCode);
* @see U_NO_NUMERIC_VALUE
* @stable ICU 2.2
*/
-U_STABLE double U_EXPORT2
+U_CAPI double U_EXPORT2
u_getNumericValue(UChar32 c);
/**
@@ -2842,14 +2954,14 @@ u_getNumericValue(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is an Ll lowercase letter
+ * @return true if the code point is an Ll lowercase letter
*
* @see UCHAR_LOWERCASE
* @see u_isupper
* @see u_istitle
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_islower(UChar32 c);
/**
@@ -2868,7 +2980,7 @@ u_islower(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is an Lu uppercase letter
+ * @return true if the code point is an Lu uppercase letter
*
* @see UCHAR_UPPERCASE
* @see u_islower
@@ -2876,7 +2988,7 @@ u_islower(UChar32 c);
* @see u_tolower
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isupper(UChar32 c);
/**
@@ -2886,14 +2998,14 @@ u_isupper(UChar32 c);
* Same as java.lang.Character.isTitleCase().
*
* @param c the code point to be tested
- * @return TRUE if the code point is an Lt titlecase letter
+ * @return true if the code point is an Lt titlecase letter
*
* @see u_isupper
* @see u_islower
* @see u_totitle
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_istitle(UChar32 c);
/**
@@ -2910,11 +3022,11 @@ u_istitle(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a digit character according to Character.isDigit()
+ * @return true if the code point is a digit character according to Character.isDigit()
*
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isdigit(UChar32 c);
/**
@@ -2929,13 +3041,13 @@ u_isdigit(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a letter character
+ * @return true if the code point is a letter character
*
* @see u_isdigit
* @see u_isalnum
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isalpha(UChar32 c);
/**
@@ -2952,11 +3064,11 @@ u_isalpha(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is an alphanumeric character according to Character.isLetterOrDigit()
+ * @return true if the code point is an alphanumeric character according to Character.isLetterOrDigit()
*
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isalnum(UChar32 c);
/**
@@ -2975,11 +3087,11 @@ u_isalnum(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a hexadecimal digit
+ * @return true if the code point is a hexadecimal digit
*
* @stable ICU 2.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isxdigit(UChar32 c);
/**
@@ -2991,17 +3103,17 @@ u_isxdigit(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a punctuation character
+ * @return true if the code point is a punctuation character
*
* @stable ICU 2.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_ispunct(UChar32 c);
/**
* Determines whether the specified code point is a "graphic" character
* (printable, excluding spaces).
- * TRUE for all characters except those with general categories
+ * true for all characters except those with general categories
* "Cc" (control codes), "Cf" (format controls), "Cs" (surrogates),
* "Cn" (unassigned), and "Z" (separators).
*
@@ -3010,11 +3122,11 @@ u_ispunct(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a "graphic" character
+ * @return true if the code point is a "graphic" character
*
* @stable ICU 2.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isgraph(UChar32 c);
/**
@@ -3022,13 +3134,13 @@ u_isgraph(UChar32 c);
* a character that visibly separates words on a line.
* The following are equivalent definitions:
*
- * TRUE for Unicode White_Space characters except for "vertical space controls"
+ * true for Unicode White_Space characters except for "vertical space controls"
* where "vertical space controls" are the following characters:
* U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS)
*
* same as
*
- * TRUE for U+0009 (TAB) and characters with general category "Zs" (space separators).
+ * true for U+0009 (TAB) and characters with general category "Zs" (space separators).
*
* Note: There are several ICU whitespace functions; please see the uchar.h
* file documentation for a detailed comparison.
@@ -3038,11 +3150,11 @@ u_isgraph(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a "blank"
+ * @return true if the code point is a "blank"
*
* @stable ICU 2.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isblank(UChar32 c);
/**
@@ -3057,7 +3169,7 @@ u_isblank(UChar32 c);
* Same as java.lang.Character.isDefined().
*
* @param c the code point to be tested
- * @return TRUE if the code point is assigned a character
+ * @return true if the code point is assigned a character
*
* @see u_isdigit
* @see u_isalpha
@@ -3067,7 +3179,7 @@ u_isblank(UChar32 c);
* @see u_istitle
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isdefined(UChar32 c);
/**
@@ -3088,7 +3200,7 @@ u_isdefined(UChar32 c);
* @see u_isUWhiteSpace
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isspace(UChar32 c);
/**
@@ -3102,14 +3214,14 @@ u_isspace(UChar32 c);
* file documentation for a detailed comparison.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a space character according to Character.isSpaceChar()
+ * @return true if the code point is a space character according to Character.isSpaceChar()
*
* @see u_isspace
* @see u_isWhitespace
* @see u_isUWhiteSpace
* @stable ICU 2.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isJavaSpaceChar(UChar32 c);
/**
@@ -3142,14 +3254,14 @@ u_isJavaSpaceChar(UChar32 c);
* file documentation for a detailed comparison.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a whitespace character according to Java/ICU
+ * @return true if the code point is a whitespace character according to Java/ICU
*
* @see u_isspace
* @see u_isJavaSpaceChar
* @see u_isUWhiteSpace
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isWhitespace(UChar32 c);
/**
@@ -3167,13 +3279,13 @@ u_isWhitespace(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a control character
+ * @return true if the code point is a control character
*
* @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
* @see u_isprint
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_iscntrl(UChar32 c);
/**
@@ -3183,12 +3295,12 @@ u_iscntrl(UChar32 c);
* Same as java.lang.Character.isISOControl().
*
* @param c the code point to be tested
- * @return TRUE if the code point is an ISO control code
+ * @return true if the code point is an ISO control code
*
* @see u_iscntrl
* @stable ICU 2.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isISOControl(UChar32 c);
/**
@@ -3200,13 +3312,13 @@ u_isISOControl(UChar32 c);
* documentation at the top of this header file.
*
* @param c the code point to be tested
- * @return TRUE if the code point is a printable character
+ * @return true if the code point is a printable character
*
* @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
* @see u_iscntrl
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isprint(UChar32 c);
/**
@@ -3220,13 +3332,13 @@ u_isprint(UChar32 c);
* Letter (L), Number (N), Punctuation (P), Symbol (S), or Space Separator (Zs).
*
* @param c the code point to be tested
- * @return TRUE if the code point is a base character according to this function
+ * @return true if the code point is a base character according to this function
*
* @see u_isalpha
* @see u_isdigit
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isbase(UChar32 c);
/**
@@ -3245,7 +3357,7 @@ u_isbase(UChar32 c);
* @see UCharDirection
* @stable ICU 2.0
*/
-U_STABLE UCharDirection U_EXPORT2
+U_CAPI UCharDirection U_EXPORT2
u_charDirection(UChar32 c);
/**
@@ -3258,12 +3370,12 @@ u_charDirection(UChar32 c);
* Same as UCHAR_BIDI_MIRRORED
*
* @param c the code point to be tested
- * @return TRUE if the character has the Bidi_Mirrored property
+ * @return true if the character has the Bidi_Mirrored property
*
* @see UCHAR_BIDI_MIRRORED
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isMirrored(UChar32 c);
/**
@@ -3285,7 +3397,7 @@ u_isMirrored(UChar32 c);
* @see u_isMirrored
* @stable ICU 2.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_charMirror(UChar32 c);
/**
@@ -3304,7 +3416,7 @@ u_charMirror(UChar32 c);
* @see u_charMirror
* @stable ICU 52
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_getBidiPairedBracket(UChar32 c);
/**
@@ -3318,7 +3430,7 @@ u_getBidiPairedBracket(UChar32 c);
* @see UCharCategory
* @stable ICU 2.0
*/
-U_STABLE int8_t U_EXPORT2
+U_CAPI int8_t U_EXPORT2
u_charType(UChar32 c);
/**
@@ -3341,13 +3453,13 @@ u_charType(UChar32 c);
* of code points c (where start<=c<limit)
* with the same Unicode general category ("character type").
*
- * 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 type the general category for all code points in [start..limit[
- * @return FALSE to stop the enumeration
+ * @return false to stop the enumeration
*
* @stable ICU 2.1
* @see UCharCategory
@@ -3375,7 +3487,7 @@ UCharEnumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCateg
* @see UCharCategory
* @see UCharEnumTypeRange
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_enumCharTypes(UCharEnumTypeRange *enumRange, const void *context);
#if !UCONFIG_NO_NORMALIZATION
@@ -3387,7 +3499,7 @@ u_enumCharTypes(UCharEnumTypeRange *enumRange, const void *context);
* @return the combining class of the character
* @stable ICU 2.0
*/
-U_STABLE uint8_t U_EXPORT2
+U_CAPI uint8_t U_EXPORT2
u_getCombiningClass(UChar32 c);
#endif
@@ -3415,7 +3527,7 @@ u_getCombiningClass(UChar32 c);
* @see u_getNumericValue
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_charDigitValue(UChar32 c);
/**
@@ -3427,7 +3539,7 @@ u_charDigitValue(UChar32 c);
* @see UBlockCode
* @stable ICU 2.0
*/
-U_STABLE UBlockCode U_EXPORT2
+U_CAPI UBlockCode U_EXPORT2
ublock_getCode(UChar32 c);
/**
@@ -3462,7 +3574,7 @@ ublock_getCode(UChar32 c);
* @see u_enumCharNames
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_charName(UChar32 code, UCharNameChoice nameChoice,
char *buffer, int32_t bufferLength,
UErrorCode *pErrorCode);
@@ -3512,7 +3624,7 @@ u_getISOComment(UChar32 c,
* @see u_enumCharNames
* @stable ICU 1.7
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_charFromName(UCharNameChoice nameChoice,
const char *name,
UErrorCode *pErrorCode);
@@ -3521,14 +3633,14 @@ u_charFromName(UCharNameChoice nameChoice,
* Type of a callback function for u_enumCharNames() that gets called
* for each Unicode character with the code point value and
* the character name.
- * If such a function returns FALSE, then the enumeration is stopped.
+ * If such a function returns false, then the enumeration is stopped.
*
* @param context The context pointer that was passed to u_enumCharNames().
* @param code The Unicode code point for the character with this name.
* @param nameChoice Selector for which kind of names is enumerated.
* @param name The character's name, zero-terminated.
* @param length The length of the name.
- * @return TRUE if the enumeration should continue, FALSE to stop it.
+ * @return true if the enumeration should continue, false to stop it.
*
* @see UCharNameChoice
* @see u_enumCharNames
@@ -3561,7 +3673,7 @@ typedef UBool U_CALLCONV UEnumCharNamesFn(void *context,
* @see u_charFromName
* @stable ICU 1.7
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_enumCharNames(UChar32 start, UChar32 limit,
UEnumCharNamesFn *fn,
void *context,
@@ -3599,7 +3711,7 @@ u_enumCharNames(UChar32 start, UChar32 limit,
* @see UPropertyNameChoice
* @stable ICU 2.4
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
u_getPropertyName(UProperty property,
UPropertyNameChoice nameChoice);
@@ -3622,7 +3734,7 @@ u_getPropertyName(UProperty property,
* @see UProperty
* @stable ICU 2.4
*/
-U_STABLE UProperty U_EXPORT2
+U_CAPI UProperty U_EXPORT2
u_getPropertyEnum(const char* alias);
/**
@@ -3672,7 +3784,7 @@ u_getPropertyEnum(const char* alias);
* @see UPropertyNameChoice
* @stable ICU 2.4
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
u_getPropertyValueName(UProperty property,
int32_t value,
UPropertyNameChoice nameChoice);
@@ -3708,7 +3820,7 @@ u_getPropertyValueName(UProperty property,
* @see UProperty
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_getPropertyValueEnum(UProperty property,
const char* alias);
@@ -3722,14 +3834,14 @@ u_getPropertyValueEnum(UProperty property,
* Same as UCHAR_ID_START
*
* @param c the code point to be tested
- * @return TRUE if the code point may start an identifier
+ * @return true if the code point may start an identifier
*
* @see UCHAR_ID_START
* @see u_isalpha
* @see u_isIDPart
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isIDStart(UChar32 c);
/**
@@ -3746,14 +3858,14 @@ u_isIDStart(UChar32 c);
* u_isIDIgnorable(c).
*
* @param c the code point to be tested
- * @return TRUE if the code point may occur in an identifier according to Java
+ * @return true if the code point may occur in an identifier according to Java
*
* @see UCHAR_ID_CONTINUE
* @see u_isIDStart
* @see u_isIDIgnorable
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isIDPart(UChar32 c);
/**
@@ -3769,14 +3881,14 @@ u_isIDPart(UChar32 c);
* Note that Unicode just recommends to ignore Cf (format controls).
*
* @param c the code point to be tested
- * @return TRUE if the code point is ignorable in identifiers according to Java
+ * @return true if the code point is ignorable in identifiers according to Java
*
* @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
* @see u_isIDStart
* @see u_isIDPart
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isIDIgnorable(UChar32 c);
/**
@@ -3788,14 +3900,14 @@ u_isIDIgnorable(UChar32 c);
* Same as java.lang.Character.isJavaIdentifierStart().
*
* @param c the code point to be tested
- * @return TRUE if the code point may start a Java identifier
+ * @return true if the code point may start a Java identifier
*
* @see u_isJavaIDPart
* @see u_isalpha
* @see u_isIDStart
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isJavaIDStart(UChar32 c);
/**
@@ -3807,7 +3919,7 @@ u_isJavaIDStart(UChar32 c);
* Same as java.lang.Character.isJavaIdentifierPart().
*
* @param c the code point to be tested
- * @return TRUE if the code point may occur in a Java identifier
+ * @return true if the code point may occur in a Java identifier
*
* @see u_isIDIgnorable
* @see u_isJavaIDStart
@@ -3816,7 +3928,7 @@ u_isJavaIDStart(UChar32 c);
* @see u_isIDPart
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_isJavaIDPart(UChar32 c);
/**
@@ -3834,14 +3946,14 @@ u_isJavaIDPart(UChar32 c);
* Full case mappings are applied by the string case mapping functions,
* see ustring.h and the UnicodeString class.
* See also the User Guide chapter on C/POSIX migration:
- * http://icu-project.org/userguide/posix.html#case_mappings
+ * https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings
*
* @param c the code point to be mapped
* @return the Simple_Lowercase_Mapping of the code point, if any;
* otherwise the code point itself.
* @stable ICU 2.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_tolower(UChar32 c);
/**
@@ -3859,14 +3971,14 @@ u_tolower(UChar32 c);
* Full case mappings are applied by the string case mapping functions,
* see ustring.h and the UnicodeString class.
* See also the User Guide chapter on C/POSIX migration:
- * http://icu-project.org/userguide/posix.html#case_mappings
+ * https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings
*
* @param c the code point to be mapped
* @return the Simple_Uppercase_Mapping of the code point, if any;
* otherwise the code point itself.
* @stable ICU 2.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_toupper(UChar32 c);
/**
@@ -3884,14 +3996,14 @@ u_toupper(UChar32 c);
* Full case mappings are applied by the string case mapping functions,
* see ustring.h and the UnicodeString class.
* See also the User Guide chapter on C/POSIX migration:
- * http://icu-project.org/userguide/posix.html#case_mappings
+ * https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings
*
* @param c the code point to be mapped
* @return the Simple_Titlecase_Mapping of the code point, if any;
* otherwise the code point itself.
* @stable ICU 2.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_totitle(UChar32 c);
/**
@@ -3908,7 +4020,7 @@ u_totitle(UChar32 c);
* Full case mappings are applied by the string case mapping functions,
* see ustring.h and the UnicodeString class.
* See also the User Guide chapter on C/POSIX migration:
- * http://icu-project.org/userguide/posix.html#case_mappings
+ * https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings
*
* @param c the code point to be mapped
* @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I
@@ -3916,7 +4028,7 @@ u_totitle(UChar32 c);
* otherwise the code point itself.
* @stable ICU 2.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_foldCase(UChar32 c, uint32_t options);
/**
@@ -3957,7 +4069,7 @@ u_foldCase(UChar32 c, uint32_t options);
* @see u_isdigit
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_digit(UChar32 ch, int8_t radix);
/**
@@ -3988,7 +4100,7 @@ u_digit(UChar32 ch, int8_t radix);
* @see u_isdigit
* @stable ICU 2.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_forDigit(int32_t digit, int8_t radix);
/**
@@ -4005,7 +4117,7 @@ u_forDigit(int32_t digit, int8_t radix);
*
* @stable ICU 2.1
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_charAge(UChar32 c, UVersionInfo versionArray);
/**
@@ -4019,7 +4131,7 @@ u_charAge(UChar32 c, UVersionInfo versionArray);
* the Unicode version number
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_getUnicodeVersion(UVersionInfo versionArray);
#if !UCONFIG_NO_NORMALIZATION
@@ -4044,7 +4156,7 @@ u_getUnicodeVersion(UVersionInfo versionArray);
*
* @stable ICU 2.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode);
#endif
diff --git a/contrib/libs/icu/include/unicode/ucharstrie.h b/contrib/libs/icu/include/unicode/ucharstrie.h
index d5729d944e..b6f9e3e075 100644
--- a/contrib/libs/icu/include/unicode/ucharstrie.h
+++ b/contrib/libs/icu/include/unicode/ucharstrie.h
@@ -97,14 +97,13 @@ public:
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<uint64_t>(remainingMatchLength_ + 2) << kState64RemainingShift) |
@@ -123,14 +122,13 @@ public:
* @see getState64
* @see resetToState
* @see reset
- * @draft ICU 65
+ * @stable ICU 65
*/
UCharsTrie &resetToState64(uint64_t state) {
remainingMatchLength_ = static_cast<int32_t>(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 @@ public:
/**
* 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 @@ public:
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 @@ public:
* 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 @@ public:
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/contrib/libs/icu/include/unicode/ucharstriebuilder.h b/contrib/libs/icu/include/unicode/ucharstriebuilder.h
index 540dcc047f..e0cb0acdc5 100644
--- a/contrib/libs/icu/include/unicode/ucharstriebuilder.h
+++ b/contrib/libs/icu/include/unicode/ucharstriebuilder.h
@@ -101,9 +101,10 @@ public:
* 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
@@ -137,41 +138,41 @@ private:
void buildUChars(UStringTrieBuildOption buildOption, UErrorCode &errorCode);
- virtual int32_t getElementStringLength(int32_t i) const;
- virtual char16_t getElementUnit(int32_t i, int32_t unitIndex) const;
- virtual int32_t getElementValue(int32_t i) const;
+ virtual int32_t getElementStringLength(int32_t i) const override;
+ virtual char16_t getElementUnit(int32_t i, int32_t unitIndex) const override;
+ virtual int32_t getElementValue(int32_t i) const override;
- virtual int32_t getLimitOfLinearMatch(int32_t first, int32_t last, int32_t unitIndex) const;
+ virtual int32_t getLimitOfLinearMatch(int32_t first, int32_t last, int32_t unitIndex) const override;
- virtual int32_t countElementUnits(int32_t start, int32_t limit, int32_t unitIndex) const;
- 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 int32_t countElementUnits(int32_t start, int32_t limit, int32_t unitIndex) const override;
+ virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t unitIndex, int32_t count) const override;
+ virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, char16_t unit) const override;
- virtual UBool matchNodesCanHaveValues() const { return TRUE; }
+ virtual UBool matchNodesCanHaveValues() const override { return true; }
- virtual int32_t getMaxBranchLinearSubNodeLength() const { return UCharsTrie::kMaxBranchLinearSubNodeLength; }
- virtual int32_t getMinLinearMatch() const { return UCharsTrie::kMinLinearMatch; }
- virtual int32_t getMaxLinearMatchLength() const { return UCharsTrie::kMaxLinearMatchLength; }
+ virtual int32_t getMaxBranchLinearSubNodeLength() const override { return UCharsTrie::kMaxBranchLinearSubNodeLength; }
+ virtual int32_t getMinLinearMatch() const override { return UCharsTrie::kMinLinearMatch; }
+ virtual int32_t getMaxLinearMatchLength() const override { return UCharsTrie::kMaxLinearMatchLength; }
class UCTLinearMatchNode : public LinearMatchNode {
public:
UCTLinearMatchNode(const char16_t *units, int32_t len, Node *nextNode);
- virtual UBool operator==(const Node &other) const;
- virtual void write(StringTrieBuilder &builder);
+ virtual bool operator==(const Node &other) const override;
+ virtual void write(StringTrieBuilder &builder) override;
private:
const char16_t *s;
};
virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length,
- Node *nextNode) const;
+ Node *nextNode) const override;
UBool ensureCapacity(int32_t length);
- virtual int32_t write(int32_t unit);
+ virtual int32_t write(int32_t unit) override;
int32_t write(const char16_t *s, int32_t length);
- virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length);
- virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal);
- virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node);
- virtual int32_t writeDeltaTo(int32_t jumpTarget);
+ virtual int32_t writeElementUnits(int32_t i, int32_t unitIndex, int32_t length) override;
+ virtual int32_t writeValueAndFinal(int32_t i, UBool isFinal) override;
+ virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node) override;
+ virtual int32_t writeDeltaTo(int32_t jumpTarget) override;
UnicodeString strings;
UCharsTrieElement *elements;
diff --git a/contrib/libs/icu/include/unicode/uchriter.h b/contrib/libs/icu/include/unicode/uchriter.h
index a485259b80..9fae5e7de0 100644
--- a/contrib/libs/icu/include/unicode/uchriter.h
+++ b/contrib/libs/icu/include/unicode/uchriter.h
@@ -56,7 +56,7 @@ public:
* The starting
* position is specified by "position". If "position" is outside the valid
* iteration range, the behavior of this object is undefined.
- * @param textPtr The char16_t array to be iteratd over
+ * @param textPtr The char16_t array to be iterated over
* @param length The length of the char16_t array
* @param position The starting position of the iteration
* @stable ICU 2.0
@@ -119,14 +119,14 @@ public:
* same string and are pointing at the same character.
* @stable ICU 2.0
*/
- virtual UBool operator==(const ForwardCharacterIterator& that) const;
+ virtual bool operator==(const ForwardCharacterIterator& that) const override;
/**
* Generates a hash code for this iterator.
* @return the hash code.
* @stable ICU 2.0
*/
- virtual int32_t hashCode(void) const;
+ virtual int32_t hashCode(void) const override;
/**
* Returns a new UCharCharacterIterator referring to the same
@@ -135,7 +135,7 @@ public:
* @return the CharacterIterator newly created
* @stable ICU 2.0
*/
- virtual UCharCharacterIterator* clone() const;
+ virtual UCharCharacterIterator* clone() const override;
/**
* Sets the iterator to refer to the first code unit in its
@@ -144,7 +144,7 @@ public:
* @return the first code unit in its iteration range.
* @stable ICU 2.0
*/
- virtual char16_t first(void);
+ virtual char16_t first(void) override;
/**
* Sets the iterator to refer to the first code unit in its
@@ -154,7 +154,7 @@ public:
* @return the first code unit in its iteration range
* @stable ICU 2.0
*/
- virtual char16_t firstPostInc(void);
+ virtual char16_t firstPostInc(void) override;
/**
* Sets the iterator to refer to the first code point in its
@@ -165,7 +165,7 @@ public:
* @return the first code point in its iteration range
* @stable ICU 2.0
*/
- virtual UChar32 first32(void);
+ virtual UChar32 first32(void) override;
/**
* Sets the iterator to refer to the first code point in its
@@ -175,7 +175,7 @@ public:
* @return the first code point in its iteration range.
* @stable ICU 2.0
*/
- virtual UChar32 first32PostInc(void);
+ virtual UChar32 first32PostInc(void) override;
/**
* Sets the iterator to refer to the last code unit in its
@@ -184,7 +184,7 @@ public:
* @return the last code unit in its iteration range.
* @stable ICU 2.0
*/
- virtual char16_t last(void);
+ virtual char16_t last(void) override;
/**
* Sets the iterator to refer to the last code point in its
@@ -193,7 +193,7 @@ public:
* @return the last code point in its iteration range.
* @stable ICU 2.0
*/
- virtual UChar32 last32(void);
+ virtual UChar32 last32(void) override;
/**
* Sets the iterator to refer to the "position"-th code unit
@@ -203,7 +203,7 @@ public:
* @return the code unit
* @stable ICU 2.0
*/
- virtual char16_t setIndex(int32_t position);
+ virtual char16_t setIndex(int32_t position) override;
/**
* Sets the iterator to refer to the beginning of the code point
@@ -216,21 +216,21 @@ public:
* @return the code unit
* @stable ICU 2.0
*/
- virtual UChar32 setIndex32(int32_t position);
+ virtual UChar32 setIndex32(int32_t position) override;
/**
* Returns the code unit the iterator currently refers to.
* @return the code unit the iterator currently refers to.
* @stable ICU 2.0
*/
- virtual char16_t current(void) const;
+ virtual char16_t current(void) const override;
/**
* Returns the code point the iterator currently refers to.
* @return the code point the iterator currently refers to.
* @stable ICU 2.0
*/
- virtual UChar32 current32(void) const;
+ virtual UChar32 current32(void) const override;
/**
* Advances to the next code unit in the iteration range (toward
@@ -239,7 +239,7 @@ public:
* @return the next code unit in the iteration range.
* @stable ICU 2.0
*/
- virtual char16_t next(void);
+ virtual char16_t next(void) override;
/**
* Gets the current code unit for returning and advances to the next code unit
@@ -249,7 +249,7 @@ public:
* @return the current code unit.
* @stable ICU 2.0
*/
- virtual char16_t nextPostInc(void);
+ virtual char16_t nextPostInc(void) override;
/**
* Advances to the next code point in the iteration range (toward
@@ -261,7 +261,7 @@ public:
* @return the next code point in the iteration range.
* @stable ICU 2.0
*/
- virtual UChar32 next32(void);
+ virtual UChar32 next32(void) override;
/**
* Gets the current code point for returning and advances to the next code point
@@ -271,18 +271,18 @@ public:
* @return the current point.
* @stable ICU 2.0
*/
- virtual UChar32 next32PostInc(void);
+ virtual UChar32 next32PostInc(void) override;
/**
- * 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
*/
- virtual UBool hasNext();
+ virtual UBool hasNext() override;
/**
* Advances to the previous code unit in the iteration range (toward
@@ -291,7 +291,7 @@ public:
* @return the previous code unit in the iteration range.
* @stable ICU 2.0
*/
- virtual char16_t previous(void);
+ virtual char16_t previous(void) override;
/**
* Advances to the previous code point in the iteration range (toward
@@ -300,18 +300,18 @@ public:
* @return the previous code point in the iteration range.
* @stable ICU 2.0
*/
- virtual UChar32 previous32(void);
+ virtual UChar32 previous32(void) override;
/**
- * 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
*/
- virtual UBool hasPrevious();
+ virtual UBool hasPrevious() override;
/**
* Moves the current position relative to the start or end of the
@@ -324,7 +324,7 @@ public:
* @return the new position
* @stable ICU 2.0
*/
- virtual int32_t move(int32_t delta, EOrigin origin);
+ virtual int32_t move(int32_t delta, EOrigin origin) override;
/**
* Moves the current position relative to the start or end of the
@@ -341,7 +341,7 @@ public:
// One of the system headers right now is sometimes defining a conflicting macro we don't use
#undef move32
#endif
- virtual int32_t move32(int32_t delta, EOrigin origin);
+ virtual int32_t move32(int32_t delta, EOrigin origin) override;
/**
* Sets the iterator to iterate over a new range of text
@@ -356,7 +356,7 @@ public:
* @param result Receives a copy of the text under iteration.
* @stable ICU 2.0
*/
- virtual void getText(UnicodeString& result);
+ virtual void getText(UnicodeString& result) override;
/**
* Return a class ID for this class (not really public)
@@ -370,7 +370,7 @@ public:
* @return a class ID for this object.
* @stable ICU 2.0
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
protected:
/**
diff --git a/contrib/libs/icu/include/unicode/uclean.h b/contrib/libs/icu/include/unicode/uclean.h
index 7cef6dba68..c2d920a16e 100644
--- a/contrib/libs/icu/include/unicode/uclean.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/ucnv.h b/contrib/libs/icu/include/unicode/ucnv.h
index ec7c5f350b..2687c984d4 100644
--- a/contrib/libs/icu/include/unicode/ucnv.h
+++ b/contrib/libs/icu/include/unicode/ucnv.h
@@ -42,8 +42,7 @@
* many other callback actions that can be used instead of a character substitution.</p>
*
* <p>More information about this API can be found in our
- * <a href="http://icu-project.org/userguide/conversion.html">User's
- * Guide</a>.</p>
+ * <a href="https://unicode-org.github.io/icu/userguide/conversion/">User Guide</a>.</p>
*/
#ifndef UCNV_H
@@ -51,7 +50,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 +310,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);
@@ -337,7 +339,7 @@ ucnv_compareNames(const char *name1, const char *name2);
*
* <p>The conversion behavior and names can vary between platforms. ICU may
* convert some characters differently from other platforms. Details on this topic
- * are in the <a href="http://icu-project.org/userguide/conversion.html">User's
+ * are in the <a href="https://unicode-org.github.io/icu/userguide/conversion/">User
* Guide</a>. Aliases starting with a "cp" prefix have no specific meaning
* other than its an alias starting with the letters "cp". Please do not
* associate any meaning to these aliases.</p>
@@ -362,7 +364,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 +394,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 +462,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 +478,7 @@ ucnv_openCCSID(int32_t codepage,
* <p>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.</p>
+ * 'primary' converter.</p>
*
* <p>A future version of ICU may add alias table lookups and/or caching
* to this function.</p>
@@ -495,7 +497,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 +539,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 +568,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 +607,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 +632,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 +665,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 +684,7 @@ ucnv_setSubstString(UConverter *cnv,
* <TT>U_INDEX_OUTOFBOUNDS_ERROR</TT> 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 +703,7 @@ ucnv_getInvalidChars(const UConverter *converter,
* <TT>U_INDEX_OUTOFBOUNDS_ERROR</TT> 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 +716,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 +727,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 +738,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 +791,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 +824,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 +841,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 +858,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 +884,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 +898,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 +910,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 <TT>U_ILLEGAL_ARGUMENT_ERROR</TT> 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 +928,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,14 +999,14 @@ 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,
UErrorCode *pErrorCode);
/**
- * Gets the current calback function used by the converter when an illegal
+ * Gets the current callback function used by the converter when an illegal
* or invalid codepage sequence is found.
* Context pointers are always owned by the caller.
*
@@ -1014,7 +1016,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 +1032,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 +1052,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 +1075,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 +1102,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 +1127,9 @@ ucnv_setFromUCallBack (UConverter * converter,
* e.g: <TT>offsets[3]</TT> is equal to 6, it means that the <TT>target[3]</TT> was a result of transcoding <TT>source[6]</TT>
* 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 <TT>TRUE</TT> if the current source buffer is the last available
- * chunk of the source, <TT>FALSE</TT> otherwise. Note that if a failing status is returned,
- * this function may have to be called multiple times with flush set to <TT>TRUE</TT> until
+ * @param flush set to <TT>true</TT> if the current source buffer is the last available
+ * chunk of the source, <TT>false</TT> otherwise. Note that if a failing status is returned,
+ * this function may have to be called multiple times with flush set to <TT>true</TT> until
* the source buffer is consumed.
* @param err the error status. <TT>U_ILLEGAL_ARGUMENT_ERROR</TT> will be set if the
* converter is <TT>NULL</TT>.
@@ -1139,7 +1141,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 +1171,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 +1195,9 @@ ucnv_fromUnicode (UConverter * converter,
* e.g: <TT>offsets[3]</TT> is equal to 6, it means that the <TT>target[3]</TT> was a result of transcoding <TT>source[6]</TT>
* 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 <TT>TRUE</TT> if the current source buffer is the last available
- * chunk of the source, <TT>FALSE</TT> otherwise. Note that if a failing status is returned,
- * this function may have to be called multiple times with flush set to <TT>TRUE</TT> until
+ * @param flush set to <TT>true</TT> if the current source buffer is the last available
+ * chunk of the source, <TT>false</TT> otherwise. Note that if a failing status is returned,
+ * this function may have to be called multiple times with flush set to <TT>true</TT> until
* the source buffer is consumed.
* @param err the error status. <TT>U_ILLEGAL_ARGUMENT_ERROR</TT> will be set if the
* converter is <TT>NULL</TT>.
@@ -1208,7 +1210,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 +1247,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 +1279,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 +1297,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 +1308,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 +1355,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 +1387,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 +1444,7 @@ ucnv_getNextUChar(UConverter * converter,
* &target, u8+capacity,
* &s, s+length,
* NULL, NULL, NULL, NULL,
- * TRUE, TRUE,
+ * true, true,
* pErrorCode);
*
* myReleaseCachedUTF8Converter(utf8Cnv);
@@ -1474,7 +1476,7 @@ ucnv_getNextUChar(UConverter * converter,
* It must be pivotStart<=*pivotSource<=*pivotTarget<=pivotLimit
* and pivotStart<pivotLimit (unless pivotStart==NULL).
* @param pivotLimit Pointer to the first unit after the pivot buffer.
- * @param reset If TRUE, then ucnv_resetToUnicode(sourceCnv) and
+ * @param reset If true, then ucnv_resetToUnicode(sourceCnv) and
* ucnv_resetFromUnicode(targetCnv) are called, and the
* pivot pointers are reset (*pivotTarget=*pivotSource=pivotStart).
* @param flush If true, indicates the end of the input.
@@ -1497,7 +1499,7 @@ ucnv_getNextUChar(UConverter * converter,
* @see ucnv_toUChars
* @stable ICU 2.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
char **target, const char *targetLimit,
const char **source, const char *sourceLimit,
@@ -1561,7 +1563,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
* @see ucnv_getNextUChar
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_convert(const char *toConverterName,
const char *fromConverterName,
char *target,
@@ -1615,7 +1617,7 @@ ucnv_convert(const char *toConverterName,
* @see ucnv_toUChars
* @stable ICU 2.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_toAlgorithmic(UConverterType algorithmicType,
UConverter *cnv,
char *target, int32_t targetCapacity,
@@ -1667,7 +1669,7 @@ ucnv_toAlgorithmic(UConverterType algorithmicType,
* @see ucnv_toUChars
* @stable ICU 2.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_fromAlgorithmic(UConverter *cnv,
UConverterType algorithmicType,
char *target, int32_t targetCapacity,
@@ -1681,7 +1683,7 @@ ucnv_fromAlgorithmic(UConverter *cnv,
* @see ucnv_close
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_flushCache(void);
/**
@@ -1691,20 +1693,20 @@ ucnv_flushCache(void);
* @see ucnv_getAvailableName
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucnv_countAvailable(void);
/**
* Gets the canonical converter name of the specified converter from a list of
- * all available converters contaied in the alias file. All converters
+ * all available converters contained in the alias file. All converters
* in this list can be opened.
*
- * @param n the index to a converter available on the system (in the range <TT>[0..ucnv_countAvaiable()]</TT>)
+ * @param n the index to a converter available on the system (in the range <TT>[0..ucnv_countAvailable()]</TT>)
* @return a pointer a string (library owned), or <TT>NULL</TT> if the index is out of bounds.
* @see ucnv_countAvailable
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
ucnv_getAvailableName(int32_t n);
/**
@@ -1719,7 +1721,7 @@ ucnv_getAvailableName(int32_t n);
* @see uenum_next
* @stable ICU 2.4
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
ucnv_openAllNames(UErrorCode *pErrorCode);
/**
@@ -1732,7 +1734,7 @@ ucnv_openAllNames(UErrorCode *pErrorCode);
* @return number of names on alias list for given alias
* @stable ICU 2.0
*/
-U_STABLE uint16_t U_EXPORT2
+U_CAPI uint16_t U_EXPORT2
ucnv_countAliases(const char *alias, UErrorCode *pErrorCode);
/**
@@ -1747,7 +1749,7 @@ ucnv_countAliases(const char *alias, UErrorCode *pErrorCode);
* @see ucnv_countAliases
* @stable ICU 2.0
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucnv_getAlias(const char *alias, uint16_t n, UErrorCode *pErrorCode);
/**
@@ -1763,7 +1765,7 @@ ucnv_getAlias(const char *alias, uint16_t n, UErrorCode *pErrorCode);
* @param pErrorCode result of operation
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucnv_getAliases(const char *alias, const char **aliases, UErrorCode *pErrorCode);
/**
@@ -1789,7 +1791,7 @@ ucnv_getAliases(const char *alias, const char **aliases, UErrorCode *pErrorCode)
* @see uenum_next
* @stable ICU 2.2
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
ucnv_openStandardNames(const char *convName,
const char *standard,
UErrorCode *pErrorCode);
@@ -1799,7 +1801,7 @@ ucnv_openStandardNames(const char *convName,
* @return number of standards
* @stable ICU 2.0
*/
-U_STABLE uint16_t U_EXPORT2
+U_CAPI uint16_t U_EXPORT2
ucnv_countStandards(void);
/**
@@ -1809,7 +1811,7 @@ ucnv_countStandards(void);
* @return returns the name of the standard at given index. Owned by the library.
* @stable ICU 2.0
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucnv_getStandard(uint16_t n, UErrorCode *pErrorCode);
/**
@@ -1831,7 +1833,7 @@ ucnv_getStandard(uint16_t n, UErrorCode *pErrorCode);
* then <code>NULL</code> 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 +1855,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 +1872,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 +1892,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 +1913,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);
/**
@@ -1932,15 +1934,15 @@ ucnv_isAmbiguous(const UConverter *cnv);
* reverse fallbacks (to Unicode).
* For details see ".ucm File Format"
* in the Conversion Data chapter of the ICU User Guide:
- * http://www.icu-project.org/userguide/conversion-data.html#ucmformat
+ * https://unicode-org.github.io/icu/userguide/conversion/data.html#ucm-file-format
*
* @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 +1950,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 +1986,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 +2003,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 +2017,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 +2029,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 <i>units</i> 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
+ * @param status ICU error code in/out parameter
+ * @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/contrib/libs/icu/include/unicode/ucnv_cb.h b/contrib/libs/icu/include/unicode/ucnv_cb.h
index 14169ed61c..41845d1bca 100644
--- a/contrib/libs/icu/include/unicode/ucnv_cb.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/ucnv_err.h b/contrib/libs/icu/include/unicode/ucnv_err.h
index d234710a8b..a13d01db09 100644
--- a/contrib/libs/icu/include/unicode/ucnv_err.h
+++ b/contrib/libs/icu/include/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,
@@ -268,7 +268,7 @@ U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (
/**
* DO NOT CALL THIS FUNCTION DIRECTLY!
* This From Unicode callback skips any ILLEGAL_SEQUENCE, or
- * skips only UNASSINGED_SEQUENCE depending on the context parameter
+ * skips only UNASSIGNED_SEQUENCE depending on the context parameter
* simply ignoring those characters.
*
* @param context The function currently recognizes the callback options:
@@ -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,
@@ -330,31 +330,31 @@ U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (
*
* @param context The function currently recognizes the callback options:
* <ul>
- * <li>UCNV_ESCAPE_ICU: Substitues the ILLEGAL SEQUENCE with the hexadecimal
+ * <li>UCNV_ESCAPE_ICU: Substitutes the ILLEGAL SEQUENCE with the hexadecimal
* representation in the format %UXXXX, e.g. "%uFFFE%u00AC%uC8FE").
* In the Event the converter doesn't support the characters {%,U}[A-F][0-9],
* it will substitute the illegal sequence with the substitution characters.
* Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as
* %UD84D%UDC56</li>
- * <li>UCNV_ESCAPE_JAVA: Substitues the ILLEGAL SEQUENCE with the hexadecimal
+ * <li>UCNV_ESCAPE_JAVA: Substitutes the ILLEGAL SEQUENCE with the hexadecimal
* representation in the format \\uXXXX, e.g. "\\uFFFE\\u00AC\\uC8FE").
* In the Event the converter doesn't support the characters {\,u}[A-F][0-9],
* it will substitute the illegal sequence with the substitution characters.
* Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as
* \\uD84D\\uDC56</li>
- * <li>UCNV_ESCAPE_C: Substitues the ILLEGAL SEQUENCE with the hexadecimal
+ * <li>UCNV_ESCAPE_C: Substitutes the ILLEGAL SEQUENCE with the hexadecimal
* representation in the format \\uXXXX, e.g. "\\uFFFE\\u00AC\\uC8FE").
* In the Event the converter doesn't support the characters {\,u,U}[A-F][0-9],
* it will substitute the illegal sequence with the substitution characters.
* Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as
* \\U00023456</li>
- * <li>UCNV_ESCAPE_XML_DEC: Substitues the ILLEGAL SEQUENCE with the decimal
+ * <li>UCNV_ESCAPE_XML_DEC: Substitutes the ILLEGAL SEQUENCE with the decimal
* representation in the format \htmlonly&amp;#DDDDDDDD;, e.g. "&amp;#65534;&amp;#172;&amp;#51454;")\endhtmlonly.
* In the Event the converter doesn't support the characters {&amp;,#}[0-9],
* it will substitute the illegal sequence with the substitution characters.
* Note that codeUnit(32bit int eg: unit of a surrogate pair) is represented as
* &amp;#144470; and Zero padding is ignored.</li>
- * <li>UCNV_ESCAPE_XML_HEX:Substitues the ILLEGAL SEQUENCE with the decimal
+ * <li>UCNV_ESCAPE_XML_HEX:Substitutes the ILLEGAL SEQUENCE with the decimal
* representation in the format \htmlonly&amp;#xXXXX; e.g. "&amp;#xFFFE;&amp;#x00AC;&amp;#xC8FE;")\endhtmlonly.
* In the Event the converter doesn't support the characters {&,#,x}[0-9],
* it will substitute the illegal sequence with the substitution characters.
@@ -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,
@@ -383,7 +383,7 @@ U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (
/**
* DO NOT CALL THIS FUNCTION DIRECTLY!
* This To Unicode callback skips any ILLEGAL_SEQUENCE, or
- * skips only UNASSINGED_SEQUENCE depending on the context parameter
+ * skips only UNASSIGNED_SEQUENCE depending on the context parameter
* simply ignoring those characters.
*
* @param context The function currently recognizes the callback options:
@@ -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/contrib/libs/icu/include/unicode/ucnvsel.h b/contrib/libs/icu/include/unicode/ucnvsel.h
index d423845ceb..3d7d3327f7 100644
--- a/contrib/libs/icu/include/unicode/ucnvsel.h
+++ b/contrib/libs/icu/include/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
@@ -42,11 +45,11 @@
* from the serialized form.
*/
+struct UConverterSelector;
/**
* @{
- * The selector data structure
+ * Typedef for selector data structure.
*/
-struct UConverterSelector;
typedef struct UConverterSelector UConverterSelector;
/** @} */
@@ -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/contrib/libs/icu/include/unicode/ucol.h b/contrib/libs/icu/include/unicode/ucol.h
index 673af1c55a..6d22eb6069 100644
--- a/contrib/libs/icu/include/unicode/ucol.h
+++ b/contrib/libs/icu/include/unicode/ucol.h
@@ -15,12 +15,15 @@
#if !UCONFIG_NO_COLLATION
#include "unicode/unorm.h"
-#include "unicode/localpointer.h"
#include "unicode/parseerr.h"
#include "unicode/uloc.h"
#include "unicode/uset.h"
#include "unicode/uscript.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: Collator
@@ -32,14 +35,14 @@
* searching and sorting routines for natural language text.
* <p>
* For more information about the collation service see
- * <a href="http://userguide.icu-project.org/collation">the User Guide</a>.
+ * <a href="https://unicode-org.github.io/icu/userguide/collation">the User Guide</a>.
* <p>
* Collation service provides correct sorting orders for most locales supported in ICU.
* If specific data for a locale is not available, the orders eventually falls back
* to the <a href="http://www.unicode.org/reports/tr35/tr35-collation.html#Root_Collation">CLDR root sort order</a>.
* <p>
* Sort ordering may be customized by providing your own set of rules. For more on
- * this subject see the <a href="http://userguide.icu-project.org/collation/customization">
+ * this subject see the <a href="https://unicode-org.github.io/icu/userguide/collation/customization">
* Collation Customization</a> section of the User Guide.
* <p>
* @see UCollationResult
@@ -80,7 +83,7 @@ typedef enum {
} UCollationResult ;
-/** Enum containing attribute values for controling collation behavior.
+/** Enum containing attribute values for controlling collation behavior.
* Here are all the allowable values. Not every attribute can take every value. The only
* universal value is UCOL_DEFAULT, which resets the attribute value to the predefined
* value for that locale
@@ -367,7 +370,7 @@ typedef enum {
* Retrieves the "UCA rules" concatenated with the tailoring rules.
* The "UCA rules" are an <i>approximation</i> of the root collator's sort order.
* They are almost never used or useful at runtime and can be removed from the data.
- * See http://userguide.icu-project.org/collation/customization#TOC-Building-on-Existing-Locales
+ * See https://unicode-org.github.io/icu/userguide/collation/customization#building-on-existing-locales
* @stable ICU 2.0
*/
UCOL_FULL_RULES
@@ -381,7 +384,7 @@ typedef enum {
* Starting with ICU 54, collation attributes can be specified via locale keywords as well,
* in the old locale extension syntax ("el@colCaseFirst=upper")
* or in language tag syntax ("el-u-kf-upper").
- * See <a href="http://userguide.icu-project.org/collation/api">User Guide: Collation API</a>.
+ * See <a href="https://unicode-org.github.io/icu/userguide/collation/api">User Guide: Collation API</a>.
*
* The UCollator pointer is used in all the calls to the Collation
* service. After finished, collator must be disposed of by calling
@@ -398,7 +401,7 @@ typedef enum {
* @see ucol_close
* @stable ICU 2.0
*/
-U_STABLE UCollator* U_EXPORT2
+U_CAPI UCollator* U_EXPORT2
ucol_open(const char *loc, UErrorCode *status);
/**
@@ -415,7 +418,7 @@ ucol_open(const char *loc, UErrorCode *status);
* UCOL_DEFAULT (set the mode according to the rules)
* @param strength The default collation strength; one of UCOL_PRIMARY, UCOL_SECONDARY,
* UCOL_TERTIARY, UCOL_IDENTICAL,UCOL_DEFAULT_STRENGTH - can be also set in the rules.
- * @param parseError A pointer to UParseError to recieve information about errors
+ * @param parseError A pointer to UParseError to receive information about errors
* occurred during parsing. This argument can currently be set
* to NULL, but at users own risk. Please provide a real structure.
* @param status A pointer to a UErrorCode to receive any errors
@@ -426,7 +429,7 @@ ucol_open(const char *loc, UErrorCode *status);
* @see ucol_close
* @stable ICU 2.0
*/
-U_STABLE UCollator* U_EXPORT2
+U_CAPI UCollator* U_EXPORT2
ucol_openRules( const UChar *rules,
int32_t rulesLength,
UColAttributeValue normalizationMode,
@@ -439,8 +442,8 @@ ucol_openRules( const UChar *rules,
* Open a collator defined by a short form string.
* The structure and the syntax of the string is defined in the "Naming collators"
* section of the users guide:
- * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme
- * Attributes are overriden by the subsequent attributes. So, for "S2_S3", final
+ * https://unicode-org.github.io/icu/userguide/collation/concepts#collator-naming-scheme
+ * Attributes are overridden by the subsequent attributes. So, for "S2_S3", final
* strength will be 3. 3066bis locale overrides individual locale parts.
* The call to this function is equivalent to a call to ucol_open, followed by a
* series of calls to ucol_setAttribute and ucol_setVariableTop.
@@ -449,17 +452,17 @@ ucol_openRules( const UChar *rules,
* state for a locale.
* @param parseError if not NULL, structure that will get filled with error's pre
* and post context in case of error.
- * @param forceDefaults if FALSE, the settings that are the same as the collator
+ * @param forceDefaults if false, the settings that are the same as the collator
* default settings will not be applied (for example, setting
* French secondary on a French collator would not be executed).
- * If TRUE, all the settings will be applied regardless of the
+ * If true, all the settings will be applied regardless of the
* collator default value. If the definition
- * strings are to be cached, should be set to FALSE.
+ * strings are to be cached, should be set to false.
* @param status Error code. Apart from regular error conditions connected to
* instantiating collators (like out of memory or similar), this
* API will return an error if an invalid attribute or attribute/value
* combination is specified.
- * @return A pointer to a UCollator or 0 if an error occured (including an
+ * @return A pointer to a UCollator or 0 if an error occurred (including an
* invalid attribute).
* @see ucol_open
* @see ucol_setAttribute
@@ -506,7 +509,7 @@ ucol_getContractions( const UCollator *coll,
*
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_getContractionsAndExpansions( const UCollator *coll,
USet *contractions, USet *expansions,
UBool addPrefixes, UErrorCode *status);
@@ -521,7 +524,7 @@ ucol_getContractionsAndExpansions( const UCollator *coll,
* @see ucol_safeClone
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_close(UCollator *coll);
#if U_SHOW_CPLUSPLUS_API
@@ -558,7 +561,7 @@ U_NAMESPACE_END
* @see ucol_equal
* @stable ICU 2.0
*/
-U_STABLE UCollationResult U_EXPORT2
+U_CAPI UCollationResult U_EXPORT2
ucol_strcoll( const UCollator *coll,
const UChar *source,
int32_t sourceLength,
@@ -583,7 +586,7 @@ ucol_strcoll( const UCollator *coll,
* @see ucol_equal
* @stable ICU 50
*/
-U_STABLE UCollationResult U_EXPORT2
+U_CAPI UCollationResult U_EXPORT2
ucol_strcollUTF8(
const UCollator *coll,
const char *source,
@@ -600,13 +603,13 @@ ucol_strcollUTF8(
* @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target string.
* @param targetLength The length of target, or -1 if null-terminated.
- * @return TRUE if source is greater than target, FALSE otherwise.
+ * @return true if source is greater than target, false otherwise.
* @see ucol_strcoll
* @see ucol_greaterOrEqual
* @see ucol_equal
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucol_greater(const UCollator *coll,
const UChar *source, int32_t sourceLength,
const UChar *target, int32_t targetLength);
@@ -619,13 +622,13 @@ ucol_greater(const UCollator *coll,
* @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target string.
* @param targetLength The length of target, or -1 if null-terminated.
- * @return TRUE if source is greater than or equal to target, FALSE otherwise.
+ * @return true if source is greater than or equal to target, false otherwise.
* @see ucol_strcoll
* @see ucol_greater
* @see ucol_equal
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucol_greaterOrEqual(const UCollator *coll,
const UChar *source, int32_t sourceLength,
const UChar *target, int32_t targetLength);
@@ -638,19 +641,19 @@ ucol_greaterOrEqual(const UCollator *coll,
* @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target string.
* @param targetLength The length of target, or -1 if null-terminated.
- * @return TRUE if source is equal to target, FALSE otherwise
+ * @return true if source is equal to target, false otherwise
* @see ucol_strcoll
* @see ucol_greater
* @see ucol_greaterOrEqual
* @stable ICU 2.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucol_equal(const UCollator *coll,
const UChar *source, int32_t sourceLength,
const UChar *target, int32_t targetLength);
/**
- * Compare two UTF-8 encoded trings.
+ * Compare two UTF-8 encoded strings.
* The strings will be compared using the options already specified.
* @param coll The UCollator containing the comparison rules.
* @param sIter The source string iterator.
@@ -661,7 +664,7 @@ ucol_equal(const UCollator *coll,
* @see ucol_strcoll
* @stable ICU 2.6
*/
-U_STABLE UCollationResult U_EXPORT2
+U_CAPI UCollationResult U_EXPORT2
ucol_strcollIter( const UCollator *coll,
UCharIterator *sIter,
UCharIterator *tIter,
@@ -676,7 +679,7 @@ ucol_strcollIter( const UCollator *coll,
* @see ucol_setStrength
* @stable ICU 2.0
*/
-U_STABLE UCollationStrength U_EXPORT2
+U_CAPI UCollationStrength U_EXPORT2
ucol_getStrength(const UCollator *coll);
/**
@@ -688,7 +691,7 @@ ucol_getStrength(const UCollator *coll);
* @see ucol_getStrength
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_setStrength(UCollator *coll,
UCollationStrength strength);
@@ -708,7 +711,7 @@ ucol_setStrength(UCollator *coll,
* @see UColReorderCode
* @stable ICU 4.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getReorderCodes(const UCollator* coll,
int32_t* dest,
int32_t destCapacity,
@@ -753,7 +756,7 @@ ucol_getReorderCodes(const UCollator* coll,
* @see UColReorderCode
* @stable ICU 4.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_setReorderCodes(UCollator* coll,
const int32_t* reorderCodes,
int32_t reorderCodesLength,
@@ -778,7 +781,7 @@ ucol_setReorderCodes(UCollator* coll,
* @see UColReorderCode
* @stable ICU 4.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getEquivalentReorderCodes(int32_t reorderCode,
int32_t* dest,
int32_t destCapacity,
@@ -796,7 +799,7 @@ ucol_getEquivalentReorderCodes(int32_t reorderCode,
* the output was truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getDisplayName( const char *objLoc,
const char *dispLoc,
UChar *result,
@@ -812,7 +815,7 @@ ucol_getDisplayName( const char *objLoc,
* @see ucol_countAvailable
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
ucol_getAvailable(int32_t localeIndex);
/**
@@ -823,7 +826,7 @@ ucol_getAvailable(int32_t localeIndex);
* @see ucol_getAvailable
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_countAvailable(void);
#if !UCONFIG_NO_SERVICE
@@ -835,7 +838,7 @@ ucol_countAvailable(void);
* responsible for closing the result.
* @stable ICU 3.0
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
ucol_openAvailableLocales(UErrorCode *status);
#endif
@@ -848,7 +851,7 @@ ucol_openAvailableLocales(UErrorCode *status);
* responsible for closing the result.
* @stable ICU 3.0
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
ucol_getKeywords(UErrorCode *status);
/**
@@ -862,7 +865,7 @@ ucol_getKeywords(UErrorCode *status);
* upon error. The caller is responsible for closing the result.
* @stable ICU 3.0
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
ucol_getKeywordValues(const char *keyword, UErrorCode *status);
/**
@@ -881,7 +884,7 @@ ucol_getKeywordValues(const char *keyword, UErrorCode *status);
* @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
ucol_getKeywordValuesForLocale(const char* key,
const char* locale,
UBool commonlyUsed,
@@ -901,7 +904,7 @@ ucol_getKeywordValuesForLocale(const char* key,
* applications who wish to cache collators, or otherwise reuse
* collators when possible. The functional equivalent may change
* over time. For more information, please see the <a
- * href="http://userguide.icu-project.org/locale#TOC-Locales-and-Services">
+ * href="https://unicode-org.github.io/icu/userguide/locale#locales-and-services">
* Locales and Services</a> section of the ICU User Guide.
* @param result fillin for the functionally equivalent result locale
* @param resultCapacity capacity of the fillin buffer
@@ -918,7 +921,7 @@ ucol_getKeywordValuesForLocale(const char* key,
* an error code will be returned.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
const char* keyword, const char* locale,
UBool* isAvailable, UErrorCode* status);
@@ -931,7 +934,7 @@ ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
* @return The collation tailoring rules.
* @stable ICU 2.0
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ucol_getRules( const UCollator *coll,
int32_t *length);
@@ -942,7 +945,7 @@ ucol_getRules( const UCollator *coll,
* This string will be normalized.
* The structure and the syntax of the string is defined in the "Naming collators"
* section of the users guide:
- * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme
+ * https://unicode-org.github.io/icu/userguide/collation/concepts#collator-naming-scheme
* This API supports preflighting.
* @param coll a collator
* @param locale a locale that will appear as a collators locale in the resulting
@@ -1014,7 +1017,7 @@ ucol_normalizeShortDefinitionString(const char *source,
* @see ucol_keyHashCode
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getSortKey(const UCollator *coll,
const UChar *source,
int32_t sourceLength,
@@ -1042,7 +1045,7 @@ ucol_getSortKey(const UCollator *coll,
* the sort key.
* @stable ICU 2.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_nextSortKeyPart(const UCollator *coll,
UCharIterator *iter,
uint32_t state[2],
@@ -1109,7 +1112,7 @@ typedef enum {
* @see ucol_keyHashCode
* @stable ICU 2.1
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getBound(const uint8_t *source,
int32_t sourceLength,
UColBoundMode boundType,
@@ -1126,7 +1129,7 @@ ucol_getBound(const uint8_t *source,
* @param info the version # information, the result will be filled in
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_getVersion(const UCollator* coll, UVersionInfo info);
/**
@@ -1136,7 +1139,7 @@ ucol_getVersion(const UCollator* coll, UVersionInfo info);
* @param info the version # information, the result will be filled in
* @stable ICU 2.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_getUCAVersion(const UCollator* coll, UVersionInfo info);
/**
@@ -1155,7 +1158,7 @@ ucol_getUCAVersion(const UCollator* coll, UVersionInfo info);
* Using strings with U+FFFE may yield shorter sort keys.
*
* For details about Sort Key Features see
- * http://userguide.icu-project.org/collation/api#TOC-Sort-Key-Features
+ * https://unicode-org.github.io/icu/userguide/collation/api#sort-key-features
*
* It is possible to merge multiple sort keys by consecutively merging
* another one with the intermediate result.
@@ -1186,7 +1189,7 @@ ucol_getUCAVersion(const UCollator* coll, UVersionInfo info);
* in which cases the contents of dest is undefined
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length,
const uint8_t *src2, int32_t src2Length,
uint8_t *dest, int32_t destCapacity);
@@ -1202,7 +1205,7 @@ ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length,
* @see ucol_getAttribute
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value, UErrorCode *status);
/**
@@ -1216,7 +1219,7 @@ ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value,
* @see ucol_setAttribute
* @stable ICU 2.0
*/
-U_STABLE UColAttributeValue U_EXPORT2
+U_CAPI UColAttributeValue U_EXPORT2
ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status);
/**
@@ -1235,7 +1238,7 @@ ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status)
* @see ucol_getMaxVariable
* @stable ICU 53
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_setMaxVariable(UCollator *coll, UColReorderCode group, UErrorCode *pErrorCode);
/**
@@ -1245,7 +1248,7 @@ ucol_setMaxVariable(UCollator *coll, UColReorderCode group, UErrorCode *pErrorCo
* @see ucol_setMaxVariable
* @stable ICU 53
*/
-U_STABLE UColReorderCode U_EXPORT2
+U_CAPI UColReorderCode U_EXPORT2
ucol_getMaxVariable(const UCollator *coll);
#ifndef U_HIDE_DEPRECATED_API
@@ -1286,7 +1289,7 @@ ucol_setVariableTop(UCollator *coll,
* @see ucol_restoreVariableTop
* @stable ICU 2.0
*/
-U_STABLE uint32_t U_EXPORT2 ucol_getVariableTop(const UCollator *coll, UErrorCode *status);
+U_CAPI uint32_t U_EXPORT2 ucol_getVariableTop(const UCollator *coll, UErrorCode *status);
#ifndef U_HIDE_DEPRECATED_API
/**
@@ -1330,7 +1333,7 @@ ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *stat
* @see ucol_close
* @stable ICU 2.0
*/
-U_STABLE UCollator* U_EXPORT2
+U_CAPI UCollator* U_EXPORT2
ucol_safeClone(const UCollator *coll,
void *stackBuffer,
int32_t *pBufferSize,
@@ -1351,7 +1354,7 @@ ucol_safeClone(const UCollator *coll,
* to store rules, will store up to available space.
*
* ucol_getRules() should normally be used instead.
- * See http://userguide.icu-project.org/collation/customization#TOC-Building-on-Existing-Locales
+ * See https://unicode-org.github.io/icu/userguide/collation/customization#building-on-existing-locales
* @param coll collator to get the rules from
* @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES.
* @param buffer buffer to store the result in. If NULL, you'll get no rules.
@@ -1360,7 +1363,7 @@ ucol_safeClone(const UCollator *coll,
* @stable ICU 2.0
* @see UCOL_FULL_RULES
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen);
#ifndef U_HIDE_DEPRECATED_API
@@ -1396,7 +1399,7 @@ ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *statu
* NULL.
* @stable ICU 2.8
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status);
/**
@@ -1409,7 +1412,7 @@ ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode
* @see uset_close
* @stable ICU 2.4
*/
-U_STABLE USet * U_EXPORT2
+U_CAPI USet * U_EXPORT2
ucol_getTailoredSet(const UCollator *coll, UErrorCode *status);
#ifndef U_HIDE_INTERNAL_API
@@ -1424,7 +1427,7 @@ ucol_getTailoredSet(const UCollator *coll, UErrorCode *status);
* @return number of elements in the set
* @internal ICU 3.0
*/
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getUnsafeSet( const UCollator *coll,
USet *unsafe,
UErrorCode *status);
@@ -1436,12 +1439,12 @@ ucol_getUnsafeSet( const UCollator *coll,
* state for a locale.
* @param parseError if not NULL, structure that will get filled with error's pre
* and post context in case of error.
- * @param forceDefaults if FALSE, the settings that are the same as the collator
+ * @param forceDefaults if false, the settings that are the same as the collator
* default settings will not be applied (for example, setting
* French secondary on a French collator would not be executed).
- * If TRUE, all the settings will be applied regardless of the
+ * If true, all the settings will be applied regardless of the
* collator default value. If the definition
- * strings are to be cached, should be set to FALSE.
+ * strings are to be cached, should be set to false.
* @param status Error code. Apart from regular error conditions connected to
* instantiating collators (like out of memory or similar), this
* API will return an error if an invalid attribute or attribute/value
@@ -1449,7 +1452,7 @@ ucol_getUnsafeSet( const UCollator *coll,
* @see ucol_openFromShortString
* @internal ICU 3.2.1
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_prepareShortStringOpen( const char *definition,
UBool forceDefaults,
UParseError *parseError,
@@ -1467,7 +1470,7 @@ ucol_prepareShortStringOpen( const char *definition,
* @see ucol_openBinary
* @stable ICU 3.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_cloneBinary(const UCollator *coll,
uint8_t *buffer, int32_t capacity,
UErrorCode *status);
@@ -1489,7 +1492,7 @@ ucol_cloneBinary(const UCollator *coll,
* @see ucol_cloneBinary
* @stable ICU 3.2
*/
-U_STABLE UCollator* U_EXPORT2
+U_CAPI UCollator* U_EXPORT2
ucol_openBinary(const uint8_t *bin, int32_t length,
const UCollator *base,
UErrorCode *status);
diff --git a/contrib/libs/icu/include/unicode/ucoleitr.h b/contrib/libs/icu/include/unicode/ucoleitr.h
index 85ec8383d7..25efcf2a08 100644
--- a/contrib/libs/icu/include/unicode/ucoleitr.h
+++ b/contrib/libs/icu/include/unicode/ucoleitr.h
@@ -23,7 +23,7 @@
#if !UCONFIG_NO_COLLATION
/**
- * This indicates an error has occured during processing or if no more CEs is
+ * This indicates an error has occurred during processing or if no more CEs is
* to be returned.
* @stable ICU 2.0
*/
@@ -66,14 +66,14 @@ typedef struct UCollationElements UCollationElements;
* . UCollationElements *c;
* . UCollatorOld *coll;
* . UErrorCode success = U_ZERO_ERROR;
- * . s=(UChar*)malloc(sizeof(UChar) * (strlen("This is a test")+1) );
- * . u_uastrcpy(s, "This is a test");
+ * . str=(UChar*)malloc(sizeof(UChar) * (strlen("This is a test")+1) );
+ * . u_uastrcpy(str, "This is a test");
* . coll = ucol_open(NULL, &success);
* . c = ucol_openElements(coll, str, u_strlen(str), &status);
* . order = ucol_next(c, &success);
* . ucol_reset(c);
* . order = ucol_prev(c, &success);
- * . free(s);
+ * . free(str);
* . ucol_close(coll);
* . ucol_closeElements(c);
* . }
@@ -102,6 +102,10 @@ typedef struct UCollationElements UCollationElements;
/**
* Open the collation elements for a string.
*
+ * The UCollationElements retains a pointer to the supplied text.
+ * The caller must not modify or delete the text while the UCollationElements
+ * object is used to iterate over this text.
+ *
* @param coll The collator containing the desired collation rules.
* @param text The text to iterate over.
* @param textLength The number of characters in text, or -1 if null-terminated
@@ -109,13 +113,12 @@ typedef struct UCollationElements UCollationElements;
* @return a struct containing collation element information
* @stable ICU 2.0
*/
-U_STABLE UCollationElements* U_EXPORT2
+U_CAPI UCollationElements* U_EXPORT2
ucol_openElements(const UCollator *coll,
const UChar *text,
int32_t textLength,
UErrorCode *status);
-
/**
* get a hash code for a key... Not very useful!
* @param key the given key.
@@ -123,7 +126,7 @@ ucol_openElements(const UCollator *coll,
* @return the hash code.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_keyHashCode(const uint8_t* key, int32_t length);
/**
@@ -132,7 +135,7 @@ ucol_keyHashCode(const uint8_t* key, int32_t length);
* @param elems The UCollationElements to close.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_closeElements(UCollationElements *elems);
/**
@@ -144,7 +147,7 @@ ucol_closeElements(UCollationElements *elems);
* @see ucol_previous
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_reset(UCollationElements *elems);
/**
@@ -153,10 +156,10 @@ ucol_reset(UCollationElements *elems);
* @param elems The UCollationElements containing the text.
* @param status A pointer to a UErrorCode to receive any errors.
* @return The next collation elements ordering, otherwise returns UCOL_NULLORDER
- * if an error has occured or if the end of string has been reached
+ * if an error has occurred or if the end of string has been reached
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_next(UCollationElements *elems, UErrorCode *status);
/**
@@ -164,15 +167,15 @@ ucol_next(UCollationElements *elems, UErrorCode *status);
* A single character may contain more than one collation element.
* Note that internally a stack is used to store buffered collation elements.
* @param elems The UCollationElements containing the text.
- * @param status A pointer to a UErrorCode to receive any errors. Noteably
+ * @param status A pointer to a UErrorCode to receive any errors. Notably
* a U_BUFFER_OVERFLOW_ERROR is returned if the internal stack
* buffer has been exhausted.
* @return The previous collation elements ordering, otherwise returns
- * UCOL_NULLORDER if an error has occured or if the start of string has
+ * UCOL_NULLORDER if an error has occurred or if the start of string has
* been reached.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_previous(UCollationElements *elems, UErrorCode *status);
/**
@@ -186,7 +189,7 @@ ucol_previous(UCollationElements *elems, UErrorCode *status);
* expansion sequence
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getMaxExpansion(const UCollationElements *elems, int32_t order);
/**
@@ -194,6 +197,11 @@ ucol_getMaxExpansion(const UCollationElements *elems, int32_t order);
* Property settings for collation will remain the same.
* In order to reset the iterator to the current collation property settings,
* the API reset() has to be called.
+ *
+ * The UCollationElements retains a pointer to the supplied text.
+ * The caller must not modify or delete the text while the UCollationElements
+ * object is used to iterate over this text.
+ *
* @param elems The UCollationElements to set.
* @param text The source text containing the collation elements.
* @param textLength The length of text, or -1 if null-terminated.
@@ -201,8 +209,8 @@ ucol_getMaxExpansion(const UCollationElements *elems, int32_t order);
* @see ucol_getText
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
-ucol_setText( UCollationElements *elems,
+U_CAPI void U_EXPORT2
+ucol_setText( UCollationElements *elems,
const UChar *text,
int32_t textLength,
UErrorCode *status);
@@ -216,7 +224,7 @@ ucol_setText( UCollationElements *elems,
* @see ucol_setOffset
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_getOffset(const UCollationElements *elems);
/**
@@ -231,9 +239,9 @@ ucol_getOffset(const UCollationElements *elems);
* @see ucol_getOffset
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucol_setOffset(UCollationElements *elems,
- int32_t offset,
+ int32_t offset,
UErrorCode *status);
/**
@@ -242,7 +250,7 @@ ucol_setOffset(UCollationElements *elems,
* @return the primary order of a collation order.
* @stable ICU 2.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_primaryOrder (int32_t order);
/**
@@ -251,7 +259,7 @@ ucol_primaryOrder (int32_t order);
* @return the secondary order of a collation order.
* @stable ICU 2.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_secondaryOrder (int32_t order);
/**
@@ -260,7 +268,7 @@ ucol_secondaryOrder (int32_t order);
* @return the tertiary order of a collation order.
* @stable ICU 2.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucol_tertiaryOrder (int32_t order);
#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/contrib/libs/icu/include/unicode/ucptrie.h b/contrib/libs/icu/include/unicode/ucptrie.h
index be06a22792..e2547ae2ee 100644
--- a/contrib/libs/icu/include/unicode/ucptrie.h
+++ b/contrib/libs/icu/include/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
/**
@@ -41,7 +43,7 @@ typedef union UCPTrieData {
/**
* Immutable Unicode code point trie structure.
* Fast, reasonably compact, map from Unicode code points (U+0000..U+10FFFF) to integer values.
- * For details see http://site.icu-project.org/design/struct/utrie
+ * For details see https://icu.unicode.org/design/struct/utrie
*
* Do not access UCPTrie fields directly; use public functions and macros.
* Functions are easy to use: They support all trie types and value widths.
@@ -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/contrib/libs/icu/include/unicode/ucsdet.h b/contrib/libs/icu/include/unicode/ucsdet.h
index 52ed5ad0ee..8c62fde9d2 100644
--- a/contrib/libs/icu/include/unicode/ucsdet.h
+++ b/contrib/libs/icu/include/unicode/ucsdet.h
@@ -25,9 +25,12 @@
#if !UCONFIG_NO_CONVERSION
-#include "unicode/localpointer.h"
#include "unicode/uenum.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: Charset Detection API
@@ -75,7 +78,7 @@ typedef struct UCharsetMatch UCharsetMatch;
* @return the newly opened charset detector.
* @stable ICU 3.6
*/
-U_STABLE UCharsetDetector * U_EXPORT2
+U_CAPI UCharsetDetector * U_EXPORT2
ucsdet_open(UErrorCode *status);
/**
@@ -87,7 +90,7 @@ ucsdet_open(UErrorCode *status);
* @param ucsd The charset detector to be closed.
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucsdet_close(UCharsetDetector *ucsd);
#if U_SHOW_CPLUSPLUS_API
@@ -124,7 +127,7 @@ U_NAMESPACE_END
*
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucsdet_setText(UCharsetDetector *ucsd, const char *textIn, int32_t len, UErrorCode *status);
@@ -146,7 +149,7 @@ ucsdet_setText(UCharsetDetector *ucsd, const char *textIn, int32_t len, UErrorCo
*
* @stable ICU 3.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucsdet_setDeclaredEncoding(UCharsetDetector *ucsd, const char *encoding, int32_t length, UErrorCode *status);
@@ -175,7 +178,7 @@ ucsdet_setDeclaredEncoding(UCharsetDetector *ucsd, const char *encoding, int32_t
*
* @stable ICU 3.6
*/
-U_STABLE const UCharsetMatch * U_EXPORT2
+U_CAPI const UCharsetMatch * U_EXPORT2
ucsdet_detect(UCharsetDetector *ucsd, UErrorCode *status);
@@ -209,7 +212,7 @@ ucsdet_detect(UCharsetDetector *ucsd, UErrorCode *status);
* the detector is closed or modified.
* @stable ICU 3.6
*/
-U_STABLE const UCharsetMatch ** U_EXPORT2
+U_CAPI const UCharsetMatch ** U_EXPORT2
ucsdet_detectAll(UCharsetDetector *ucsd, int32_t *matchesFound, UErrorCode *status);
@@ -229,7 +232,7 @@ ucsdet_detectAll(UCharsetDetector *ucsd, int32_t *matchesFound, UErrorCode *stat
*
* @stable ICU 3.6
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucsdet_getName(const UCharsetMatch *ucsm, UErrorCode *status);
/**
@@ -255,7 +258,7 @@ ucsdet_getName(const UCharsetMatch *ucsm, UErrorCode *status);
*
* @stable ICU 3.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucsdet_getConfidence(const UCharsetMatch *ucsm, UErrorCode *status);
/**
@@ -287,7 +290,7 @@ ucsdet_getConfidence(const UCharsetMatch *ucsm, UErrorCode *status);
*
* @stable ICU 3.6
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ucsdet_getLanguage(const UCharsetMatch *ucsm, UErrorCode *status);
@@ -313,7 +316,7 @@ ucsdet_getLanguage(const UCharsetMatch *ucsm, UErrorCode *status);
*
* @stable ICU 3.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucsdet_getUChars(const UCharsetMatch *ucsm,
UChar *buf, int32_t cap, UErrorCode *status);
@@ -347,7 +350,7 @@ ucsdet_getUChars(const UCharsetMatch *ucsm,
* @return an iterator providing access to the detectable charset names.
* @stable ICU 3.6
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
ucsdet_getAllDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
/**
@@ -357,11 +360,11 @@ ucsdet_getAllDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *statu
* heuristics.
*
* @param ucsd The charset detector to check.
- * @return TRUE if filtering is enabled.
+ * @return true if filtering is enabled.
* @stable ICU 3.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucsdet_isInputFilterEnabled(const UCharsetDetector *ucsd);
@@ -376,7 +379,7 @@ ucsdet_isInputFilterEnabled(const UCharsetDetector *ucsd);
*
* @stable ICU 3.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter);
#ifndef U_HIDE_INTERNAL_API
@@ -393,7 +396,7 @@ ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter);
* the specified charset detector.
* @internal
*/
-U_INTERNAL UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
ucsdet_getDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
/**
@@ -403,13 +406,13 @@ ucsdet_getDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
*
* @param ucsd a Charset detector.
* @param encoding encoding the name of charset encoding.
- * @param enabled <code>TRUE</code> to enable, or <code>FALSE</code> to disable the
+ * @param enabled <code>true</code> to enable, or <code>false</code> to disable the
* charset encoding.
* @param status receives the return status. When the name of charset encoding
* is not supported, U_ILLEGAL_ARGUMENT_ERROR is set.
* @internal
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
ucsdet_setDetectableCharset(UCharsetDetector *ucsd, const char *encoding, UBool enabled, UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
diff --git a/contrib/libs/icu/include/unicode/ucurr.h b/contrib/libs/icu/include/unicode/ucurr.h
index f91cc0df7c..5589e79990 100644
--- a/contrib/libs/icu/include/unicode/ucurr.h
+++ b/contrib/libs/icu/include/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,27 @@ typedef enum UCurrNameStyle {
*
* @stable ICU 61
*/
- UCURR_NARROW_SYMBOL_NAME
+ UCURR_NARROW_SYMBOL_NAME,
+
+ /**
+ * 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.
+ *
+ * @stable 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.
+ *
+ * @stable ICU 68
+ */
+ UCURR_VARIANT_SYMBOL_NAME
+
} UCurrNameStyle;
#if !UCONFIG_NO_SERVICE
@@ -133,7 +153,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 +165,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 +179,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 +189,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 +203,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 +214,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 +239,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 +260,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 +275,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 +289,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 +346,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 +371,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 +395,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 +419,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 +443,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 +458,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/contrib/libs/icu/include/unicode/udat.h b/contrib/libs/icu/include/unicode/udat.h
index cf7a165e70..0e6e6b76da 100644
--- a/contrib/libs/icu/include/unicode/udat.h
+++ b/contrib/libs/icu/include/unicode/udat.h
@@ -14,11 +14,15 @@
#if !UCONFIG_NO_FORMATTING
-#include "unicode/localpointer.h"
#include "unicode/ucal.h"
#include "unicode/unum.h"
#include "unicode/udisplaycontext.h"
#include "unicode/ufieldpositer.h"
+
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: DateFormat
@@ -142,7 +146,7 @@
* the date and time formatting algorithm and pattern letters defined by
* <a href="http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table">UTS#35
* Unicode Locale Data Markup Language (LDML)</a> and further documented for ICU in the
- * <a href="https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table">ICU
+ * <a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime#date-field-symbol-table">ICU
* User Guide</a>.</p>
*/
@@ -832,10 +836,24 @@ typedef enum UDateFormatField {
/**
* Maps from a UDateFormatField to the corresponding UCalendarDateFields.
- * Note: since the mapping is many-to-one, there is no inverse mapping.
+ *
+ * Note 1: Since the mapping is many-to-one, there is no inverse mapping.
+ *
+ * Note 2: There is no UErrorCode parameter, so in case of error (UDateFormatField is
+ * unknown or has no corresponding UCalendarDateFields value), the function returns the
+ * current value of UCAL_FIELD_COUNT. However, that value may change from release to
+ * release and is consequently deprecated. For a future-proof runtime way of checking
+ * for errors:
+ * a) First save the value returned by the function when it is passed an invalid value
+ * such as "(UDateFormatField)-1".
+ * b) Then, to test for errors when passing some other UDateFormatField value, check
+ * whether the function returns that saved value.
+ *
* @param field the UDateFormatField.
- * @return the UCalendarDateField. This will be UCAL_FIELD_COUNT in case
- * of error (e.g., the input field is UDAT_FIELD_COUNT).
+ * @return the UCalendarDateField. In case of error (UDateFormatField is unknown or has
+ * no corresponding UCalendarDateFields value) this will be the current value of
+ * UCAL_FIELD_COUNT, but that value may change from release to release.
+ * See Note 2 above.
* @stable ICU 4.4
*/
U_CAPI UCalendarDateFields U_EXPORT2
@@ -958,37 +976,35 @@ udat_getBooleanAttribute(const UDateFormat* fmt, UDateFormatBooleanAttribute att
U_CAPI void U_EXPORT2
udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool newValue, UErrorCode* status);
-#ifndef U_HIDE_DRAFT_API
/**
* Hour Cycle.
- * @draft ICU 67
+ * @stable ICU 67
*/
typedef enum UDateFormatHourCycle {
/**
* Hour in am/pm (0~11)
- * @draft ICU 67
+ * @stable ICU 67
*/
UDAT_HOUR_CYCLE_11,
/**
* Hour in am/pm (1~12)
- * @draft ICU 67
+ * @stable ICU 67
*/
UDAT_HOUR_CYCLE_12,
/**
* Hour in day (0~23)
- * @draft ICU 67
+ * @stable ICU 67
*/
UDAT_HOUR_CYCLE_23,
/**
* Hour in day (1~24)
- * @draft ICU 67
+ * @stable ICU 67
*/
UDAT_HOUR_CYCLE_24
} UDateFormatHourCycle;
-#endif /* U_HIDE_DRAFT_API */
#if U_SHOW_CPLUSPLUS_API
@@ -1217,7 +1233,7 @@ udat_parseCalendar(const UDateFormat* format,
* With lenient parsing, the parser may use heuristics to interpret inputs that do not
* precisely match the pattern. With strict parsing, inputs must match the pattern.
* @param fmt The formatter to query
-* @return TRUE if fmt is set to perform lenient parsing, FALSE otherwise.
+* @return true if fmt is set to perform lenient parsing, false otherwise.
* @see udat_setLenient
* @stable ICU 2.0
*/
@@ -1229,7 +1245,7 @@ udat_isLenient(const UDateFormat* fmt);
* With lenient parsing, the parser may use heuristics to interpret inputs that do not
* precisely match the pattern. With strict parsing, inputs must match the pattern.
* @param fmt The formatter to set
-* @param isLenient TRUE if fmt should perform lenient parsing, FALSE otherwise.
+* @param isLenient true if fmt should perform lenient parsing, false otherwise.
* @see dat_isLenient
* @stable ICU 2.0
*/
@@ -1389,7 +1405,7 @@ udat_set2DigitYearStart( UDateFormat *fmt,
* Extract the pattern from a UDateFormat.
* The pattern will follow the pattern syntax rules.
* @param fmt The formatter to query.
-* @param localized TRUE if the pattern should be localized, FALSE otherwise.
+* @param localized true if the pattern should be localized, false otherwise.
* @param result A pointer to a buffer to receive the pattern.
* @param resultLength The maximum size of result.
* @param status A pointer to an UErrorCode to receive any errors
@@ -1408,7 +1424,7 @@ udat_toPattern( const UDateFormat *fmt,
* Set the pattern used by an UDateFormat.
* The pattern should follow the pattern syntax rules.
* @param format The formatter to set.
-* @param localized TRUE if the pattern is localized, FALSE otherwise.
+* @param localized true if the pattern is localized, false otherwise.
* @param pattern The new pattern
* @param patternLength The length of pattern, or -1 if null-terminated.
* @see udat_toPattern
@@ -1514,7 +1530,21 @@ typedef enum UDateFormatSymbolType {
* udat_setSymbols not supported for UDAT_ZODIAC_NAMES_NARROW)
* @stable ICU 54
*/
- UDAT_ZODIAC_NAMES_NARROW
+ UDAT_ZODIAC_NAMES_NARROW,
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * The narrow quarter names, for example 1
+ * @draft ICU 70
+ */
+ UDAT_NARROW_QUARTERS,
+
+ /**
+ * The narrow standalone quarter names, for example 1
+ * @draft ICU 70
+ */
+ UDAT_STANDALONE_NARROW_QUARTERS
+#endif // U_HIDE_DRAFT_API
} UDateFormatSymbolType;
struct UDateFormatSymbols;
@@ -1550,7 +1580,7 @@ udat_getSymbols(const UDateFormat *fmt,
/**
* Count the number of particular symbols for an UDateFormat.
-* This function is most useful as for detemining the loop termination condition
+* This function is most useful as for determining the loop termination condition
* for calls to {@link #udat_getSymbols }.
* @param fmt The formatter to query.
* @param type The type of symbols to count. One of UDAT_ERAS, UDAT_MONTHS, UDAT_SHORT_MONTHS,
@@ -1636,7 +1666,7 @@ udat_getContext(const UDateFormat* fmt, UDisplayContextType type, UErrorCode* st
* @see udat_applyPatternRelative
* @internal ICU 4.2 technology preview
*/
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udat_toPatternRelativeDate(const UDateFormat *fmt,
UChar *result,
int32_t resultLength,
@@ -1653,7 +1683,7 @@ udat_toPatternRelativeDate(const UDateFormat *fmt,
* @see udat_applyPatternRelative
* @internal ICU 4.2 technology preview
*/
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udat_toPatternRelativeTime(const UDateFormat *fmt,
UChar *result,
int32_t resultLength,
@@ -1671,7 +1701,7 @@ udat_toPatternRelativeTime(const UDateFormat *fmt,
* @see udat_toPatternRelativeDate, udat_toPatternRelativeTime
* @internal ICU 4.2 technology preview
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
udat_applyPatternRelative(UDateFormat *format,
const UChar *datePattern,
int32_t datePatternLength,
@@ -1696,14 +1726,14 @@ typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle timeStyle
* Register a provider factory
* @internal ICU 49
*/
-U_INTERNAL void U_EXPORT2
+U_CAPI void U_EXPORT2
udat_registerOpener(UDateFormatOpener opener, UErrorCode *status);
/**
* Un-Register a provider factory
* @internal ICU 49
*/
-U_INTERNAL UDateFormatOpener U_EXPORT2
+U_CAPI UDateFormatOpener U_EXPORT2
udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status);
#endif /* U_HIDE_INTERNAL_API */
diff --git a/contrib/libs/icu/include/unicode/udata.h b/contrib/libs/icu/include/unicode/udata.h
index 325ffcf17d..c5b1adc359 100644
--- a/contrib/libs/icu/include/unicode/udata.h
+++ b/contrib/libs/icu/include/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 <code>UDataInfo</code> structure
* of data that has been loaded and will be returned
* by <code>udata_openChoice()</code> if this function
- * returns <code>TRUE</code>.
- * @return TRUE if the current data memory is acceptable
+ * returns <code>true</code>.
+ * @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);
@@ -228,7 +231,7 @@ udata_open(const char *path, const char *type, const char *name,
* logically prepended to the ICU data directory string.</p>
*
* <p>For details about ICU data loading see the User Guide
- * Data Management chapter. (http://icu-project.org/userguide/icudata.html)</p>
+ * Data Management chapter. (https://unicode-org.github.io/icu/userguide/icu_data/)</p>
*
* @param path Specifies an absolute path and/or a basename for the
* finding of the data in the file system.
@@ -239,7 +242,7 @@ udata_open(const char *path, const char *type, const char *name,
* This may be <code>NULL</code> 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 <code>udata_openChoice()</code>
* 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 <code>U_USING_DEFAULT_WARNING, U_UNSUPPORTED_ERROR</code>
* @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.
@@ -359,7 +362,7 @@ udata_setCommonData(const void *data, UErrorCode *err);
*
*
* Warning: setAppData will set a U_USING_DEFAULT_WARNING code if
- * data with the specifed path that has already been opened, or
+ * data with the specified path that has already been opened, or
* if setAppData with the same path has already been called.
* Any such calls to setAppData will have no effect.
*
@@ -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/contrib/libs/icu/include/unicode/udateintervalformat.h b/contrib/libs/icu/include/unicode/udateintervalformat.h
index 2f9ec91ad3..8439444d07 100644
--- a/contrib/libs/icu/include/unicode/udateintervalformat.h
+++ b/contrib/libs/icu/include/unicode/udateintervalformat.h
@@ -16,8 +16,12 @@
#include "unicode/ucal.h"
#include "unicode/umisc.h"
-#include "unicode/localpointer.h"
#include "unicode/uformattedvalue.h"
+#include "unicode/udisplaycontext.h"
+
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -114,7 +118,7 @@ typedef struct UFormattedDateInterval UFormattedDateInterval;
* or NULL if an error occurred.
* @stable ICU 4.8
*/
-U_STABLE UDateIntervalFormat* U_EXPORT2
+U_CAPI UDateIntervalFormat* U_EXPORT2
udtitvfmt_open(const char* locale,
const UChar* skeleton,
int32_t skeletonLength,
@@ -128,7 +132,7 @@ udtitvfmt_open(const char* locale,
* The UDateIntervalFormat object to close.
* @stable ICU 4.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udtitvfmt_close(UDateIntervalFormat *formatter);
/**
@@ -238,7 +242,7 @@ U_NAMESPACE_END
* output was truncated.
* @stable ICU 4.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udtitvfmt_format(const UDateIntervalFormat* formatter,
UDate fromDate,
UDate toDate,
@@ -248,7 +252,6 @@ udtitvfmt_format(const UDateIntervalFormat* formatter,
UErrorCode* status);
-#ifndef U_HIDE_DRAFT_API
/**
* Formats a date/time range using the conventions established for the
* UDateIntervalFormat object.
@@ -263,9 +266,9 @@ udtitvfmt_format(const UDateIntervalFormat* formatter,
* formatting operation.
* @param status
* A pointer to a UErrorCode to receive any errors.
- * @draft ICU 67
+ * @stable ICU 67
*/
-U_DRAFT void U_EXPORT2
+U_CAPI void U_EXPORT2
udtitvfmt_formatToResult(
const UDateIntervalFormat* formatter,
UDate fromDate,
@@ -287,18 +290,42 @@ udtitvfmt_formatToResult(
* formatting operation.
* @param status
* A pointer to a UErrorCode to receive any errors.
- * @draft ICU 67
+ * @stable ICU 67
*/
-U_DRAFT void U_EXPORT2
+U_CAPI void U_EXPORT2
udtitvfmt_formatCalendarToResult(
const UDateIntervalFormat* formatter,
UCalendar* fromCalendar,
UCalendar* toCalendar,
UFormattedDateInterval* result,
UErrorCode* status);
-#endif /* U_HIDE_DRAFT_API */
+/**
+ * Set a particular UDisplayContext value in the formatter, such as
+ * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. This causes the formatted
+ * result to be capitalized appropriately for the context in which
+ * it is intended to be used, considering both the locale and the
+ * type of field at the beginning of the formatted result.
+ * @param formatter The formatter for which to set a UDisplayContext value.
+ * @param value The UDisplayContext value to set.
+ * @param status A pointer to an UErrorCode to receive any errors
+ * @stable ICU 68
+ */
+U_CAPI void U_EXPORT2
+udtitvfmt_setContext(UDateIntervalFormat* formatter, UDisplayContext value, UErrorCode* status);
+
+/**
+ * Get the formatter's UDisplayContext value for the specified UDisplayContextType,
+ * such as UDISPCTX_TYPE_CAPITALIZATION.
+ * @param formatter The formatter to query.
+ * @param type The UDisplayContextType whose value to return
+ * @param status A pointer to an UErrorCode to receive any errors
+ * @return The UDisplayContextValue for the specified type.
+ * @stable ICU 68
+ */
+U_CAPI UDisplayContext U_EXPORT2
+udtitvfmt_getContext(const UDateIntervalFormat* formatter, UDisplayContextType type, UErrorCode* status);
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/include/unicode/udatpg.h b/contrib/libs/icu/include/unicode/udatpg.h
index 5abe1472a6..efe4357bfe 100644
--- a/contrib/libs/icu/include/unicode/udatpg.h
+++ b/contrib/libs/icu/include/unicode/udatpg.h
@@ -22,7 +22,10 @@
#include "unicode/utypes.h"
#include "unicode/udat.h"
#include "unicode/uenum.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -161,7 +164,7 @@ typedef enum UDateTimePatternConflict {
* @return a pointer to UDateTimePatternGenerator.
* @stable ICU 3.8
*/
-U_STABLE UDateTimePatternGenerator * U_EXPORT2
+U_CAPI UDateTimePatternGenerator * U_EXPORT2
udatpg_open(const char *locale, UErrorCode *pErrorCode);
/**
@@ -171,7 +174,7 @@ udatpg_open(const char *locale, UErrorCode *pErrorCode);
* @return a pointer to UDateTimePatternGenerator.
* @stable ICU 3.8
*/
-U_STABLE UDateTimePatternGenerator * U_EXPORT2
+U_CAPI UDateTimePatternGenerator * U_EXPORT2
udatpg_openEmpty(UErrorCode *pErrorCode);
/**
@@ -179,7 +182,7 @@ udatpg_openEmpty(UErrorCode *pErrorCode);
* @param dtpg a pointer to UDateTimePatternGenerator.
* @stable ICU 3.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udatpg_close(UDateTimePatternGenerator *dtpg);
#if U_SHOW_CPLUSPLUS_API
@@ -209,7 +212,7 @@ U_NAMESPACE_END
* @return a pointer to a new UDateTimePatternGenerator.
* @stable ICU 3.8
*/
-U_STABLE UDateTimePatternGenerator * U_EXPORT2
+U_CAPI UDateTimePatternGenerator * U_EXPORT2
udatpg_clone(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode);
/**
@@ -235,7 +238,7 @@ udatpg_clone(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode);
* @return the length of bestPattern.
* @stable ICU 3.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udatpg_getBestPattern(UDateTimePatternGenerator *dtpg,
const UChar *skeleton, int32_t length,
UChar *bestPattern, int32_t capacity,
@@ -271,7 +274,7 @@ udatpg_getBestPattern(UDateTimePatternGenerator *dtpg,
* @return the length of bestPattern.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udatpg_getBestPatternWithOptions(UDateTimePatternGenerator *dtpg,
const UChar *skeleton, int32_t length,
UDateTimePatternMatchOptions options,
@@ -299,7 +302,7 @@ udatpg_getBestPatternWithOptions(UDateTimePatternGenerator *dtpg,
* @return the length of skeleton.
* @stable ICU 3.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udatpg_getSkeleton(UDateTimePatternGenerator *unusedDtpg,
const UChar *pattern, int32_t length,
UChar *skeleton, int32_t capacity,
@@ -329,7 +332,7 @@ udatpg_getSkeleton(UDateTimePatternGenerator *unusedDtpg,
* @return the length of baseSkeleton.
* @stable ICU 3.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udatpg_getBaseSkeleton(UDateTimePatternGenerator *unusedDtpg,
const UChar *pattern, int32_t length,
UChar *baseSkeleton, int32_t capacity,
@@ -338,7 +341,7 @@ udatpg_getBaseSkeleton(UDateTimePatternGenerator *unusedDtpg,
/**
* Adds a pattern to the generator. If the pattern has the same skeleton as
* an existing pattern, and the override parameter is set, then the previous
- * value is overriden. Otherwise, the previous value is retained. In either
+ * value is overridden. Otherwise, the previous value is retained. In either
* case, the conflicting status is set and previous vale is stored in
* conflicting pattern.
* <p>
@@ -359,7 +362,7 @@ udatpg_getBaseSkeleton(UDateTimePatternGenerator *unusedDtpg,
* UDATPG_BASE_CONFLICT or UDATPG_CONFLICT.
* @stable ICU 3.8
*/
-U_STABLE UDateTimePatternConflict U_EXPORT2
+U_CAPI UDateTimePatternConflict U_EXPORT2
udatpg_addPattern(UDateTimePatternGenerator *dtpg,
const UChar *pattern, int32_t patternLength,
UBool override,
@@ -386,7 +389,7 @@ udatpg_addPattern(UDateTimePatternGenerator *dtpg,
* @param length the length of value.
* @stable ICU 3.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udatpg_setAppendItemFormat(UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
const UChar *value, int32_t length);
@@ -401,7 +404,7 @@ udatpg_setAppendItemFormat(UDateTimePatternGenerator *dtpg,
* @return appendItemFormat for field.
* @stable ICU 3.8
*/
-U_STABLE const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
udatpg_getAppendItemFormat(const UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
int32_t *pLength);
@@ -419,7 +422,7 @@ udatpg_getAppendItemFormat(const UDateTimePatternGenerator *dtpg,
* @param length the length of value.
* @stable ICU 3.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udatpg_setAppendItemName(UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
const UChar *value, int32_t length);
@@ -436,7 +439,7 @@ udatpg_setAppendItemName(UDateTimePatternGenerator *dtpg,
* @see udatpg_getFieldDisplayName
* @stable ICU 3.8
*/
-U_STABLE const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
udatpg_getAppendItemName(const UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
int32_t *pLength);
@@ -466,7 +469,7 @@ udatpg_getAppendItemName(const UDateTimePatternGenerator *dtpg,
* truncated result.
* @stable ICU 61
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udatpg_getFieldDisplayName(const UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
UDateTimePGDisplayWidth width,
@@ -496,7 +499,7 @@ udatpg_getFieldDisplayName(const UDateTimePatternGenerator *dtpg,
* @param length the length of dtFormat.
* @stable ICU 3.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udatpg_setDateTimeFormat(const UDateTimePatternGenerator *dtpg,
const UChar *dtFormat, int32_t length);
@@ -507,7 +510,7 @@ udatpg_setDateTimeFormat(const UDateTimePatternGenerator *dtpg,
* @return dateTimeFormat.
* @stable ICU 3.8
*/
-U_STABLE const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
udatpg_getDateTimeFormat(const UDateTimePatternGenerator *dtpg,
int32_t *pLength);
@@ -524,7 +527,7 @@ udatpg_getDateTimeFormat(const UDateTimePatternGenerator *dtpg,
* @param length the length of decimal.
* @stable ICU 3.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
udatpg_setDecimal(UDateTimePatternGenerator *dtpg,
const UChar *decimal, int32_t length);
@@ -536,7 +539,7 @@ udatpg_setDecimal(UDateTimePatternGenerator *dtpg,
* @return corresponding to the decimal point.
* @stable ICU 3.8
*/
-U_STABLE const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
udatpg_getDecimal(const UDateTimePatternGenerator *dtpg,
int32_t *pLength);
@@ -565,7 +568,7 @@ udatpg_getDecimal(const UDateTimePatternGenerator *dtpg,
* @return the length of dest.
* @stable ICU 3.8
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udatpg_replaceFieldTypes(UDateTimePatternGenerator *dtpg,
const UChar *pattern, int32_t patternLength,
const UChar *skeleton, int32_t skeletonLength,
@@ -602,7 +605,7 @@ udatpg_replaceFieldTypes(UDateTimePatternGenerator *dtpg,
* @return the length of dest.
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
udatpg_replaceFieldTypesWithOptions(UDateTimePatternGenerator *dtpg,
const UChar *pattern, int32_t patternLength,
const UChar *skeleton, int32_t skeletonLength,
@@ -621,7 +624,7 @@ udatpg_replaceFieldTypesWithOptions(UDateTimePatternGenerator *dtpg,
* The caller must close the object.
* @stable ICU 3.8
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
udatpg_openSkeletons(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode);
/**
@@ -634,7 +637,7 @@ udatpg_openSkeletons(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCo
* The caller must close the object.
* @stable ICU 3.8
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
udatpg_openBaseSkeletons(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode);
/**
@@ -647,14 +650,13 @@ udatpg_openBaseSkeletons(const UDateTimePatternGenerator *dtpg, UErrorCode *pErr
* @return pattern corresponding to a given skeleton.
* @stable ICU 3.8
*/
-U_STABLE const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
udatpg_getPatternForSkeleton(const UDateTimePatternGenerator *dtpg,
const UChar *skeleton, int32_t skeletonLength,
int32_t *pLength);
#if !UCONFIG_NO_FORMATTING
-#ifndef U_HIDE_DRAFT_API
/**
* Return the default hour cycle for a locale. Uses the locale that the
* UDateTimePatternGenerator was initially created with.
@@ -666,11 +668,10 @@ udatpg_getPatternForSkeleton(const UDateTimePatternGenerator *dtpg,
* failure before the function call. Set to U_UNSUPPORTED_ERROR
* if used on an empty instance.
* @return the default hour cycle.
- * @draft ICU 67
+ * @stable ICU 67
*/
-U_DRAFT UDateFormatHourCycle U_EXPORT2
+U_CAPI UDateFormatHourCycle U_EXPORT2
udatpg_getDefaultHourCycle(const UDateTimePatternGenerator *dtpg, UErrorCode* pErrorCode);
-#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/include/unicode/udisplaycontext.h b/contrib/libs/icu/include/unicode/udisplaycontext.h
index 398481c681..6e14217980 100644
--- a/contrib/libs/icu/include/unicode/udisplaycontext.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/uenum.h b/contrib/libs/icu/include/unicode/uenum.h
index c670eeafb1..d9c893e06d 100644
--- a/contrib/libs/icu/include/unicode/uenum.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/ufieldpositer.h b/contrib/libs/icu/include/unicode/ufieldpositer.h
index 3ae73b6d84..83df184f0a 100644
--- a/contrib/libs/icu/include/unicode/ufieldpositer.h
+++ b/contrib/libs/icu/include/unicode/ufieldpositer.h
@@ -14,7 +14,9 @@
#if !UCONFIG_NO_FORMATTING
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -52,7 +54,7 @@ typedef struct UFieldPositionIterator UFieldPositionIterator; /**< C typedef fo
* or NULL if an error occurred.
* @stable ICU 55
*/
-U_STABLE UFieldPositionIterator* U_EXPORT2
+U_CAPI UFieldPositionIterator* U_EXPORT2
ufieldpositer_open(UErrorCode* status);
/**
@@ -61,7 +63,7 @@ ufieldpositer_open(UErrorCode* status);
* A pointer to the UFieldPositionIterator object to close.
* @stable ICU 55
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ufieldpositer_close(UFieldPositionIterator *fpositer);
@@ -112,7 +114,7 @@ U_NAMESPACE_END
*
* @stable ICU 55
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ufieldpositer_next(UFieldPositionIterator *fpositer,
int32_t *beginIndex, int32_t *endIndex);
diff --git a/contrib/libs/icu/include/unicode/uformattable.h b/contrib/libs/icu/include/unicode/uformattable.h
index 9ba2a36901..4c4a307a24 100644
--- a/contrib/libs/icu/include/unicode/uformattable.h
+++ b/contrib/libs/icu/include/unicode/uformattable.h
@@ -34,7 +34,9 @@
#if !UCONFIG_NO_FORMATTING
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* Enum designating the type of a UFormattable instance.
@@ -79,7 +81,7 @@ typedef void *UFormattable;
* @see ufmt_close
* @see icu::Formattable::Formattable()
*/
-U_STABLE UFormattable* U_EXPORT2
+U_CAPI UFormattable* U_EXPORT2
ufmt_open(UErrorCode* status);
/**
@@ -88,7 +90,7 @@ ufmt_open(UErrorCode* status);
* @stable ICU 52
* @see ufmt_open
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ufmt_close(UFormattable* fmt);
#if U_SHOW_CPLUSPLUS_API
@@ -120,7 +122,7 @@ U_NAMESPACE_END
* @see icu::Formattable::getType() const
* @stable ICU 52
*/
-U_STABLE UFormattableType U_EXPORT2
+U_CAPI UFormattableType U_EXPORT2
ufmt_getType(const UFormattable* fmt, UErrorCode *status);
/**
@@ -131,7 +133,7 @@ ufmt_getType(const UFormattable* fmt, UErrorCode *status);
* @see icu::Formattable::isNumeric() const
* @stable ICU 52
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ufmt_isNumeric(const UFormattable* fmt);
/**
@@ -144,7 +146,7 @@ ufmt_isNumeric(const UFormattable* fmt);
* @stable ICU 52
* @see icu::Formattable::getDate(UErrorCode&) const
*/
-U_STABLE UDate U_EXPORT2
+U_CAPI UDate U_EXPORT2
ufmt_getDate(const UFormattable* fmt, UErrorCode *status);
/**
@@ -162,7 +164,7 @@ ufmt_getDate(const UFormattable* fmt, UErrorCode *status);
* @stable ICU 52
* @see icu::Formattable::getDouble(UErrorCode&) const
*/
-U_STABLE double U_EXPORT2
+U_CAPI double U_EXPORT2
ufmt_getDouble(UFormattable* fmt, UErrorCode *status);
/**
@@ -171,7 +173,7 @@ ufmt_getDouble(UFormattable* fmt, UErrorCode *status);
* as appropriate, is returned and the status is set to
* U_INVALID_FORMAT_ERROR. If this object is of type UFMT_INT64 and
* it fits within a long, then no precision is lost. If it is of
- * type kDouble or kDecimalNumber, then a conversion is peformed, with
+ * type kDouble or kDecimalNumber, then a conversion is performed, with
* truncation of any fractional part. If the type is UFMT_OBJECT and
* the object is a Measure, then the result of
* getNumber().getLong(status) is returned. If this object is
@@ -183,7 +185,7 @@ ufmt_getDouble(UFormattable* fmt, UErrorCode *status);
* @stable ICU 52
* @see icu::Formattable::getLong(UErrorCode&) const
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ufmt_getLong(UFormattable* fmt, UErrorCode *status);
@@ -193,7 +195,7 @@ ufmt_getLong(UFormattable* fmt, UErrorCode *status);
* the maximum or minimum int64 value, as appropriate, is returned
* and the status is set to U_INVALID_FORMAT_ERROR. If the
* magnitude fits in an int64, then a casting conversion is
- * peformed, with truncation of any fractional part. If the type
+ * performed, with truncation of any fractional part. If the type
* is UFMT_OBJECT and the object is a Measure, then the result of
* getNumber().getDouble(status) is returned. If this object is
* neither a numeric type nor a Measure, then 0 is returned and
@@ -204,7 +206,7 @@ ufmt_getLong(UFormattable* fmt, UErrorCode *status);
* @stable ICU 52
* @see icu::Formattable::getInt64(UErrorCode&) const
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
ufmt_getInt64(UFormattable* fmt, UErrorCode *status);
/**
@@ -217,7 +219,7 @@ ufmt_getInt64(UFormattable* fmt, UErrorCode *status);
* @stable ICU 52
* @see icu::Formattable::getObject() const
*/
-U_STABLE const void *U_EXPORT2
+U_CAPI const void *U_EXPORT2
ufmt_getObject(const UFormattable* fmt, UErrorCode *status);
/**
@@ -232,7 +234,7 @@ ufmt_getObject(const UFormattable* fmt, UErrorCode *status);
* @stable ICU 52
* @see icu::Formattable::getString(UnicodeString&)const
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ufmt_getUChars(UFormattable* fmt, int32_t *len, UErrorCode *status);
/**
@@ -243,7 +245,7 @@ ufmt_getUChars(UFormattable* fmt, int32_t *len, UErrorCode *status);
* @stable ICU 52
* @see ufmt_getArrayItemByIndex
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ufmt_getArrayLength(const UFormattable* fmt, UErrorCode *status);
/**
@@ -255,7 +257,7 @@ ufmt_getArrayLength(const UFormattable* fmt, UErrorCode *status);
* @stable ICU 52
* @see icu::Formattable::getArray(int32_t&, UErrorCode&) const
*/
-U_STABLE UFormattable * U_EXPORT2
+U_CAPI UFormattable * U_EXPORT2
ufmt_getArrayItemByIndex(UFormattable* fmt, int32_t n, UErrorCode *status);
/**
@@ -265,7 +267,7 @@ ufmt_getArrayItemByIndex(UFormattable* fmt, int32_t n, UErrorCode *status);
* the full precision and range of the original input, unconstrained by
* the limits of a double floating point or a 64 bit int.
*
- * This function is not thread safe, and therfore is not declared const,
+ * This function is not thread safe, and therefore is not declared const,
* even though it is logically const.
* The resulting buffer is owned by the UFormattable and is invalid if any other functions are
* called on the UFormattable.
@@ -280,7 +282,7 @@ ufmt_getArrayItemByIndex(UFormattable* fmt, int32_t n, UErrorCode *status);
* @stable ICU 52
* @see icu::Formattable::getDecimalNumber(UErrorCode&)
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
ufmt_getDecNumChars(UFormattable *fmt, int32_t *len, UErrorCode *status);
#endif
diff --git a/contrib/libs/icu/include/unicode/uformattedvalue.h b/contrib/libs/icu/include/unicode/uformattedvalue.h
index 07f4281f57..1a550e8758 100644
--- a/contrib/libs/icu/include/unicode/uformattedvalue.h
+++ b/contrib/libs/icu/include/unicode/uformattedvalue.h
@@ -93,6 +93,15 @@ typedef enum UFieldCategory {
*/
UFIELD_CATEGORY_DATE_INTERVAL_SPAN = 0x1000 + UFIELD_CATEGORY_DATE_INTERVAL,
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Category for spans in a number range.
+ *
+ * @draft ICU 69
+ */
+ UFIELD_CATEGORY_NUMBER_RANGE_SPAN = 0x1000 + UFIELD_CATEGORY_NUMBER,
+#endif // U_HIDE_DRAFT_API
+
} UFieldCategory;
@@ -120,7 +129,7 @@ typedef struct UConstrainedFieldPosition UConstrainedFieldPosition;
* @return The new object, or NULL if an error occurs.
* @stable ICU 64
*/
-U_STABLE UConstrainedFieldPosition* U_EXPORT2
+U_CAPI UConstrainedFieldPosition* U_EXPORT2
ucfpos_open(UErrorCode* ec);
@@ -133,7 +142,7 @@ ucfpos_open(UErrorCode* ec);
* @param ec Set if an error occurs.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucfpos_reset(
UConstrainedFieldPosition* ucfpos,
UErrorCode* ec);
@@ -145,7 +154,7 @@ ucfpos_reset(
* @param ucfpos The instance of UConstrainedFieldPosition.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucfpos_close(UConstrainedFieldPosition* ucfpos);
@@ -174,7 +183,7 @@ ucfpos_close(UConstrainedFieldPosition* ucfpos);
* @param ec Set if an error occurs.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucfpos_constrainCategory(
UConstrainedFieldPosition* ucfpos,
int32_t category,
@@ -207,7 +216,7 @@ ucfpos_constrainCategory(
* @param ec Set if an error occurs.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucfpos_constrainField(
UConstrainedFieldPosition* ucfpos,
int32_t category,
@@ -220,14 +229,14 @@ ucfpos_constrainField(
*
* If a category or field constraint was set, this function returns the constrained
* category. Otherwise, the return value is well-defined only after
- * ufmtval_nextPosition returns TRUE.
+ * ufmtval_nextPosition returns true.
*
* @param ucfpos The instance of UConstrainedFieldPosition.
* @param ec Set if an error occurs.
* @return The field category saved in the instance.
* @stable ICU 64
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucfpos_getCategory(
const UConstrainedFieldPosition* ucfpos,
UErrorCode* ec);
@@ -238,14 +247,14 @@ ucfpos_getCategory(
*
* If a field constraint was set, this function returns the constrained
* field. Otherwise, the return value is well-defined only after
- * ufmtval_nextPosition returns TRUE.
+ * ufmtval_nextPosition returns true.
*
* @param ucfpos The instance of UConstrainedFieldPosition.
* @param ec Set if an error occurs.
* @return The field saved in the instance.
* @stable ICU 64
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ucfpos_getField(
const UConstrainedFieldPosition* ucfpos,
UErrorCode* ec);
@@ -254,7 +263,7 @@ ucfpos_getField(
/**
* Gets the INCLUSIVE start and EXCLUSIVE end index stored for the current position.
*
- * The output values are well-defined only after ufmtval_nextPosition returns TRUE.
+ * The output values are well-defined only after ufmtval_nextPosition returns true.
*
* @param ucfpos The instance of UConstrainedFieldPosition.
* @param pStart Set to the start index saved in the instance. Ignored if nullptr.
@@ -262,7 +271,7 @@ ucfpos_getField(
* @param ec Set if an error occurs.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucfpos_getIndexes(
const UConstrainedFieldPosition* ucfpos,
int32_t* pStart,
@@ -282,7 +291,7 @@ ucfpos_getIndexes(
* @return The current iteration context from ucfpos_setInt64IterationContext.
* @stable ICU 64
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
ucfpos_getInt64IterationContext(
const UConstrainedFieldPosition* ucfpos,
UErrorCode* ec);
@@ -298,7 +307,7 @@ ucfpos_getInt64IterationContext(
* @param ec Set if an error occurs.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucfpos_setInt64IterationContext(
UConstrainedFieldPosition* ucfpos,
int64_t context,
@@ -317,7 +326,7 @@ ucfpos_setInt64IterationContext(
* @param ec Set if an error occurs.
* @stable ICU 64
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ucfpos_matchesField(
const UConstrainedFieldPosition* ucfpos,
int32_t category,
@@ -341,7 +350,7 @@ ucfpos_matchesField(
* @param ec Set if an error occurs.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ucfpos_setState(
UConstrainedFieldPosition* ucfpos,
int32_t category,
@@ -374,7 +383,7 @@ typedef struct UFormattedValue UFormattedValue;
* @return A NUL-terminated char16 string owned by the UFormattedValue.
* @stable ICU 64
*/
-U_STABLE const UChar* U_EXPORT2
+U_CAPI const UChar* U_EXPORT2
ufmtval_getString(
const UFormattedValue* ufmtval,
int32_t* pLength,
@@ -401,10 +410,10 @@ ufmtval_getString(
* see ucfpos_constrainCategory
* and ucfpos_constrainField.
* @param ec Set if an error occurs.
- * @return TRUE if another position was found; FALSE otherwise.
+ * @return true if another position was found; false otherwise.
* @stable ICU 64
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ufmtval_nextPosition(
const UFormattedValue* ufmtval,
UConstrainedFieldPosition* ucfpos,
diff --git a/contrib/libs/icu/include/unicode/ugender.h b/contrib/libs/icu/include/unicode/ugender.h
index 903f3dd5de..7093686b8f 100644
--- a/contrib/libs/icu/include/unicode/ugender.h
+++ b/contrib/libs/icu/include/unicode/ugender.h
@@ -14,7 +14,9 @@
#if !UCONFIG_NO_FORMATTING
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -63,7 +65,7 @@ typedef struct UGenderInfo UGenderInfo;
* @return A UGenderInfo for the specified locale, or NULL if an error occurred.
* @stable ICU 50
*/
-U_STABLE const UGenderInfo* U_EXPORT2
+U_CAPI const UGenderInfo* U_EXPORT2
ugender_getInstance(const char *locale, UErrorCode *status);
@@ -76,7 +78,7 @@ ugender_getInstance(const char *locale, UErrorCode *status);
* @return The gender of the list.
* @stable ICU 50
*/
-U_STABLE UGender U_EXPORT2
+U_CAPI UGender U_EXPORT2
ugender_getListGender(const UGenderInfo* genderInfo, const UGender *genders, int32_t size, UErrorCode *status);
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/include/unicode/uidna.h b/contrib/libs/icu/include/unicode/uidna.h
index 0dafb76201..24a81ceadd 100644
--- a/contrib/libs/icu/include/unicode/uidna.h
+++ b/contrib/libs/icu/include/unicode/uidna.h
@@ -23,9 +23,13 @@
#if !UCONFIG_NO_IDNA
-#include "unicode/localpointer.h"
+#include <stdbool.h>
#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/contrib/libs/icu/include/unicode/uiter.h b/contrib/libs/icu/include/unicode/uiter.h
index 11ad75acd5..be232c774d 100644
--- a/contrib/libs/icu/include/unicode/uiter.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/uldnames.h b/contrib/libs/icu/include/unicode/uldnames.h
index 3ebffa23db..47b047ece9 100644
--- a/contrib/libs/icu/include/unicode/uldnames.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/ulistformatter.h b/contrib/libs/icu/include/unicode/ulistformatter.h
index 2bdf0f81f0..8334c7852f 100644
--- a/contrib/libs/icu/include/unicode/ulistformatter.h
+++ b/contrib/libs/icu/include/unicode/ulistformatter.h
@@ -14,9 +14,12 @@
#if !UCONFIG_NO_FORMATTING
-#include "unicode/localpointer.h"
#include "unicode/uformattedvalue.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: Format a list in a locale-appropriate way.
@@ -59,17 +62,16 @@ typedef enum UListFormatterField {
ULISTFMT_ELEMENT_FIELD
} UListFormatterField;
-#ifndef U_HIDE_DRAFT_API
/**
* Type of meaning expressed by the list.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
typedef enum UListFormatterType {
/**
* Conjunction formatting, e.g. "Alice, Bob, Charlie, and Delta".
*
- * @draft ICU 67
+ * @stable ICU 67
*/
ULISTFMT_TYPE_AND,
@@ -77,14 +79,14 @@ typedef enum UListFormatterType {
* Disjunction (or alternative, or simply one of) formatting, e.g.
* "Alice, Bob, Charlie, or Delta".
*
- * @draft ICU 67
+ * @stable ICU 67
*/
ULISTFMT_TYPE_OR,
/**
* Formatting of a list of values with units, e.g. "5 pounds, 12 ounces".
*
- * @draft ICU 67
+ * @stable ICU 67
*/
ULISTFMT_TYPE_UNITS
} UListFormatterType;
@@ -92,29 +94,28 @@ typedef enum UListFormatterType {
/**
* Verbosity level of the list patterns.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
typedef enum UListFormatterWidth {
/**
* Use list formatting with full words (no abbreviations) when possible.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
ULISTFMT_WIDTH_WIDE,
/**
* Use list formatting of typical length.
- * @draft ICU 67
+ * @stable ICU 67
*/
ULISTFMT_WIDTH_SHORT,
/**
* Use list formatting of the shortest possible length.
- * @draft ICU 67
+ * @stable ICU 67
*/
ULISTFMT_WIDTH_NARROW,
} UListFormatterWidth;
-#endif /* U_HIDE_DRAFT_API */
/**
* Open a new UListFormatter object using the rules for a given locale.
@@ -138,7 +139,6 @@ U_CAPI UListFormatter* U_EXPORT2
ulistfmt_open(const char* locale,
UErrorCode* status);
-#ifndef U_HIDE_DRAFT_API
/**
* Open a new UListFormatter object appropriate for the given locale, list type,
* and style.
@@ -159,12 +159,11 @@ ulistfmt_open(const char* locale,
* @return
* A pointer to a UListFormatter object for the specified locale,
* or NULL if an error occurred.
- * @draft ICU 67
+ * @stable ICU 67
*/
-U_DRAFT UListFormatter* U_EXPORT2
+U_CAPI UListFormatter* U_EXPORT2
ulistfmt_openForType(const char* locale, UListFormatterType type,
UListFormatterWidth width, UErrorCode* status);
-#endif /* U_HIDE_DRAFT_API */
/**
* Close a UListFormatter object. Once closed it may no longer be used.
diff --git a/contrib/libs/icu/include/unicode/uloc.h b/contrib/libs/icu/include/unicode/uloc.h
index d877ce49af..b0bdbe1b87 100644
--- a/contrib/libs/icu/include/unicode/uloc.h
+++ b/contrib/libs/icu/include/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.
+ * @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. 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
- * @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.
+ * 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. 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 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.
+ * @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. 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,9 +669,9 @@ 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
- * string for the keyword collation.
+ * 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:
* <code>
* UErrorCode status = U_ZERO_ERROR;
@@ -676,15 +700,17 @@ uloc_getDisplayVariant(const char* locale,
* for inLocale would result in "Englisch". NULL may be used to specify the default.
* @param dest the buffer to which the displayable keyword should be written.
* @param destCapacity The size of the buffer (number of UChars). If it is 0, then
- * dest may be NULL and the function will only return the length of the
+ * dest may be NULL and the function will only return the length of the
* result without writing any of the result string (pre-flighting).
- * @param status error information if retrieving the displayable string failed.
+ * @param status error information if retrieving the displayable string failed.
* Should not be NULL and should not indicate failure on entry.
- * @return the actual buffer size needed for the displayable variant code.
+ * 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,
@@ -692,7 +718,7 @@ uloc_getDisplayKeyword(const char* keyword,
UErrorCode* status);
/**
* Gets the value of the keyword suitable for display for the specified locale.
- * E.g: for the locale string de_DE\@collation=PHONEBOOK, this API gets the display
+ * E.g: for the locale string de_DE\@collation=PHONEBOOK, this API gets the display
* string for PHONEBOOK, in the display locale, when "collation" is specified as the keyword.
*
* @param locale The locale to get the displayable variant code with. NULL may be used to specify the default.
@@ -703,14 +729,16 @@ uloc_getDisplayKeyword(const char* keyword,
* for inLocale would result in "Englisch". NULL may be used to specify the default.
* @param dest the buffer to which the displayable keyword should be written.
* @param destCapacity The size of the buffer (number of UChars). If it is 0, then
- * dest may be NULL and the function will only return the length of the
+ * dest may be NULL and the function will only return the length of the
* result without writing any of the result string (pre-flighting).
- * @param status error information if retrieving the displayable string failed.
+ * @param status error information if retrieving the displayable string failed.
* Should not be NULL and must not indicate failure on entry.
- * @return the actual buffer size needed for the displayable variant code.
+ * 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,
@@ -815,7 +841,7 @@ typedef enum ULocAvailableType {
* @internal
*/
ULOC_AVAILABLE_COUNT
-#endif
+#endif /* U_HIDE_INTERNAL_API */
} ULocAvailableType;
/**
@@ -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,
@@ -1209,14 +1233,18 @@ uloc_minimizeSubtags(const char* localeID,
* Returns a locale ID for the specified BCP47 language tag string.
* If the specified language tag contains any ill-formed subtags,
* the first such subtag and all following subtags are ignored.
- * <p>
- * 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
+ * <p>
+ * 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.
* <p>
- * <b>Note</b>: When <code>strict</code> is FALSE, any locale
+ * <b>Note</b>: When <code>strict</code> is false, any locale
* fields which do not satisfy the BCP47 syntax requirement will
* be omitted from the result. When <code>strict</code> is
- * TRUE, this function sets U_ILLEGAL_ARGUMENT_ERROR to the
+ * true, this function sets U_ILLEGAL_ARGUMENT_ERROR to the
* <code>err</code> 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/contrib/libs/icu/include/unicode/ulocdata.h b/contrib/libs/icu/include/unicode/ulocdata.h
index de8d8539c6..3647df9596 100644
--- a/contrib/libs/icu/include/unicode/ulocdata.h
+++ b/contrib/libs/icu/include/unicode/ulocdata.h
@@ -22,7 +22,10 @@
#include "unicode/ures.h"
#include "unicode/uloc.h"
#include "unicode/uset.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -87,7 +90,7 @@ typedef enum ULocaleDataDelimiterType {
* @param status Pointer to error status code.
* @stable ICU 3.4
*/
-U_STABLE ULocaleData* U_EXPORT2
+U_CAPI ULocaleData* U_EXPORT2
ulocdata_open(const char *localeID, UErrorCode *status);
/**
@@ -96,7 +99,7 @@ ulocdata_open(const char *localeID, UErrorCode *status);
* @param uld The locale data object to close
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocdata_close(ULocaleData *uld);
#if U_SHOW_CPLUSPLUS_API
@@ -129,7 +132,7 @@ U_NAMESPACE_END
* @param setting Value of the "no substitute" attribute.
* @stable ICU 3.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting);
/**
@@ -143,7 +146,7 @@ ulocdata_setNoSubstitute(ULocaleData *uld, UBool setting);
* @return UBool Value of the "no substitute" attribute.
* @stable ICU 3.4
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
ulocdata_getNoSubstitute(ULocaleData *uld);
/**
@@ -173,7 +176,7 @@ ulocdata_getNoSubstitute(ULocaleData *uld);
* In case of error, NULL is returned.
* @stable ICU 3.4
*/
-U_STABLE USet* U_EXPORT2
+U_CAPI USet* U_EXPORT2
ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn,
uint32_t options, ULocaleDataExemplarSetType extype, UErrorCode *status);
@@ -190,7 +193,7 @@ ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn,
* the output was truncated.
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, UChar *result, int32_t resultLength, UErrorCode *status);
/**
@@ -220,35 +223,35 @@ typedef enum UMeasurementSystem {
* @return UMeasurementSystem the measurement system used in the locale.
* @stable ICU 2.8
*/
-U_STABLE UMeasurementSystem U_EXPORT2
+U_CAPI UMeasurementSystem U_EXPORT2
ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status);
/**
* Returns the element gives the normal business letter size, and customary units.
* The units for the numbers are always in <em>milli-meters</em>.
- * For US since 8.5 and 11 do not yeild an integral value when converted to milli-meters,
+ * For US since 8.5 and 11 do not yield an integral value when converted to milli-meters,
* the values are rounded off.
- * So for A4 size paper the height and width are 297 mm and 210 mm repectively,
+ * So for A4 size paper the height and width are 297 mm and 210 mm respectively,
* and for US letter size the height and width are 279 mm and 216 mm respectively.
* Please note that this API will change in ICU 3.6 and will use an ulocdata object.
*
* @param localeID The id of the locale for which the paper size information to be retrieved.
- * @param height A pointer to int to recieve the height information.
- * @param width A pointer to int to recieve the width information.
+ * @param height A pointer to int to receive the height information.
+ * @param width A pointer to int to receive the width information.
* @param status Must be a valid pointer to an error code value,
* which must not indicate a failure before the function call.
* @stable ICU 2.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocdata_getPaperSize(const char *localeID, int32_t *height, int32_t *width, UErrorCode *status);
/**
* Return the current CLDR version used by the library.
- * @param versionArray fillin that will recieve the version number
+ * @param versionArray fill-in that will receive the version number
* @param status error code - could be U_MISSING_RESOURCE_ERROR if the version was not found.
* @stable ICU 4.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status);
/**
@@ -266,7 +269,7 @@ ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status);
*
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ulocdata_getLocaleDisplayPattern(ULocaleData *uld,
UChar *pattern,
int32_t patternCapacity,
@@ -288,7 +291,7 @@ ulocdata_getLocaleDisplayPattern(ULocaleData *uld,
*
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ulocdata_getLocaleSeparator(ULocaleData *uld,
UChar *separator,
int32_t separatorCapacity,
diff --git a/contrib/libs/icu/include/unicode/umachine.h b/contrib/libs/icu/include/unicode/umachine.h
index 5f883b4ba5..046927ce73 100644
--- a/contrib/libs/icu/include/unicode/umachine.h
+++ b/contrib/libs/icu/include/unicode/umachine.h
@@ -49,12 +49,13 @@
* ANSI C headers:
* stddef.h defines wchar_t
*/
+#include <stdbool.h>
#include <stddef.h>
/*==========================================================================*/
-/* 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/contrib/libs/icu/include/unicode/umsg.h b/contrib/libs/icu/include/unicode/umsg.h
index 5d235e42e8..c955dc18ac 100644
--- a/contrib/libs/icu/include/unicode/umsg.h
+++ b/contrib/libs/icu/include/unicode/umsg.h
@@ -24,11 +24,14 @@
#if !UCONFIG_NO_FORMATTING
-#include "unicode/localpointer.h"
#include "unicode/uloc.h"
#include "unicode/parseerr.h"
#include <stdarg.h>
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: MessageFormat
@@ -175,7 +178,7 @@
* @see u_parseMessage
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_formatMessage(const char *locale,
const UChar *pattern,
int32_t patternLength,
@@ -202,7 +205,7 @@ u_formatMessage(const char *locale,
* @see u_parseMessage
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vformatMessage( const char *locale,
const UChar *pattern,
int32_t patternLength,
@@ -227,7 +230,7 @@ u_vformatMessage( const char *locale,
* @see u_formatMessage
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_parseMessage( const char *locale,
const UChar *pattern,
int32_t patternLength,
@@ -252,7 +255,7 @@ u_parseMessage( const char *locale,
* @see u_formatMessage
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_vparseMessage(const char *locale,
const UChar *pattern,
int32_t patternLength,
@@ -281,7 +284,7 @@ u_vparseMessage(const char *locale,
* @see u_parseMessage
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_formatMessageWithError( const char *locale,
const UChar *pattern,
int32_t patternLength,
@@ -310,7 +313,7 @@ u_formatMessageWithError( const char *locale,
* output was truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vformatMessageWithError( const char *locale,
const UChar *pattern,
int32_t patternLength,
@@ -338,7 +341,7 @@ u_vformatMessageWithError( const char *locale,
* @see u_formatMessage
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_parseMessageWithError(const char *locale,
const UChar *pattern,
int32_t patternLength,
@@ -366,7 +369,7 @@ u_parseMessageWithError(const char *locale,
* @see u_formatMessage
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_vparseMessageWithError(const char *locale,
const UChar *pattern,
int32_t patternLength,
@@ -390,13 +393,13 @@ typedef void* UMessageFormat;
* @param patternLength Length of the pattern to use
* @param locale The locale for which the messages are formatted.
* @param parseError A pointer to UParseError struct to receive any errors
- * occured during parsing. Can be NULL.
+ * occurred during parsing. Can be NULL.
* @param status A pointer to an UErrorCode to receive any errors.
* @return A pointer to a UMessageFormat to use for formatting
* messages, or 0 if an error occurred.
* @stable ICU 2.0
*/
-U_STABLE UMessageFormat* U_EXPORT2
+U_CAPI UMessageFormat* U_EXPORT2
umsg_open( const UChar *pattern,
int32_t patternLength,
const char *locale,
@@ -409,7 +412,7 @@ umsg_open( const UChar *pattern,
* @param format The formatter to close.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
umsg_close(UMessageFormat* format);
#if U_SHOW_CPLUSPLUS_API
@@ -439,7 +442,7 @@ U_NAMESPACE_END
* @return A pointer to a UDateFormat identical to fmt.
* @stable ICU 2.0
*/
-U_STABLE UMessageFormat U_EXPORT2
+U_CAPI UMessageFormat U_EXPORT2
umsg_clone(const UMessageFormat *fmt,
UErrorCode *status);
@@ -450,7 +453,7 @@ umsg_clone(const UMessageFormat *fmt,
* @param locale The locale the formatter should use.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
umsg_setLocale(UMessageFormat *fmt,
const char* locale);
@@ -461,7 +464,7 @@ umsg_setLocale(UMessageFormat *fmt,
* @return the locale.
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
umsg_getLocale(const UMessageFormat *fmt);
/**
@@ -476,7 +479,7 @@ umsg_getLocale(const UMessageFormat *fmt);
* set to a failure result.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
umsg_applyPattern( UMessageFormat *fmt,
const UChar* pattern,
int32_t patternLength,
@@ -494,7 +497,7 @@ umsg_applyPattern( UMessageFormat *fmt,
* @return the pattern of the format
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
umsg_toPattern(const UMessageFormat *fmt,
UChar* result,
int32_t resultLength,
@@ -515,7 +518,7 @@ umsg_toPattern(const UMessageFormat *fmt,
* the output was truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
umsg_format( const UMessageFormat *fmt,
UChar *result,
int32_t resultLength,
@@ -537,7 +540,7 @@ umsg_format( const UMessageFormat *fmt,
* the output was truncated.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
umsg_vformat( const UMessageFormat *fmt,
UChar *result,
int32_t resultLength,
@@ -558,7 +561,7 @@ umsg_vformat( const UMessageFormat *fmt,
* specified in pattern.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
umsg_parse( const UMessageFormat *fmt,
const UChar *source,
int32_t sourceLength,
@@ -581,7 +584,7 @@ umsg_parse( const UMessageFormat *fmt,
* @see u_formatMessage
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
umsg_vparse(const UMessageFormat *fmt,
const UChar *source,
int32_t sourceLength,
@@ -613,7 +616,7 @@ umsg_vparse(const UMessageFormat *fmt,
* not
* @stable ICU 3.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
umsg_autoQuoteApostrophe(const UChar* pattern,
int32_t patternLength,
UChar* dest,
diff --git a/contrib/libs/icu/include/unicode/umutablecptrie.h b/contrib/libs/icu/include/unicode/umutablecptrie.h
index f2af36477d..3b950055da 100644
--- a/contrib/libs/icu/include/unicode/umutablecptrie.h
+++ b/contrib/libs/icu/include/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
/**
@@ -28,7 +31,7 @@ U_CDECL_BEGIN
/**
* Mutable Unicode code point trie.
* Fast map from Unicode code points (U+0000..U+10FFFF) to 32-bit integer values.
- * For details see http://site.icu-project.org/design/struct/utrie
+ * For details see https://icu.unicode.org/design/struct/utrie
*
* Setting values (especially ranges) and lookup is fast.
* The mutable trie is only somewhat space-efficient.
diff --git a/contrib/libs/icu/include/unicode/unifilt.h b/contrib/libs/icu/include/unicode/unifilt.h
index 420e1a1905..0fcaf4b789 100644
--- a/contrib/libs/icu/include/unicode/unifilt.h
+++ b/contrib/libs/icu/include/unicode/unifilt.h
@@ -40,8 +40,8 @@ U_NAMESPACE_BEGIN
*
* <code>UnicodeFilter</code> defines a protocol for selecting a
* subset of the full range (U+0000 to U+10FFFF) of Unicode characters.
- * Currently, filters are used in conjunction with classes like {@link
- * Transliterator} to only process selected characters through a
+ * Currently, filters are used in conjunction with classes like
+ * {@link Transliterator} to only process selected characters through a
* transformation.
*
* <p>Note: UnicodeFilter currently stubs out two pure virtual methods
@@ -77,7 +77,7 @@ public:
* @return clone, or nullptr if an error occurred
* @stable ICU 2.4
*/
- virtual UnicodeFilter* clone() const = 0;
+ virtual UnicodeFilter* clone() const override = 0;
/**
* Returns <tt>true</tt> for characters that are in the selected
@@ -93,7 +93,7 @@ public:
* and return the pointer.
* @stable ICU 2.4
*/
- virtual UnicodeMatcher* toMatcher() const;
+ virtual UnicodeMatcher* toMatcher() const override;
/**
* Implement UnicodeMatcher API.
@@ -102,13 +102,13 @@ public:
virtual UMatchDegree matches(const Replaceable& text,
int32_t& offset,
int32_t limit,
- UBool incremental);
+ UBool incremental) override;
/**
* UnicodeFunctor API. Nothing to do.
* @stable ICU 2.4
*/
- virtual void setData(const TransliterationRuleData*);
+ virtual void setData(const TransliterationRuleData*) override;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
diff --git a/contrib/libs/icu/include/unicode/unifunct.h b/contrib/libs/icu/include/unicode/unifunct.h
index 7d31af7daf..8751302494 100644
--- a/contrib/libs/icu/include/unicode/unifunct.h
+++ b/contrib/libs/icu/include/unicode/unifunct.h
@@ -93,14 +93,14 @@ public:
*
* <p>Concrete subclasses of UnicodeFunctor should use the macro
* UOBJECT_DEFINE_RTTI_IMPLEMENTATION from uobject.h to
- * provide definitios getStaticClassID and getDynamicClassID.
+ * provide definitions getStaticClassID and getDynamicClassID.
*
* @return The class ID for this object. All objects of a given
* class have the same class ID. Objects of other classes have
* different class IDs.
* @stable ICU 2.4
*/
- virtual UClassID getDynamicClassID(void) const = 0;
+ virtual UClassID getDynamicClassID(void) const override = 0;
/**
* Set the data object associated with this functor. The data
diff --git a/contrib/libs/icu/include/unicode/unimatch.h b/contrib/libs/icu/include/unicode/unimatch.h
index 5a192b1b42..302332f455 100644
--- a/contrib/libs/icu/include/unicode/unimatch.h
+++ b/contrib/libs/icu/include/unicode/unimatch.h
@@ -115,11 +115,11 @@ public:
* 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 @@ public:
* 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 <tt>RuleBasedTransliterator</tt> for
* indexing.
diff --git a/contrib/libs/icu/include/unicode/unirepl.h b/contrib/libs/icu/include/unicode/unirepl.h
index 1ec627abcb..7f6edcf61a 100644
--- a/contrib/libs/icu/include/unicode/unirepl.h
+++ b/contrib/libs/icu/include/unicode/unirepl.h
@@ -77,7 +77,7 @@ class U_I18N_API UnicodeReplacer /* not : public UObject because this is an inte
* replacer 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 defined by
* Utility.isUnprintable().
diff --git a/contrib/libs/icu/include/unicode/uniset.h b/contrib/libs/icu/include/unicode/uniset.h
index 9742311003..730337a353 100644
--- a/contrib/libs/icu/include/unicode/uniset.h
+++ b/contrib/libs/icu/include/unicode/uniset.h
@@ -124,8 +124,8 @@ class RuleCharacterIterator;
* "[:Lu:]" and the Perl-like syntax "\\p{Lu}" are recognized. For a
* complete list of supported property patterns, see the User's Guide
* for UnicodeSet at
- * <a href="http://icu-project.org/userguide/unicodeSet.html">
- * http://icu-project.org/userguide/unicodeSet.html</a>.
+ * <a href="https://unicode-org.github.io/icu/userguide/strings/unicodeset">
+ * https://unicode-org.github.io/icu/userguide/strings/unicodeset</a>.
* Actual determination of property data is defined by the underlying
* Unicode database as implemented by UCharacter.
*
@@ -136,6 +136,13 @@ class RuleCharacterIterator;
* their delimiters; "[:^foo]" and "\\P{foo}". In any other location,
* '^' has no special meaning.
*
+ * <p>Since ICU 70, "[^...]", "[:^foo]", "\\P{foo}", and "[:binaryProperty=No:]"
+ * perform a “code point complement” (all code points minus the original set),
+ * removing all multicharacter strings,
+ * equivalent to <code>.complement().removeAllStrings()</code>.
+ * The complement() API function continues to perform a
+ * symmetric difference with all code points and thus retains all multicharacter strings.
+ *
* <p>Ranges are indicated by placing two a '-' between two
* characters, as in "a-z". This specifies the range of all
* characters from the left to the right, in Unicode order. If the
@@ -178,8 +185,6 @@ class RuleCharacterIterator;
* Unicode property
* </table>
*
- * <p><b>Warning</b>: you cannot add an empty string ("") to a UnicodeSet.</p>
- *
* <p><b>Formal syntax</b></p>
*
* \htmlonly<blockquote>\endhtmlonly
@@ -219,9 +224,8 @@ class RuleCharacterIterator;
* </tr>
* <tr align="top">
* <td nowrap valign="top" align="right"><code>hex :=&nbsp; </code></td>
- * <td valign="top"><em>any character for which
- * </em><code>Character.digit(c, 16)</code><em>
- * returns a non-negative result</em></td>
+ * <td valign="top"><code>'0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' |<br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f'</code></td>
* </tr>
* <tr>
* <td nowrap valign="top" align="right"><code>property :=&nbsp; </code></td>
@@ -325,7 +329,7 @@ public:
* 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 +337,7 @@ public:
/**
* 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.
@@ -487,14 +491,14 @@ public:
* @return <tt>true</tt> if the specified set is equal to this set.
* @stable ICU 2.0
*/
- virtual UBool operator==(const UnicodeSet& o) const;
+ virtual bool operator==(const UnicodeSet& o) const;
/**
* Compares the specified object with this set for equality. Returns
* <tt>true</tt> if the specified set is not equal to this set.
* @stable ICU 2.0
*/
- inline UBool operator!=(const UnicodeSet& o) const;
+ inline bool operator!=(const UnicodeSet& o) const;
/**
* Returns a copy of this object. All UnicodeFunctor objects have
@@ -505,7 +509,7 @@ public:
* @see cloneAsThawed
* @stable ICU 2.0
*/
- virtual UnicodeSet* clone() const;
+ virtual UnicodeSet* clone() const override;
/**
* Returns the hash code value for this set.
@@ -563,7 +567,7 @@ public:
/**
* 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
@@ -601,7 +605,7 @@ public:
/**
* Make this object represent the range `start - end`.
- * If `end > start` then this object is set to an empty range.
+ * If `start > end` then this object is set to an empty range.
* A frozen set will not be modified.
*
* @param start first character in the set, inclusive
@@ -700,14 +704,14 @@ public:
* 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 override;
/**
* Modifies this set to contain those code points which have the given value
@@ -773,8 +777,12 @@ public:
* Note than the elements of a set may include both individual
* codepoints and strings.
*
+ * This is slower than getRangeCount() because
+ * it counts the code points of all ranges.
+ *
* @return the number of elements in this set (its cardinality).
* @stable ICU 2.0
+ * @see getRangeCount
*/
virtual int32_t size(void) const;
@@ -786,6 +794,14 @@ public:
*/
virtual UBool isEmpty(void) const;
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * @return true if this set contains multi-character strings or the empty string.
+ * @draft ICU 70
+ */
+ UBool hasStrings() const;
+#endif // U_HIDE_DRAFT_API
+
/**
* Returns true if this set contains the given character.
* This function works faster with a frozen set.
@@ -793,7 +809,7 @@ public:
* @return true if the test condition is met
* @stable ICU 2.0
*/
- virtual UBool contains(UChar32 c) const;
+ virtual UBool contains(UChar32 c) const override;
/**
* Returns true if this set contains every character
@@ -1002,7 +1018,7 @@ public:
virtual UMatchDegree matches(const Replaceable& text,
int32_t& offset,
int32_t limit,
- UBool incremental);
+ UBool incremental) override;
private:
/**
@@ -1051,7 +1067,7 @@ public:
* @param toUnionTo the set into which to union the source characters
* @stable ICU 2.4
*/
- virtual void addMatchSetTo(UnicodeSet& toUnionTo) const;
+ virtual void addMatchSetTo(UnicodeSet& toUnionTo) const override;
/**
* Returns the index of the given character within this set, where
@@ -1066,8 +1082,14 @@ public:
/**
* Returns the character at the given index within this set, where
* the set is ordered by ascending code point. If the index is
- * out of range, return (UChar32)-1. The inverse of this method is
- * <code>indexOf()</code>.
+ * out of range for characters, returns (UChar32)-1.
+ * The inverse of this method is <code>indexOf()</code>.
+ *
+ * For iteration, this is slower than UnicodeSetIterator or
+ * getRangeCount()/getRangeStart()/getRangeEnd(),
+ * because for each call it skips linearly over <code>index</code>
+ * characters in the ranges.
+ *
* @param index an index from 0..size()-1
* @return the character at the given index, or (UChar32)-1.
* @stable ICU 2.4
@@ -1077,7 +1099,7 @@ public:
/**
* Adds the specified range to this set if it is not already
* present. If this set already contains the specified range,
- * the call leaves this set unchanged. If <code>end > start</code>
+ * the call leaves this set unchanged. If <code>start > end</code>
* then an empty range is added, leaving the set unchanged.
* This is equivalent to a boolean logic OR, or a set UNION.
* A frozen set will not be modified.
@@ -1095,6 +1117,9 @@ public:
* present. If this set already contains the specified character,
* the call leaves this set unchanged.
* A frozen set will not be modified.
+ *
+ * @param c the character (code point)
+ * @return this object, for chaining
* @stable ICU 2.0
*/
UnicodeSet& add(UChar32 c);
@@ -1104,8 +1129,8 @@ public:
* present. If this set already contains the multicharacter,
* the call leaves this set unchanged.
* Thus "ch" => {"ch"}
- * <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
* A frozen set will not be modified.
+ *
* @param s the source string
* @return this object, for chaining
* @stable ICU 2.4
@@ -1124,8 +1149,8 @@ public:
public:
/**
- * Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"}
- * If this set already any particular character, it has no effect on that character.
+ * Adds each of the characters in this string to the set. Note: "ch" => {"c", "h"}
+ * If this set already contains any particular character, it has no effect on that character.
* A frozen set will not be modified.
* @param s the source string
* @return this object, for chaining
@@ -1135,7 +1160,6 @@ public:
/**
* Retains EACH of the characters in this string. Note: "ch" == {"c", "h"}
- * If this set already any particular character, it has no effect on that character.
* A frozen set will not be modified.
* @param s the source string
* @return this object, for chaining
@@ -1145,7 +1169,6 @@ public:
/**
* Complement EACH of the characters in this string. Note: "ch" == {"c", "h"}
- * If this set already any particular character, it has no effect on that character.
* A frozen set will not be modified.
* @param s the source string
* @return this object, for chaining
@@ -1155,7 +1178,6 @@ public:
/**
* Remove EACH of the characters in this string. Note: "ch" == {"c", "h"}
- * If this set already any particular character, it has no effect on that character.
* A frozen set will not be modified.
* @param s the source string
* @return this object, for chaining
@@ -1165,7 +1187,7 @@ public:
/**
* Makes a set from a multicharacter string. Thus "ch" => {"ch"}
- * <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
+ *
* @param s the source string
* @return a newly created set containing the given string.
* The caller owns the return object and is responsible for deleting it.
@@ -1185,15 +1207,13 @@ public:
/**
* Retain only the elements in this set that are contained in the
- * specified range. If <code>end > start</code> then an empty range is
+ * specified range. If <code>start > end</code> then an empty range is
* retained, leaving the set empty. This is equivalent to
* a boolean logic AND, or a set INTERSECTION.
* A frozen set will not be modified.
*
- * @param start first character, inclusive, of range to be retained
- * to this set.
- * @param end last character, inclusive, of range to be retained
- * to this set.
+ * @param start first character, inclusive, of range
+ * @param end last character, inclusive, of range
* @stable ICU 2.0
*/
virtual UnicodeSet& retain(UChar32 start, UChar32 end);
@@ -1202,14 +1222,31 @@ public:
/**
* Retain the specified character from this set if it is present.
* A frozen set will not be modified.
+ *
+ * @param c the character (code point)
+ * @return this object, for chaining
* @stable ICU 2.0
*/
UnicodeSet& retain(UChar32 c);
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Retains only the specified string from this set if it is present.
+ * Upon return this set will be empty if it did not contain s, or
+ * will only contain s if it did contain s.
+ * A frozen set will not be modified.
+ *
+ * @param s the source string
+ * @return this object, for chaining
+ * @draft ICU 69
+ */
+ UnicodeSet& retain(const UnicodeString &s);
+#endif // U_HIDE_DRAFT_API
+
/**
* Removes the specified range from this set if it is present.
* The set will not contain the specified range once the call
- * returns. If <code>end > start</code> then an empty range is
+ * returns. If <code>start > end</code> then an empty range is
* removed, leaving the set unchanged.
* A frozen set will not be modified.
*
@@ -1226,6 +1263,9 @@ public:
* The set will not contain the specified range once the call
* returns.
* A frozen set will not be modified.
+ *
+ * @param c the character (code point)
+ * @return this object, for chaining
* @stable ICU 2.0
*/
UnicodeSet& remove(UChar32 c);
@@ -1242,26 +1282,29 @@ public:
UnicodeSet& remove(const UnicodeString& s);
/**
- * Inverts this set. This operation modifies this set so that
- * its value is its complement. This is equivalent to
+ * This is equivalent to
* <code>complement(MIN_VALUE, MAX_VALUE)</code>.
+ *
+ * <strong>Note:</strong> This performs a symmetric difference with all code points
+ * <em>and thus retains all multicharacter strings</em>.
+ * In order to achieve a “code point complement” (all code points minus this set),
+ * the easiest is to <code>.complement().removeAllStrings()</code>.
+ *
* A frozen set will not be modified.
* @stable ICU 2.0
*/
- virtual UnicodeSet& complement(void);
+ virtual UnicodeSet& complement();
/**
* Complements the specified range in this set. Any character in
* the range will be removed if it is in this set, or will be
- * added if it is not in this set. If <code>end > start</code>
+ * added if it is not in this set. If <code>start > end</code>
* then an empty range is complemented, leaving the set unchanged.
* This is equivalent to a boolean logic XOR.
* A frozen set will not be modified.
*
- * @param start first character, inclusive, of range to be removed
- * from this set.
- * @param end last character, inclusive, of range to be removed
- * from this set.
+ * @param start first character, inclusive, of range
+ * @param end last character, inclusive, of range
* @stable ICU 2.0
*/
virtual UnicodeSet& complement(UChar32 start, UChar32 end);
@@ -1271,16 +1314,18 @@ public:
* will be removed if it is in this set, or will be added if it is
* not in this set.
* A frozen set will not be modified.
+ *
+ * @param c the character (code point)
+ * @return this object, for chaining
* @stable ICU 2.0
*/
UnicodeSet& complement(UChar32 c);
/**
* Complement the specified string in this set.
- * The set will not contain the specified string once the call
- * returns.
- * <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
+ * The string will be removed if it is in this set, or will be added if it is not in this set.
* A frozen set will not be modified.
+ *
* @param s the string to complement
* @return this object, for chaining
* @stable ICU 2.4
@@ -1488,7 +1533,7 @@ public:
* different class IDs.
* @stable ICU 2.4
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
private:
@@ -1509,7 +1554,7 @@ private:
* is the given value. This is used by <tt>RuleBasedTransliterator</tt> for
* indexing.
*/
- virtual UBool matchesIndexValue(uint8_t v) const;
+ virtual UBool matchesIndexValue(uint8_t v) const override;
private:
friend class RBBIRuleScanner;
@@ -1551,7 +1596,6 @@ private:
void swapBuffers(void);
UBool allocateStrings(UErrorCode &status);
- UBool hasStrings() const;
int32_t stringsSize() const;
UBool stringsContains(const UnicodeString &s) const;
@@ -1565,6 +1609,9 @@ private:
static void _appendToPat(UnicodeString& buf, UChar32 c, UBool escapeUnprintable);
+ static void _appendToPat(UnicodeString &result, UChar32 start, UChar32 end,
+ UBool escapeUnprintable);
+
//----------------------------------------------------------------
// Implementation: Fundamental operators
//----------------------------------------------------------------
@@ -1592,7 +1639,7 @@ private:
*
* The original design document is out of date, but still useful.
* Ignore the property and value names:
- * http://source.icu-project.org/repos/icu/icuhtml/trunk/design/unicodeset_properties.html
+ * https://htmlpreview.github.io/?https://github.com/unicode-org/icu-docs/blob/main/design/unicodeset_properties.html
*
* Recognized syntax:
*
@@ -1636,7 +1683,7 @@ private:
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);
@@ -1677,7 +1724,7 @@ private:
-inline UBool UnicodeSet::operator!=(const UnicodeSet& o) const {
+inline bool UnicodeSet::operator!=(const UnicodeSet& o) const {
return !operator==(o);
}
diff --git a/contrib/libs/icu/include/unicode/unistr.h b/contrib/libs/icu/include/unicode/unistr.h
index da79053765..b3c9948107 100644
--- a/contrib/libs/icu/include/unicode/unistr.h
+++ b/contrib/libs/icu/include/unicode/unistr.h
@@ -44,9 +44,10 @@ struct UConverter; // unicode/ucnv.h
#ifndef USTRING_H
/**
* \ingroup ustring_ustrlen
+ * @param s Pointer to sequence of UChars.
+ * @return Length of sequence.
*/
-U_STABLE int32_t U_EXPORT2
-u_strlen(const UChar *s);
+U_CAPI int32_t U_EXPORT2 u_strlen(const UChar *s);
#endif
U_NAMESPACE_BEGIN
@@ -113,9 +114,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 +228,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 +286,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,26 +321,26 @@ public:
/**
* 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;
+ inline bool operator== (const UnicodeString& text) const;
/**
* 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;
+ inline bool operator!= (const UnicodeString& text) const;
/**
* 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 +348,8 @@ public:
/**
* 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 +357,8 @@ public:
/**
* 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 +366,8 @@ public:
/**
* 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 +856,8 @@ public:
/**
* 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 +868,8 @@ public:
* @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 +880,8 @@ public:
* 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 +893,7 @@ public:
* @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 +903,8 @@ public:
/**
* 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 +915,8 @@ public:
* @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 +927,8 @@ public:
* 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 +940,8 @@ public:
* @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,
@@ -1525,7 +1526,7 @@ public:
*/
virtual void extractBetween(int32_t start,
int32_t limit,
- UnicodeString& target) const;
+ UnicodeString& target) const override;
/**
* Copy the characters in the range
@@ -1544,7 +1545,7 @@ public:
* @param target the target buffer for extraction, can be NULL
* if targetLength is 0
* @param targetCapacity the length of the target buffer
- * @param inv Signature-distinguishing paramater, use US_INV.
+ * @param inv Signature-distinguishing parameter, use US_INV.
* @return the output string length, not including the terminating NUL
* @stable ICU 3.2
*/
@@ -1804,7 +1805,7 @@ public:
/**
* 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 +1833,12 @@ public:
/**
* 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 +2068,7 @@ public:
/**
* 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.
@@ -2455,14 +2456,14 @@ public:
*/
virtual void handleReplaceBetween(int32_t start,
int32_t limit,
- const UnicodeString& text);
+ const UnicodeString& text) override;
/**
* Replaceable API
- * @return TRUE if it has MetaData
+ * @return true if it has MetaData
* @stable ICU 2.4
*/
- virtual UBool hasMetaData() const;
+ virtual UBool hasMetaData() const override;
/**
* Copy a substring of this object, retaining attribute (out-of-band)
@@ -2477,7 +2478,7 @@ public:
* dest >= limit`.
* @stable ICU 2.0
*/
- virtual void copy(int32_t start, int32_t limit, int32_t dest);
+ virtual void copy(int32_t start, int32_t limit, int32_t dest) override;
/* Search and replace operations */
@@ -2590,7 +2591,7 @@ public:
* @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 +2605,7 @@ public:
* @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 +2614,7 @@ public:
/**
* 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);
@@ -2766,7 +2767,6 @@ public:
* @param options Options bit set, usually 0. See U_TITLECASE_NO_LOWERCASE,
* U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED,
* U_TITLECASE_WHOLE_STRING, U_TITLECASE_SENTENCES.
- * @param options Options bit set, see ucasemap_open().
* @return A reference to this.
* @stable ICU 3.8
*/
@@ -3274,7 +3274,7 @@ public:
* \endcode
* @param src String using only invariant characters.
* @param textLength Length of src, or -1 if NUL-terminated.
- * @param inv Signature-distinguishing paramater, use US_INV.
+ * @param inv Signature-distinguishing parameter, use US_INV.
*
* @see US_INV
* @stable ICU 3.2
@@ -3338,7 +3338,7 @@ public:
* @see getDynamicClassID
* @stable ICU 2.6
*/
- virtual UnicodeString *clone() const;
+ virtual UnicodeString *clone() const override;
/** Destructor.
* @stable ICU 2.0
@@ -3444,7 +3444,7 @@ public:
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
//========================================
// Implementation methods
@@ -3455,21 +3455,21 @@ protected:
* Implement Replaceable::getLength() (see jitterbug 1027).
* @stable ICU 2.4
*/
- virtual int32_t getLength() const;
+ virtual int32_t getLength() const override;
/**
* The change in Replaceable to use virtual getCharAt() allows
* UnicodeString::charAt() to be inline again (see jitterbug 709).
* @stable ICU 2.4
*/
- virtual char16_t getCharAt(int32_t offset) const;
+ virtual char16_t getCharAt(int32_t offset) const override;
/**
* The change in Replaceable to use virtual getChar32At() allows
* UnicodeString::char32At() to be inline again (see jitterbug 709).
* @stable ICU 2.4
*/
- virtual UChar32 getChar32At(int32_t offset) const;
+ virtual UChar32 getChar32At(int32_t offset) const override;
private:
// For char* constructors. Could be made public.
@@ -3614,8 +3614,8 @@ private:
// turn a bogus string into an empty one
void unBogus();
- // implements assigment operator, copy constructor, and fastCopyFrom()
- UnicodeString &copyFrom(const UnicodeString &src, UBool fastCopy=FALSE);
+ // implements assignment operator, copy constructor, and fastCopyFrom()
+ UnicodeString &copyFrom(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 @@ private:
* 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.
@@ -3946,7 +3946,7 @@ UnicodeString::doCompare(int32_t start,
}
}
-inline UBool
+inline bool
UnicodeString::operator== (const UnicodeString& text) const
{
if(isBogus()) {
@@ -3957,7 +3957,7 @@ UnicodeString::operator== (const UnicodeString& text) const
}
}
-inline UBool
+inline bool
UnicodeString::operator!= (const UnicodeString& text) const
{ return (! operator==(text)); }
@@ -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/contrib/libs/icu/include/unicode/unorm.h b/contrib/libs/icu/include/unicode/unorm.h
index 09dd366a96..38fb895155 100644
--- a/contrib/libs/icu/include/unicode/unorm.h
+++ b/contrib/libs/icu/include/unicode/unorm.h
@@ -115,7 +115,7 @@
* unorm_normalize(UNORM_FCD) may be implemented with UNORM_NFD.
*
* For more details on FCD see the collation design document:
- * http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm
+ * https://htmlpreview.github.io/?https://github.com/unicode-org/icu-docs/blob/main/design/collation/ICU_collation_design.htm
*
* ICU collation performs either NFD or FCD normalization automatically if normalization
* is turned on for the collator object.
@@ -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/contrib/libs/icu/include/unicode/unorm2.h b/contrib/libs/icu/include/unicode/unorm2.h
index a9bd02f256..24417b7103 100644
--- a/contrib/libs/icu/include/unicode/unorm2.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/unum.h b/contrib/libs/icu/include/unicode/unum.h
index 9036f9575d..14f76168b6 100644
--- a/contrib/libs/icu/include/unicode/unum.h
+++ b/contrib/libs/icu/include/unicode/unum.h
@@ -18,7 +18,6 @@
#if !UCONFIG_NO_FORMATTING
-#include "unicode/localpointer.h"
#include "unicode/uloc.h"
#include "unicode/ucurr.h"
#include "unicode/umisc.h"
@@ -27,6 +26,10 @@
#include "unicode/udisplaycontext.h"
#include "unicode/ufieldpositer.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: Compatibility APIs for number formatting.
@@ -272,7 +275,7 @@ typedef enum UNumberFormatStyle {
*
* <p>
* For more detail on rounding modes, see:
- * http://userguide.icu-project.org/formatparse/numbers/rounding-modes
+ * https://unicode-org.github.io/icu/userguide/format_parse/numbers/rounding-modes
*
* @stable ICU 2.0
*/
@@ -299,7 +302,24 @@ typedef enum UNumberFormatRoundingMode {
* ROUND_UNNECESSARY reports an error if formatted result is not exact.
* @stable ICU 4.8
*/
- UNUM_ROUND_UNNECESSARY
+ UNUM_ROUND_UNNECESSARY,
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Rounds ties toward the odd number.
+ * @draft ICU 69
+ */
+ UNUM_ROUND_HALF_ODD,
+ /**
+ * Rounds ties toward +∞.
+ * @draft ICU 69
+ */
+ UNUM_ROUND_HALF_CEILING,
+ /**
+ * Rounds ties toward -∞.
+ * @draft ICU 69
+ */
+ UNUM_ROUND_HALF_FLOOR,
+#endif // U_HIDE_DRAFT_API
} UNumberFormatRoundingMode;
/** The possible number format pad positions.
@@ -393,6 +413,28 @@ typedef enum UNumberFormatFields {
/**
+ * Selectors with special numeric values to use locale default minimum grouping
+ * digits for the DecimalFormat/UNumberFormat setMinimumGroupingDigits method.
+ * Do not use these constants with the [U]NumberFormatter API.
+ *
+ * @stable ICU 68
+ */
+typedef enum UNumberFormatMinimumGroupingDigits {
+ /**
+ * Display grouping using the default strategy for all locales.
+ * @stable ICU 68
+ */
+ UNUM_MINIMUM_GROUPING_DIGITS_AUTO = -2,
+ /**
+ * Display grouping using locale defaults, except do not show grouping on
+ * values smaller than 10000 (such that there is a minimum of two digits
+ * before the first separator).
+ * @stable ICU 68
+ */
+ UNUM_MINIMUM_GROUPING_DIGITS_MIN2 = -3,
+} UNumberFormatMinimumGroupingDigits;
+
+/**
* Create and return a new UNumberFormat for formatting and parsing
* numbers. A UNumberFormat may be used to format numbers by calling
* {@link #unum_format }, and to parse numbers by calling {@link #unum_parse }.
@@ -429,7 +471,7 @@ typedef enum UNumberFormatFields {
* @see DecimalFormat
* @stable ICU 2.0
*/
-U_STABLE UNumberFormat* U_EXPORT2
+U_CAPI UNumberFormat* U_EXPORT2
unum_open( UNumberFormatStyle style,
const UChar* pattern,
int32_t patternLength,
@@ -444,7 +486,7 @@ unum_open( UNumberFormatStyle style,
* @param fmt The formatter to close.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unum_close(UNumberFormat* fmt);
#if U_SHOW_CPLUSPLUS_API
@@ -474,7 +516,7 @@ U_NAMESPACE_END
* @return A pointer to a UNumberFormat identical to fmt.
* @stable ICU 2.0
*/
-U_STABLE UNumberFormat* U_EXPORT2
+U_CAPI UNumberFormat* U_EXPORT2
unum_clone(const UNumberFormat *fmt,
UErrorCode *status);
@@ -502,7 +544,7 @@ unum_clone(const UNumberFormat *fmt,
* @see UFieldPosition
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_format( const UNumberFormat* fmt,
int32_t number,
UChar* result,
@@ -534,7 +576,7 @@ unum_format( const UNumberFormat* fmt,
* @see UFieldPosition
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_formatInt64(const UNumberFormat *fmt,
int64_t number,
UChar* result,
@@ -566,7 +608,7 @@ unum_formatInt64(const UNumberFormat *fmt,
* @see UFieldPosition
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_formatDouble( const UNumberFormat* fmt,
double number,
UChar* result,
@@ -616,7 +658,7 @@ unum_formatDouble( const UNumberFormat* fmt,
* @see UNumberFormatFields
* @stable ICU 59
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_formatDoubleForFields(const UNumberFormat* format,
double number,
UChar* result,
@@ -653,7 +695,7 @@ unum_formatDoubleForFields(const UNumberFormat* format,
* @see UFieldPosition
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_formatDecimal( const UNumberFormat* fmt,
const char * number,
int32_t length,
@@ -665,6 +707,12 @@ unum_formatDecimal( const UNumberFormat* fmt,
/**
* Format a double currency amount using a UNumberFormat.
* The double will be formatted according to the UNumberFormat's locale.
+ *
+ * To format an exact decimal value with a currency, use
+ * `unum_setTextAttribute(UNUM_CURRENCY_CODE, ...)` followed by unum_formatDecimal.
+ * Your UNumberFormat must be created with the UNUM_CURRENCY style. Alternatively,
+ * consider using unumf_openForSkeletonAndLocale.
+ *
* @param fmt the formatter to use
* @param number the number to format
* @param currency the 3-letter null-terminated ISO 4217 currency code
@@ -686,7 +734,7 @@ unum_formatDecimal( const UNumberFormat* fmt,
* @see UFieldPosition
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_formatDoubleCurrency(const UNumberFormat* fmt,
double number,
UChar* currency,
@@ -715,7 +763,7 @@ unum_formatDoubleCurrency(const UNumberFormat* fmt,
* @see unum_parseToUFormattable
* @stable ICU 52
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_formatUFormattable(const UNumberFormat* fmt,
const UFormattable *number,
UChar *result,
@@ -742,7 +790,7 @@ unum_formatUFormattable(const UNumberFormat* fmt,
* @see unum_formatDouble
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_parse( const UNumberFormat* fmt,
const UChar* text,
int32_t textLength,
@@ -768,7 +816,7 @@ unum_parse( const UNumberFormat* fmt,
* @see unum_formatDouble
* @stable ICU 2.8
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
unum_parseInt64(const UNumberFormat* fmt,
const UChar* text,
int32_t textLength,
@@ -794,7 +842,7 @@ unum_parseInt64(const UNumberFormat* fmt,
* @see unum_formatDouble
* @stable ICU 2.0
*/
-U_STABLE double U_EXPORT2
+U_CAPI double U_EXPORT2
unum_parseDouble( const UNumberFormat* fmt,
const UChar* text,
int32_t textLength,
@@ -829,7 +877,7 @@ unum_parseDouble( const UNumberFormat* fmt,
* @see unum_formatDouble
* @stable ICU 4.4
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_parseDecimal(const UNumberFormat* fmt,
const UChar* text,
int32_t textLength,
@@ -857,7 +905,7 @@ unum_parseDecimal(const UNumberFormat* fmt,
* @see unum_formatDoubleCurrency
* @stable ICU 3.0
*/
-U_STABLE double U_EXPORT2
+U_CAPI double U_EXPORT2
unum_parseDoubleCurrency(const UNumberFormat* fmt,
const UChar* text,
int32_t textLength,
@@ -885,7 +933,7 @@ unum_parseDoubleCurrency(const UNumberFormat* fmt,
* @see ufmt_close
* @stable ICU 52
*/
-U_STABLE UFormattable* U_EXPORT2
+U_CAPI UFormattable* U_EXPORT2
unum_parseToUFormattable(const UNumberFormat* fmt,
UFormattable *result,
const UChar* text,
@@ -898,7 +946,7 @@ unum_parseToUFormattable(const UNumberFormat* fmt,
* on a DecimalFormat, other formats return U_UNSUPPORTED_ERROR
* in the status.
* @param format The formatter to set.
- * @param localized TRUE if the pattern is localized, FALSE otherwise.
+ * @param localized true if the pattern is localized, false otherwise.
* @param pattern The new pattern
* @param patternLength The length of pattern, or -1 if null-terminated.
* @param parseError A pointer to UParseError to receive information
@@ -909,7 +957,7 @@ unum_parseToUFormattable(const UNumberFormat* fmt,
* @see DecimalFormat
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unum_applyPattern( UNumberFormat *format,
UBool localized,
const UChar *pattern,
@@ -928,7 +976,7 @@ unum_applyPattern( UNumberFormat *format,
* @see unum_countAvailable
* @stable ICU 2.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
unum_getAvailable(int32_t localeIndex);
/**
@@ -940,7 +988,7 @@ unum_getAvailable(int32_t localeIndex);
* @see unum_getAvailable
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_countAvailable(void);
#if UCONFIG_HAVE_PARSEALLINPUT
@@ -1042,7 +1090,7 @@ typedef enum UNumberFormatAttribute {
/**
* if this attribute is set to 0, it is set to UNUM_CURRENCY_STANDARD purpose,
- * otherwise it is UNUM_CURRENCY_CASH purpose
+ * otherwise it is UNUM_CASH_CURRENCY purpose
* Default: 0 (UNUM_CURRENCY_STANDARD purpose)
* @stable ICU 54
*/
@@ -1121,7 +1169,7 @@ typedef enum UNumberFormatAttribute {
* @see unum_setTextAttribute
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_getAttribute(const UNumberFormat* fmt,
UNumberFormatAttribute attr);
@@ -1144,7 +1192,7 @@ unum_getAttribute(const UNumberFormat* fmt,
* @see unum_setTextAttribute
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unum_setAttribute( UNumberFormat* fmt,
UNumberFormatAttribute attr,
int32_t newValue);
@@ -1164,7 +1212,7 @@ unum_setAttribute( UNumberFormat* fmt,
* @see unum_setTextAttribute
* @stable ICU 2.0
*/
-U_STABLE double U_EXPORT2
+U_CAPI double U_EXPORT2
unum_getDoubleAttribute(const UNumberFormat* fmt,
UNumberFormatAttribute attr);
@@ -1182,7 +1230,7 @@ unum_getDoubleAttribute(const UNumberFormat* fmt,
* @see unum_setTextAttribute
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unum_setDoubleAttribute( UNumberFormat* fmt,
UNumberFormatAttribute attr,
double newValue);
@@ -1239,7 +1287,7 @@ typedef enum UNumberFormatTextAttribute {
* @see unum_setAttribute
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_getTextAttribute( const UNumberFormat* fmt,
UNumberFormatTextAttribute tag,
UChar* result,
@@ -1262,7 +1310,7 @@ unum_getTextAttribute( const UNumberFormat* fmt,
* @see unum_setAttribute
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unum_setTextAttribute( UNumberFormat* fmt,
UNumberFormatTextAttribute tag,
const UChar* newValue,
@@ -1273,8 +1321,8 @@ unum_setTextAttribute( UNumberFormat* fmt,
* Extract the pattern from a UNumberFormat. The pattern will follow
* the DecimalFormat pattern syntax.
* @param fmt The formatter to query.
- * @param isPatternLocalized TRUE if the pattern should be localized,
- * FALSE otherwise. This is ignored if the formatter is a rule-based
+ * @param isPatternLocalized true if the pattern should be localized,
+ * false otherwise. This is ignored if the formatter is a rule-based
* formatter.
* @param result A pointer to a buffer to receive the pattern.
* @param resultLength The maximum size of result.
@@ -1285,7 +1333,7 @@ unum_setTextAttribute( UNumberFormat* fmt,
* @see DecimalFormat
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_toPattern( const UNumberFormat* fmt,
UBool isPatternLocalized,
UChar* result,
@@ -1379,12 +1427,19 @@ typedef enum UNumberFormatSymbol {
*/
UNUM_EXPONENT_MULTIPLICATION_SYMBOL = 27,
+#ifndef U_HIDE_INTERNAL_API
+ /** Approximately sign.
+ * @internal
+ */
+ UNUM_APPROXIMATELY_SIGN_SYMBOL = 28,
+#endif
+
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UNumberFormatSymbol value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- UNUM_FORMAT_SYMBOL_COUNT = 28
+ UNUM_FORMAT_SYMBOL_COUNT = 29
#endif /* U_HIDE_DEPRECATED_API */
} UNumberFormatSymbol;
@@ -1404,7 +1459,7 @@ typedef enum UNumberFormatSymbol {
* @see unum_setSymbol
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unum_getSymbol(const UNumberFormat *fmt,
UNumberFormatSymbol symbol,
UChar *buffer,
@@ -1424,7 +1479,7 @@ unum_getSymbol(const UNumberFormat *fmt,
* @see unum_getSymbol
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unum_setSymbol(UNumberFormat *fmt,
UNumberFormatSymbol symbol,
const UChar *value,
@@ -1441,7 +1496,7 @@ unum_setSymbol(UNumberFormat *fmt,
* @return the locale name
* @stable ICU 2.8
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
unum_getLocaleByType(const UNumberFormat *fmt,
ULocDataLocaleType type,
UErrorCode* status);
@@ -1454,7 +1509,7 @@ unum_getLocaleByType(const UNumberFormat *fmt,
* @param status A pointer to an UErrorCode to receive any errors
* @stable ICU 53
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unum_setContext(UNumberFormat* fmt, UDisplayContext value, UErrorCode* status);
/**
@@ -1466,7 +1521,7 @@ unum_setContext(UNumberFormat* fmt, UDisplayContext value, UErrorCode* status);
* @return The UDisplayContextValue for the specified type.
* @stable ICU 53
*/
-U_STABLE UDisplayContext U_EXPORT2
+U_CAPI UDisplayContext U_EXPORT2
unum_getContext(const UNumberFormat *fmt, UDisplayContextType type, UErrorCode* status);
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/include/unicode/unumberformatter.h b/contrib/libs/icu/include/unicode/unumberformatter.h
index af98ba0027..cb980cd94d 100644
--- a/contrib/libs/icu/include/unicode/unumberformatter.h
+++ b/contrib/libs/icu/include/unicode/unumberformatter.h
@@ -1,11 +1,12 @@
// © 2018 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#ifndef __UNUMBERFORMATTER_H__
+#define __UNUMBERFORMATTER_H__
+
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
-#ifndef __UNUMBERFORMATTER_H__
-#define __UNUMBERFORMATTER_H__
#include "unicode/parseerr.h"
#include "unicode/ufieldpositer.h"
@@ -77,6 +78,62 @@
* </pre>
*/
+#ifndef U_FORCE_HIDE_DRAFT_API
+/**
+ * An enum declaring how to resolve conflicts between maximum fraction digits and maximum
+ * significant digits.
+ *
+ * There are two modes, RELAXED and STRICT:
+ *
+ * - RELAXED: Relax one of the two constraints (fraction digits or significant digits) in order
+ * to round the number to a higher level of precision.
+ * - STRICT: Enforce both constraints, resulting in the number being rounded to a lower
+ * level of precision.
+ *
+ * The default settings for compact notation rounding are Max-Fraction = 0 (round to the nearest
+ * integer), Max-Significant = 2 (round to 2 significant digits), and priority RELAXED (choose
+ * the constraint that results in more digits being displayed).
+ *
+ * Conflicting *minimum* fraction and significant digits are always resolved in the direction that
+ * results in more trailing zeros.
+ *
+ * Example 1: Consider the number 3.141, with various different settings:
+ *
+ * - Max-Fraction = 1: "3.1"
+ * - Max-Significant = 3: "3.14"
+ *
+ * The rounding priority determines how to resolve the conflict when both Max-Fraction and
+ * Max-Significant are set. With RELAXED, the less-strict setting (the one that causes more digits
+ * to be displayed) will be used; Max-Significant wins. With STRICT, the more-strict setting (the
+ * one that causes fewer digits to be displayed) will be used; Max-Fraction wins.
+ *
+ * Example 2: Consider the number 8317, with various different settings:
+ *
+ * - Max-Fraction = 1: "8317"
+ * - Max-Significant = 3: "8320"
+ *
+ * Here, RELAXED favors Max-Fraction and STRICT favors Max-Significant. Note that this larger
+ * number caused the two modes to favor the opposite result.
+ *
+ * @draft ICU 69
+ */
+typedef enum UNumberRoundingPriority {
+ /**
+ * Favor greater precision by relaxing one of the rounding constraints.
+ *
+ * @draft ICU 69
+ */
+ UNUM_ROUNDING_PRIORITY_RELAXED,
+
+ /**
+ * Favor adherence to all rounding constraints by producing lower precision.
+ *
+ * @draft ICU 69
+ */
+ UNUM_ROUNDING_PRIORITY_STRICT,
+} UNumberRoundingPriority;
+#endif // U_FORCE_HIDE_DRAFT_API
+
/**
* An enum declaring how to render units, including currencies. Example outputs when formatting 123 USD and 123
* meters in <em>en-CA</em>:
@@ -107,7 +164,7 @@ typedef enum UNumberUnitWidth {
*
* @stable ICU 60
*/
- UNUM_UNIT_WIDTH_NARROW,
+ UNUM_UNIT_WIDTH_NARROW = 0,
/**
* Print an abbreviated version of the unit name. Similar to NARROW, but use a slightly wider abbreviation or
@@ -123,7 +180,7 @@ typedef enum UNumberUnitWidth {
*
* @stable ICU 60
*/
- UNUM_UNIT_WIDTH_SHORT,
+ UNUM_UNIT_WIDTH_SHORT = 1,
/**
* Print the full name of the unit, without any abbreviations.
@@ -134,7 +191,7 @@ typedef enum UNumberUnitWidth {
*
* @stable ICU 60
*/
- UNUM_UNIT_WIDTH_FULL_NAME,
+ UNUM_UNIT_WIDTH_FULL_NAME = 2,
/**
* Use the three-digit ISO XXX code in place of the symbol for displaying currencies. The behavior of this
@@ -145,7 +202,29 @@ typedef enum UNumberUnitWidth {
*
* @stable ICU 60
*/
- UNUM_UNIT_WIDTH_ISO_CODE,
+ UNUM_UNIT_WIDTH_ISO_CODE = 3,
+
+ /**
+ * Use the formal variant of the currency symbol; for example, "NT$" for the New Taiwan
+ * dollar in zh-TW.
+ *
+ * <p>
+ * Behavior of this option with non-currency units is not defined at this time.
+ *
+ * @stable ICU 68
+ */
+ UNUM_UNIT_WIDTH_FORMAL = 4,
+
+ /**
+ * Use the alternate variant of the currency symbol; for example, "TL" for the Turkish
+ * lira (TRY).
+ *
+ * <p>
+ * Behavior of this option with non-currency units is not defined at this time.
+ *
+ * @stable ICU 68
+ */
+ UNUM_UNIT_WIDTH_VARIANT = 5,
/**
* Format the number according to the specified unit, but do not display the unit. For currencies, apply
@@ -154,14 +233,16 @@ typedef enum UNumberUnitWidth {
*
* @stable ICU 60
*/
- UNUM_UNIT_WIDTH_HIDDEN,
+ UNUM_UNIT_WIDTH_HIDDEN = 6,
+ // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
+ // needed for unconditionalized struct MacroProps
/**
* One more than the highest UNumberUnitWidth value.
*
* @internal ICU 60: The numeric value may change over time; see ICU ticket #12420.
*/
- UNUM_UNIT_WIDTH_COUNT
+ UNUM_UNIT_WIDTH_COUNT = 7
} UNumberUnitWidth;
/**
@@ -289,9 +370,12 @@ typedef enum UNumberSignDisplay {
* Show the minus sign on negative numbers, and do not show the sign on positive numbers. This is the default
* behavior.
*
+ * If using this option, a sign will be displayed on negative zero, including negative numbers
+ * that round to zero. To hide the sign on negative zero, use the NEGATIVE option.
+ *
* @stable ICU 60
*/
- UNUM_SIGN_AUTO,
+ UNUM_SIGN_AUTO,
/**
* Show the minus sign on negative numbers and the plus sign on positive numbers, including zero.
@@ -299,14 +383,14 @@ typedef enum UNumberSignDisplay {
*
* @stable ICU 60
*/
- UNUM_SIGN_ALWAYS,
+ UNUM_SIGN_ALWAYS,
/**
* Do not show the sign on positive or negative numbers.
*
* @stable ICU 60
*/
- UNUM_SIGN_NEVER,
+ UNUM_SIGN_NEVER,
/**
* Use the locale-dependent accounting format on negative numbers, and do not show the sign on positive numbers.
@@ -322,7 +406,7 @@ typedef enum UNumberSignDisplay {
*
* @stable ICU 60
*/
- UNUM_SIGN_ACCOUNTING,
+ UNUM_SIGN_ACCOUNTING,
/**
* Use the locale-dependent accounting format on negative numbers, and show the plus sign on
@@ -332,7 +416,7 @@ typedef enum UNumberSignDisplay {
*
* @stable ICU 60
*/
- UNUM_SIGN_ACCOUNTING_ALWAYS,
+ UNUM_SIGN_ACCOUNTING_ALWAYS,
/**
* Show the minus sign on negative numbers and the plus sign on positive numbers. Do not show a
@@ -340,7 +424,7 @@ typedef enum UNumberSignDisplay {
*
* @stable ICU 61
*/
- UNUM_SIGN_EXCEPT_ZERO,
+ UNUM_SIGN_EXCEPT_ZERO,
/**
* Use the locale-dependent accounting format on negative numbers, and show the plus sign on
@@ -349,14 +433,32 @@ typedef enum UNumberSignDisplay {
*
* @stable ICU 61
*/
- UNUM_SIGN_ACCOUNTING_EXCEPT_ZERO,
+ UNUM_SIGN_ACCOUNTING_EXCEPT_ZERO,
+
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Same as AUTO, but do not show the sign on negative zero.
+ *
+ * @draft ICU 69
+ */
+ UNUM_SIGN_NEGATIVE,
+
+ /**
+ * Same as ACCOUNTING, but do not show the sign on negative zero.
+ *
+ * @draft ICU 69
+ */
+ UNUM_SIGN_ACCOUNTING_NEGATIVE,
+#endif // U_HIDE_DRAFT_API
+ // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
+ // needed for unconditionalized struct MacroProps
/**
* One more than the highest UNumberSignDisplay value.
*
* @internal ICU 60: The numeric value may change over time; see ICU ticket #12420.
*/
- UNUM_SIGN_COUNT
+ UNUM_SIGN_COUNT = 9,
} UNumberSignDisplay;
/**
@@ -386,6 +488,8 @@ typedef enum UNumberDecimalSeparatorDisplay {
*/
UNUM_DECIMAL_SEPARATOR_ALWAYS,
+ // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
+ // needed for unconditionalized struct MacroProps
/**
* One more than the highest UNumberDecimalSeparatorDisplay value.
*
@@ -394,6 +498,32 @@ typedef enum UNumberDecimalSeparatorDisplay {
UNUM_DECIMAL_SEPARATOR_COUNT
} UNumberDecimalSeparatorDisplay;
+#ifndef U_FORCE_HIDE_DRAFT_API
+/**
+ * An enum declaring how to render trailing zeros.
+ *
+ * - UNUM_TRAILING_ZERO_AUTO: 0.90, 1.00, 1.10
+ * - UNUM_TRAILING_ZERO_HIDE_IF_WHOLE: 0.90, 1, 1.10
+ *
+ * @draft ICU 69
+ */
+typedef enum UNumberTrailingZeroDisplay {
+ /**
+ * Display trailing zeros according to the settings for minimum fraction and significant digits.
+ *
+ * @draft ICU 69
+ */
+ UNUM_TRAILING_ZERO_AUTO,
+
+ /**
+ * Same as AUTO, but hide trailing zeros after the decimal separator if they are all zero.
+ *
+ * @draft ICU 69
+ */
+ UNUM_TRAILING_ZERO_HIDE_IF_WHOLE,
+} UNumberTrailingZeroDisplay;
+#endif // U_FORCE_HIDE_DRAFT_API
+
struct UNumberFormatter;
/**
* C-compatible version of icu::number::LocalizedNumberFormatter.
@@ -424,6 +554,9 @@ typedef struct UFormattedNumber UFormattedNumber;
* For more details on skeleton strings, see the documentation in numberformatter.h. For more details on
* the usage of this API, see the documentation at the top of unumberformatter.h.
*
+ * For more information on number skeleton strings, see:
+ * https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
+ *
* NOTE: This is a C-compatible API; C++ users should build against numberformatter.h instead.
*
* @param skeleton The skeleton string, like u"percent precision-integer"
@@ -432,7 +565,7 @@ typedef struct UFormattedNumber UFormattedNumber;
* @param ec Set if an error occurs.
* @stable ICU 62
*/
-U_STABLE UNumberFormatter* U_EXPORT2
+U_CAPI UNumberFormatter* U_EXPORT2
unumf_openForSkeletonAndLocale(const UChar* skeleton, int32_t skeletonLen, const char* locale,
UErrorCode* ec);
@@ -441,6 +574,9 @@ unumf_openForSkeletonAndLocale(const UChar* skeleton, int32_t skeletonLen, const
* Like unumf_openForSkeletonAndLocale, but accepts a UParseError, which will be populated with the
* location of a skeleton syntax error if such a syntax error exists.
*
+ * For more information on number skeleton strings, see:
+ * https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
+ *
* @param skeleton The skeleton string, like u"percent precision-integer"
* @param skeletonLen The number of UChars in the skeleton string, or -1 if it is NUL-terminated.
* @param locale The NUL-terminated locale ID.
@@ -449,7 +585,7 @@ unumf_openForSkeletonAndLocale(const UChar* skeleton, int32_t skeletonLen, const
* @param ec Set if an error occurs.
* @stable ICU 64
*/
-U_STABLE UNumberFormatter* U_EXPORT2
+U_CAPI UNumberFormatter* U_EXPORT2
unumf_openForSkeletonAndLocaleWithError(
const UChar* skeleton, int32_t skeletonLen, const char* locale, UParseError* perror, UErrorCode* ec);
@@ -462,7 +598,7 @@ unumf_openForSkeletonAndLocaleWithError(
* @param ec Set if an error occurs.
* @stable ICU 62
*/
-U_STABLE UFormattedNumber* U_EXPORT2
+U_CAPI UFormattedNumber* U_EXPORT2
unumf_openResult(UErrorCode* ec);
@@ -481,7 +617,7 @@ unumf_openResult(UErrorCode* ec);
* @param ec Set if an error occurs.
* @stable ICU 62
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unumf_formatInt(const UNumberFormatter* uformatter, int64_t value, UFormattedNumber* uresult,
UErrorCode* ec);
@@ -501,7 +637,7 @@ unumf_formatInt(const UNumberFormatter* uformatter, int64_t value, UFormattedNum
* @param ec Set if an error occurs.
* @stable ICU 62
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unumf_formatDouble(const UNumberFormatter* uformatter, double value, UFormattedNumber* uresult,
UErrorCode* ec);
@@ -525,7 +661,7 @@ unumf_formatDouble(const UNumberFormatter* uformatter, double value, UFormattedN
* @param ec Set if an error occurs.
* @stable ICU 62
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unumf_formatDecimal(const UNumberFormatter* uformatter, const char* value, int32_t valueLen,
UFormattedNumber* uresult, UErrorCode* ec);
@@ -543,7 +679,7 @@ unumf_formatDecimal(const UNumberFormatter* uformatter, const char* value, int32
* @return A UFormattedValue owned by the input object.
* @stable ICU 64
*/
-U_STABLE const UFormattedValue* U_EXPORT2
+U_CAPI const UFormattedValue* U_EXPORT2
unumf_resultAsValue(const UFormattedNumber* uresult, UErrorCode* ec);
@@ -566,7 +702,7 @@ unumf_resultAsValue(const UFormattedNumber* uresult, UErrorCode* ec);
* @return The required length.
* @stable ICU 62
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unumf_resultToString(const UFormattedNumber* uresult, UChar* buffer, int32_t bufferCapacity,
UErrorCode* ec);
@@ -600,11 +736,11 @@ unumf_resultToString(const UFormattedNumber* uresult, UChar* buffer, int32_t buf
* "beginIndex" field is set to the beginning of the first occurrence of the field after the
* input "endIndex", and "endIndex" is set to the end of that occurrence of the field
* (exclusive index). If a field position is not found, the FieldPosition is not changed and
- * the method returns FALSE.
+ * the method returns false.
* @param ec Set if an error occurs.
* @stable ICU 62
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
unumf_resultNextFieldPosition(const UFormattedNumber* uresult, UFieldPosition* ufpos, UErrorCode* ec);
@@ -629,16 +765,35 @@ unumf_resultNextFieldPosition(const UFormattedNumber* uresult, UFieldPosition* u
* @param ec Set if an error occurs.
* @stable ICU 62
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unumf_resultGetAllFieldPositions(const UFormattedNumber* uresult, UFieldPositionIterator* ufpositer,
UErrorCode* ec);
-// TODO(ICU-20775): Propose this as API.
-// NOTE: This is not currently implemented.
-// U_DRAFT int32_t U_EXPORT2
-// unumf_resultToDecimalNumber(const UFormattedNumber* uresult, char* buffer, int32_t bufferCapacity,
-// UErrorCode* ec);
+/**
+ * Extracts the formatted number as a "numeric string" conforming to the
+ * syntax defined in the Decimal Arithmetic Specification, available at
+ * http://speleotrove.com/decimal
+ *
+ * This endpoint is useful for obtaining the exact number being printed
+ * after scaling and rounding have been applied by the number formatter.
+ *
+ * @param uresult The input object containing the formatted number.
+ * @param dest the 8-bit char buffer into which the decimal number is placed
+ * @param destCapacity The size, in chars, of the destination buffer. May be zero
+ * for precomputing the required size.
+ * @param ec receives any error status.
+ * If U_BUFFER_OVERFLOW_ERROR: Returns number of chars for
+ * preflighting.
+ * @return Number of chars in the data. Does not include a trailing NUL.
+ * @stable ICU 68
+ */
+U_CAPI int32_t U_EXPORT2
+unumf_resultToDecimalNumber(
+ const UFormattedNumber* uresult,
+ char* dest,
+ int32_t destCapacity,
+ UErrorCode* ec);
/**
@@ -647,7 +802,7 @@ unumf_resultGetAllFieldPositions(const UFormattedNumber* uresult, UFieldPosition
* @param uformatter An object created by unumf_openForSkeletonAndLocale().
* @stable ICU 62
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unumf_close(UNumberFormatter* uformatter);
@@ -657,7 +812,7 @@ unumf_close(UNumberFormatter* uformatter);
* @param uresult An object created by unumf_openResult().
* @stable ICU 62
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unumf_closeResult(UFormattedNumber* uresult);
@@ -701,5 +856,5 @@ U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattedNumberPointer, UFormattedNumber, unum
U_NAMESPACE_END
#endif // U_SHOW_CPLUSPLUS_API
-#endif //__UNUMBERFORMATTER_H__
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif //__UNUMBERFORMATTER_H__
diff --git a/contrib/libs/icu/include/unicode/unumberrangeformatter.h b/contrib/libs/icu/include/unicode/unumberrangeformatter.h
new file mode 100644
index 0000000000..4e92fe29e2
--- /dev/null
+++ b/contrib/libs/icu/include/unicode/unumberrangeformatter.h
@@ -0,0 +1,471 @@
+// © 2020 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#ifndef __UNUMBERRANGEFORMATTER_H__
+#define __UNUMBERRANGEFORMATTER_H__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/parseerr.h"
+#include "unicode/ufieldpositer.h"
+#include "unicode/umisc.h"
+#include "unicode/uformattedvalue.h"
+#include "unicode/uformattable.h"
+
+
+/**
+ * \file
+ * \brief C-compatible API for localized number range formatting.
+ *
+ * This is the C-compatible version of the NumberRangeFormatter API. C++ users
+ * should include unicode/numberrangeformatter.h and use the proper C++ APIs.
+ *
+ * First create a UNumberRangeFormatter, which is immutable, and then format to
+ * a UFormattedNumberRange.
+ *
+ * Example code:
+ * <pre>
+ * // Setup:
+ * UErrorCode ec = U_ZERO_ERROR;
+ * UNumberRangeFormatter* uformatter = unumrf_openForSkeletonCollapseIdentityFallbackAndLocaleWithError(
+ * u"currency/USD precision-integer",
+ * -1,
+ * UNUM_RANGE_COLLAPSE_AUTO,
+ * UNUM_IDENTITY_FALLBACK_APPROXIMATELY,
+ * "en-US",
+ * NULL,
+ * &ec);
+ * UFormattedNumberRange* uresult = unumrf_openResult(&ec);
+ * if (U_FAILURE(ec)) { return; }
+ *
+ * // Format a double range:
+ * unumrf_formatDoubleRange(uformatter, 3.0, 5.0, uresult, &ec);
+ * if (U_FAILURE(ec)) { return; }
+ *
+ * // Get the result string:
+ * int32_t len;
+ * const UChar* str = ufmtval_getString(unumrf_resultAsValue(uresult, &ec), &len, &ec);
+ * if (U_FAILURE(ec)) { return; }
+ * // str should equal "$3 – $5"
+ *
+ * // Cleanup:
+ * unumf_close(uformatter);
+ * unumf_closeResult(uresult);
+ * </pre>
+ *
+ * If you are a C++ user linking against the C libraries, you can use the LocalPointer versions of these
+ * APIs. The following example uses LocalPointer with the decimal number and field position APIs:
+ *
+ * <pre>
+ * // Setup:
+ * LocalUNumberRangeFormatterPointer uformatter(
+ * unumrf_openForSkeletonCollapseIdentityFallbackAndLocaleWithError(...));
+ * LocalUFormattedNumberRangePointer uresult(unumrf_openResult(&ec));
+ * if (U_FAILURE(ec)) { return; }
+ *
+ * // Format a double number range:
+ * unumrf_formatDoubleRange(uformatter.getAlias(), 3.0, 5.0, uresult.getAlias(), &ec);
+ * if (U_FAILURE(ec)) { return; }
+ *
+ * // No need to do any cleanup since we are using LocalPointer.
+ * </pre>
+ *
+ * You can also get field positions. For more information, see uformattedvalue.h.
+ */
+
+/**
+ * Defines how to merge fields that are identical across the range sign.
+ *
+ * @stable ICU 63
+ */
+typedef enum UNumberRangeCollapse {
+ /**
+ * Use locale data and heuristics to determine how much of the string to collapse. Could end up collapsing none,
+ * some, or all repeated pieces in a locale-sensitive way.
+ *
+ * The heuristics used for this option are subject to change over time.
+ *
+ * @stable ICU 63
+ */
+ UNUM_RANGE_COLLAPSE_AUTO,
+
+ /**
+ * Do not collapse any part of the number. Example: "3.2 thousand kilograms – 5.3 thousand kilograms"
+ *
+ * @stable ICU 63
+ */
+ UNUM_RANGE_COLLAPSE_NONE,
+
+ /**
+ * Collapse the unit part of the number, but not the notation, if present. Example: "3.2 thousand – 5.3 thousand
+ * kilograms"
+ *
+ * @stable ICU 63
+ */
+ UNUM_RANGE_COLLAPSE_UNIT,
+
+ /**
+ * Collapse any field that is equal across the range sign. May introduce ambiguity on the magnitude of the
+ * number. Example: "3.2 – 5.3 thousand kilograms"
+ *
+ * @stable ICU 63
+ */
+ UNUM_RANGE_COLLAPSE_ALL
+} UNumberRangeCollapse;
+
+/**
+ * Defines the behavior when the two numbers in the range are identical after rounding. To programmatically detect
+ * when the identity fallback is used, compare the lower and upper BigDecimals via FormattedNumber.
+ *
+ * @stable ICU 63
+ * @see NumberRangeFormatter
+ */
+typedef enum UNumberRangeIdentityFallback {
+ /**
+ * Show the number as a single value rather than a range. Example: "$5"
+ *
+ * @stable ICU 63
+ */
+ UNUM_IDENTITY_FALLBACK_SINGLE_VALUE,
+
+ /**
+ * Show the number using a locale-sensitive approximation pattern. If the numbers were the same before rounding,
+ * show the single value. Example: "~$5" or "$5"
+ *
+ * @stable ICU 63
+ */
+ UNUM_IDENTITY_FALLBACK_APPROXIMATELY_OR_SINGLE_VALUE,
+
+ /**
+ * Show the number using a locale-sensitive approximation pattern. Use the range pattern always, even if the
+ * inputs are the same. Example: "~$5"
+ *
+ * @stable ICU 63
+ */
+ UNUM_IDENTITY_FALLBACK_APPROXIMATELY,
+
+ /**
+ * Show the number as the range of two equal values. Use the range pattern always, even if the inputs are the
+ * same. Example (with RangeCollapse.NONE): "$5 – $5"
+ *
+ * @stable ICU 63
+ */
+ UNUM_IDENTITY_FALLBACK_RANGE
+} UNumberRangeIdentityFallback;
+
+/**
+ * Used in the result class FormattedNumberRange to indicate to the user whether the numbers formatted in the range
+ * were equal or not, and whether or not the identity fallback was applied.
+ *
+ * @stable ICU 63
+ * @see NumberRangeFormatter
+ */
+typedef enum UNumberRangeIdentityResult {
+ /**
+ * Used to indicate that the two numbers in the range were equal, even before any rounding rules were applied.
+ *
+ * @stable ICU 63
+ * @see NumberRangeFormatter
+ */
+ UNUM_IDENTITY_RESULT_EQUAL_BEFORE_ROUNDING,
+
+ /**
+ * Used to indicate that the two numbers in the range were equal, but only after rounding rules were applied.
+ *
+ * @stable ICU 63
+ * @see NumberRangeFormatter
+ */
+ UNUM_IDENTITY_RESULT_EQUAL_AFTER_ROUNDING,
+
+ /**
+ * Used to indicate that the two numbers in the range were not equal, even after rounding rules were applied.
+ *
+ * @stable ICU 63
+ * @see NumberRangeFormatter
+ */
+ UNUM_IDENTITY_RESULT_NOT_EQUAL,
+
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * The number of entries in this enum.
+ * @internal
+ */
+ UNUM_IDENTITY_RESULT_COUNT
+#endif /* U_HIDE_INTERNAL_API */
+
+} UNumberRangeIdentityResult;
+
+
+struct UNumberRangeFormatter;
+/**
+ * C-compatible version of icu::number::LocalizedNumberRangeFormatter.
+ *
+ * NOTE: This is a C-compatible API; C++ users should build against numberrangeformatter.h instead.
+ *
+ * @stable ICU 68
+ */
+typedef struct UNumberRangeFormatter UNumberRangeFormatter;
+
+
+struct UFormattedNumberRange;
+/**
+ * C-compatible version of icu::number::FormattedNumberRange.
+ *
+ * NOTE: This is a C-compatible API; C++ users should build against numberrangeformatter.h instead.
+ *
+ * @stable ICU 68
+ */
+typedef struct UFormattedNumberRange UFormattedNumberRange;
+
+
+/**
+ * Creates a new UNumberFormatter for the given skeleton string, collapse option, identity fallback
+ * option, and locale. This is currently the only method for creating a new UNumberRangeFormatter.
+ *
+ * Objects of type UNumberRangeFormatter returned by this method are threadsafe.
+ *
+ * For more details on skeleton strings, see the documentation in numberrangeformatter.h. For more
+ * details on the usage of this API, see the documentation at the top of unumberrangeformatter.h.
+ *
+ * NOTE: This is a C-compatible API; C++ users should build against numberrangeformatter.h instead.
+ *
+ * @param skeleton The skeleton string, like u"percent precision-integer"
+ * @param skeletonLen The number of UChars in the skeleton string, or -1 if it is NUL-terminated.
+ * @param collapse Option for how to merge affixes (if unsure, use UNUM_RANGE_COLLAPSE_AUTO)
+ * @param identityFallback Option for resolving when both sides of the range are equal.
+ * @param locale The NUL-terminated locale ID.
+ * @param perror A parse error struct populated if an error occurs when parsing. Can be NULL.
+ * If no error occurs, perror->offset will be set to -1.
+ * @param ec Set if an error occurs.
+ * @stable ICU 68
+ */
+U_CAPI UNumberRangeFormatter* U_EXPORT2
+unumrf_openForSkeletonWithCollapseAndIdentityFallback(
+ const UChar* skeleton,
+ int32_t skeletonLen,
+ UNumberRangeCollapse collapse,
+ UNumberRangeIdentityFallback identityFallback,
+ const char* locale,
+ UParseError* perror,
+ UErrorCode* ec);
+
+
+/**
+ * Creates an object to hold the result of a UNumberRangeFormatter
+ * operation. The object can be used repeatedly; it is cleared whenever
+ * passed to a format function.
+ *
+ * @param ec Set if an error occurs.
+ * @stable ICU 68
+ */
+U_CAPI UFormattedNumberRange* U_EXPORT2
+unumrf_openResult(UErrorCode* ec);
+
+
+/**
+ * Uses a UNumberRangeFormatter to format a range of doubles.
+ *
+ * The UNumberRangeFormatter can be shared between threads. Each thread should have its own local
+ * UFormattedNumberRange, however, for storing the result of the formatting operation.
+ *
+ * NOTE: This is a C-compatible API; C++ users should build against numberrangeformatter.h instead.
+ *
+ * @param uformatter A formatter object; see unumberrangeformatter.h.
+ * @param first The first (usually smaller) number in the range.
+ * @param second The second (usually larger) number in the range.
+ * @param uresult The object that will be mutated to store the result; see unumrf_openResult.
+ * @param ec Set if an error occurs.
+ * @stable ICU 68
+ */
+U_CAPI void U_EXPORT2
+unumrf_formatDoubleRange(
+ const UNumberRangeFormatter* uformatter,
+ double first,
+ double second,
+ UFormattedNumberRange* uresult,
+ UErrorCode* ec);
+
+
+/**
+ * Uses a UNumberRangeFormatter to format a range of decimal numbers.
+ *
+ * With a decimal number string, you can specify an input with arbitrary precision.
+ *
+ * The UNumberRangeFormatter can be shared between threads. Each thread should have its own local
+ * UFormattedNumberRange, however, for storing the result of the formatting operation.
+ *
+ * NOTE: This is a C-compatible API; C++ users should build against numberrangeformatter.h instead.
+ *
+ * @param uformatter A formatter object; see unumberrangeformatter.h.
+ * @param first The first (usually smaller) number in the range.
+ * @param firstLen The length of the first decimal number string.
+ * @param second The second (usually larger) number in the range.
+ * @param secondLen The length of the second decimal number string.
+ * @param uresult The object that will be mutated to store the result; see unumrf_openResult.
+ * @param ec Set if an error occurs.
+ * @stable ICU 68
+ */
+U_CAPI void U_EXPORT2
+unumrf_formatDecimalRange(
+ const UNumberRangeFormatter* uformatter,
+ const char* first,
+ int32_t firstLen,
+ const char* second,
+ int32_t secondLen,
+ UFormattedNumberRange* uresult,
+ UErrorCode* ec);
+
+
+/**
+ * Returns a representation of a UFormattedNumberRange as a UFormattedValue,
+ * which can be subsequently passed to any API requiring that type.
+ *
+ * The returned object is owned by the UFormattedNumberRange and is valid
+ * only as long as the UFormattedNumber is present and unchanged in memory.
+ *
+ * You can think of this method as a cast between types.
+ *
+ * @param uresult The object containing the formatted number range.
+ * @param ec Set if an error occurs.
+ * @return A UFormattedValue owned by the input object.
+ * @stable ICU 68
+ */
+U_CAPI const UFormattedValue* U_EXPORT2
+unumrf_resultAsValue(const UFormattedNumberRange* uresult, UErrorCode* ec);
+
+
+/**
+ * Extracts the identity result from a UFormattedNumberRange.
+ *
+ * NOTE: This is a C-compatible API; C++ users should build against numberformatter.h instead.
+ *
+ * @param uresult The object containing the formatted number range.
+ * @param ec Set if an error occurs.
+ * @return The identity result; see UNumberRangeIdentityResult.
+ * @stable ICU 68
+ */
+U_CAPI UNumberRangeIdentityResult U_EXPORT2
+unumrf_resultGetIdentityResult(
+ const UFormattedNumberRange* uresult,
+ UErrorCode* ec);
+
+
+/**
+ * Extracts the first formatted number as a decimal number. This endpoint
+ * is useful for obtaining the exact number being printed after scaling
+ * and rounding have been applied by the number range formatting pipeline.
+ *
+ * The syntax of the unformatted number is a "numeric string"
+ * as defined in the Decimal Arithmetic Specification, available at
+ * http://speleotrove.com/decimal
+ *
+ * @param uresult The input object containing the formatted number range.
+ * @param dest the 8-bit char buffer into which the decimal number is placed
+ * @param destCapacity The size, in chars, of the destination buffer. May be zero
+ * for precomputing the required size.
+ * @param ec receives any error status.
+ * If U_BUFFER_OVERFLOW_ERROR: Returns number of chars for
+ * preflighting.
+ * @return Number of chars in the data. Does not include a trailing NUL.
+ * @stable ICU 68
+ */
+U_CAPI int32_t U_EXPORT2
+unumrf_resultGetFirstDecimalNumber(
+ const UFormattedNumberRange* uresult,
+ char* dest,
+ int32_t destCapacity,
+ UErrorCode* ec);
+
+
+/**
+ * Extracts the second formatted number as a decimal number. This endpoint
+ * is useful for obtaining the exact number being printed after scaling
+ * and rounding have been applied by the number range formatting pipeline.
+ *
+ * The syntax of the unformatted number is a "numeric string"
+ * as defined in the Decimal Arithmetic Specification, available at
+ * http://speleotrove.com/decimal
+ *
+ * @param uresult The input object containing the formatted number range.
+ * @param dest the 8-bit char buffer into which the decimal number is placed
+ * @param destCapacity The size, in chars, of the destination buffer. May be zero
+ * for precomputing the required size.
+ * @param ec receives any error status.
+ * If U_BUFFER_OVERFLOW_ERROR: Returns number of chars for
+ * preflighting.
+ * @return Number of chars in the data. Does not include a trailing NUL.
+ * @stable ICU 68
+ */
+U_CAPI int32_t U_EXPORT2
+unumrf_resultGetSecondDecimalNumber(
+ const UFormattedNumberRange* uresult,
+ char* dest,
+ int32_t destCapacity,
+ UErrorCode* ec);
+
+
+/**
+ * Releases the UNumberFormatter created by unumf_openForSkeletonAndLocale().
+ *
+ * @param uformatter An object created by unumf_openForSkeletonAndLocale().
+ * @stable ICU 68
+ */
+U_CAPI void U_EXPORT2
+unumrf_close(UNumberRangeFormatter* uformatter);
+
+
+/**
+ * Releases the UFormattedNumber created by unumf_openResult().
+ *
+ * @param uresult An object created by unumf_openResult().
+ * @stable ICU 68
+ */
+U_CAPI void U_EXPORT2
+unumrf_closeResult(UFormattedNumberRange* uresult);
+
+
+#if U_SHOW_CPLUSPLUS_API
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUNumberRangeFormatterPointer
+ * "Smart pointer" class; closes a UNumberFormatter via unumf_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * Usage:
+ * <pre>
+ * LocalUNumberRangeFormatterPointer uformatter(
+ * unumrf_openForSkeletonCollapseIdentityFallbackAndLocaleWithError(...));
+ * // no need to explicitly call unumrf_close()
+ * </pre>
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 68
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUNumberRangeFormatterPointer, UNumberRangeFormatter, unumrf_close);
+
+/**
+ * \class LocalUFormattedNumberPointer
+ * "Smart pointer" class; closes a UFormattedNumber via unumf_closeResult().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * Usage:
+ * <pre>
+ * LocalUFormattedNumberRangePointer uresult(unumrf_openResult(...));
+ * // no need to explicitly call unumrf_closeResult()
+ * </pre>
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 68
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattedNumberRangePointer, UFormattedNumberRange, unumrf_closeResult);
+
+U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif //__UNUMBERRANGEFORMATTER_H__
diff --git a/contrib/libs/icu/include/unicode/unumsys.h b/contrib/libs/icu/include/unicode/unumsys.h
index 1631c234fd..fe713ea77a 100644
--- a/contrib/libs/icu/include/unicode/unumsys.h
+++ b/contrib/libs/icu/include/unicode/unumsys.h
@@ -15,7 +15,10 @@
#if !UCONFIG_NO_FORMATTING
#include "unicode/uenum.h"
+
+#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
/**
* \file
@@ -54,7 +57,7 @@ typedef struct UNumberingSystem UNumberingSystem; /**< C typedef for struct UNu
* occurred.
* @stable ICU 52
*/
-U_STABLE UNumberingSystem * U_EXPORT2
+U_CAPI UNumberingSystem * U_EXPORT2
unumsys_open(const char *locale, UErrorCode *status);
/**
@@ -75,7 +78,7 @@ unumsys_open(const char *locale, UErrorCode *status);
* occurred.
* @stable ICU 52
*/
-U_STABLE UNumberingSystem * U_EXPORT2
+U_CAPI UNumberingSystem * U_EXPORT2
unumsys_openByName(const char *name, UErrorCode *status);
/**
@@ -83,7 +86,7 @@ unumsys_openByName(const char *name, UErrorCode *status);
* @param unumsys The UNumberingSystem object to close.
* @stable ICU 52
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
unumsys_close(UNumberingSystem *unumsys);
#if U_SHOW_CPLUSPLUS_API
@@ -111,7 +114,7 @@ U_NAMESPACE_END
* or NULL if an error occurred.
* @stable ICU 52
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
unumsys_openAvailableNames(UErrorCode *status);
/**
@@ -123,18 +126,18 @@ unumsys_openAvailableNames(UErrorCode *status);
* is only valid for the lifetime of the UNumberingSystem object.
* @stable ICU 52
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
unumsys_getName(const UNumberingSystem *unumsys);
/**
* Returns whether the given UNumberingSystem object is for an algorithmic (not purely
* positional) system.
* @param unumsys The UNumberingSystem whose algorithmic status is desired.
- * @return TRUE if the specified UNumberingSystem object is for an algorithmic
+ * @return true if the specified UNumberingSystem object is for an algorithmic
* system.
* @stable ICU 52
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
unumsys_isAlgorithmic(const UNumberingSystem *unumsys);
/**
@@ -145,7 +148,7 @@ unumsys_isAlgorithmic(const UNumberingSystem *unumsys);
* @return The radix of the specified UNumberingSystem object.
* @stable ICU 52
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unumsys_getRadix(const UNumberingSystem *unumsys);
/**
@@ -164,7 +167,7 @@ unumsys_getRadix(const UNumberingSystem *unumsys);
* output was truncated.
* @stable ICU 52
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
unumsys_getDescription(const UNumberingSystem *unumsys, UChar *result,
int32_t resultLength, UErrorCode *status);
diff --git a/contrib/libs/icu/include/unicode/uobject.h b/contrib/libs/icu/include/unicode/uobject.h
index eeb331ce97..25a8330f9a 100644
--- a/contrib/libs/icu/include/unicode/uobject.h
+++ b/contrib/libs/icu/include/unicode/uobject.h
@@ -262,8 +262,8 @@ protected:
// UObject &operator=(const UObject &other) { return *this; }
// comparison operators
- virtual inline UBool operator==(const UObject &other) const { return this==&other; }
- inline UBool operator!=(const UObject &other) const { return !operator==(other); }
+ virtual inline bool operator==(const UObject &other) const { return this==&other; }
+ inline bool operator!=(const UObject &other) const { return !operator==(other); }
// clone() commented out from the base class:
// some compilers do not support co-variant return types
diff --git a/contrib/libs/icu/include/unicode/upluralrules.h b/contrib/libs/icu/include/unicode/upluralrules.h
index 9c09dfab8b..983651b1ca 100644
--- a/contrib/libs/icu/include/unicode/upluralrules.h
+++ b/contrib/libs/icu/include/unicode/upluralrules.h
@@ -14,14 +14,19 @@
#if !UCONFIG_NO_FORMATTING
-#include "unicode/localpointer.h"
#include "unicode/uenum.h"
+
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
#ifndef U_HIDE_INTERNAL_API
#include "unicode/unum.h"
#endif /* U_HIDE_INTERNAL_API */
// Forward-declaration
struct UFormattedNumber;
+struct UFormattedNumberRange;
/**
* \file
@@ -34,8 +39,9 @@ struct UFormattedNumber;
* returns the keyword for the first condition that matches the number.
* If none match, the default rule(other) is returned.
*
- * For more information, see the LDML spec, C.11 Language Plural Rules:
- * http://www.unicode.org/reports/tr35/#Language_Plural_Rules
+ * For more information, see the
+ * LDML spec, Part 3.5 Language Plural Rules:
+ * https://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules
*
* Keywords: ICU locale data has 6 predefined values -
* 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check
@@ -43,7 +49,7 @@ struct UFormattedNumber;
*
* These are based on CLDR <i>Language Plural Rules</i>. For these
* predefined rules, see the CLDR page at
- * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
+ * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html
*/
/**
@@ -163,7 +169,7 @@ uplrules_select(const UPluralRules *uplrules,
* @param uplrules The UPluralRules object specifying the rules.
* @param number The formatted number for which the rule has to be determined.
* @param keyword The destination buffer for the keyword of the rule that
- * applies to number.
+ * applies to the number.
* @param capacity The capacity of the keyword buffer.
* @param status A pointer to a UErrorCode to receive any errors.
* @return The length of the keyword.
@@ -175,6 +181,27 @@ uplrules_selectFormatted(const UPluralRules *uplrules,
UChar *keyword, int32_t capacity,
UErrorCode *status);
+/**
+ * Given a formatted number range, returns the overall plural form of the
+ * range. For example, "3-5" returns "other" in English.
+ *
+ * To get a UFormattedNumberRange, see UNumberRangeFormatter.
+ *
+ * @param uplrules The UPluralRules object specifying the rules.
+ * @param urange The number range onto which the rules will be applied.
+ * @param keyword The destination buffer for the keyword of the rule that
+ * applies to the number range.
+ * @param capacity The capacity of the keyword buffer.
+ * @param status A pointer to a UErrorCode to receive any errors.
+ * @return The length of the keyword.
+ * @stable ICU 68
+ */
+U_CAPI int32_t U_EXPORT2
+uplrules_selectForRange(const UPluralRules *uplrules,
+ const struct UFormattedNumberRange* urange,
+ UChar *keyword, int32_t capacity,
+ UErrorCode *status);
+
#ifndef U_HIDE_INTERNAL_API
/**
* Given a number, returns the keyword of the first rule that applies to the
@@ -194,7 +221,7 @@ uplrules_selectFormatted(const UPluralRules *uplrules,
* @return The length of keyword.
* @internal ICU 59 technology preview, may be removed in the future
*/
-U_INTERNAL int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uplrules_selectWithFormat(const UPluralRules *uplrules,
double number,
const UNumberFormat *fmt,
@@ -213,7 +240,7 @@ uplrules_selectWithFormat(const UPluralRules *uplrules,
* upon error. The caller is responsible for closing the result.
* @stable ICU 59
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uplrules_getKeywords(const UPluralRules *uplrules,
UErrorCode *status);
diff --git a/contrib/libs/icu/include/unicode/uregex.h b/contrib/libs/icu/include/unicode/uregex.h
index 131c492a55..e946e63262 100644
--- a/contrib/libs/icu/include/unicode/uregex.h
+++ b/contrib/libs/icu/include/unicode/uregex.h
@@ -30,9 +30,12 @@
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
-#include "unicode/localpointer.h"
#include "unicode/parseerr.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
struct URegularExpression;
/**
* Structure representing a compiled regular expression, plus the results
@@ -131,7 +134,7 @@ typedef enum URegexpFlag{
* @stable ICU 3.0
*
*/
-U_STABLE URegularExpression * U_EXPORT2
+U_CAPI URegularExpression * U_EXPORT2
uregex_open( const UChar *pattern,
int32_t patternLength,
uint32_t flags,
@@ -161,7 +164,7 @@ uregex_open( const UChar *pattern,
*
* @stable ICU 4.6
*/
-U_STABLE URegularExpression * U_EXPORT2
+U_CAPI URegularExpression * U_EXPORT2
uregex_openUText(UText *pattern,
uint32_t flags,
UParseError *pe,
@@ -191,7 +194,7 @@ uregex_openUText(UText *pattern,
*
* @stable ICU 3.0
*/
-U_STABLE URegularExpression * U_EXPORT2
+U_CAPI URegularExpression * U_EXPORT2
uregex_openC( const char *pattern,
uint32_t flags,
UParseError *pe,
@@ -207,7 +210,7 @@ uregex_openC( const char *pattern,
* @param regexp The regular expression to be closed.
* @stable ICU 3.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_close(URegularExpression *regexp);
#if U_SHOW_CPLUSPLUS_API
@@ -247,7 +250,7 @@ U_NAMESPACE_END
* @return the cloned copy of the compiled regular expression.
* @stable ICU 3.0
*/
-U_STABLE URegularExpression * U_EXPORT2
+U_CAPI URegularExpression * U_EXPORT2
uregex_clone(const URegularExpression *regexp, UErrorCode *status);
/**
@@ -267,7 +270,7 @@ uregex_clone(const URegularExpression *regexp, UErrorCode *status);
* will remain valid until the regular expression is closed.
* @stable ICU 3.0
*/
-U_STABLE const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
uregex_pattern(const URegularExpression *regexp,
int32_t *patLength,
UErrorCode *status);
@@ -283,7 +286,7 @@ uregex_pattern(const URegularExpression *regexp,
*
* @stable ICU 4.6
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
uregex_patternUText(const URegularExpression *regexp,
UErrorCode *status);
@@ -295,7 +298,7 @@ uregex_patternUText(const URegularExpression *regexp,
* @see URegexpFlag
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_flags(const URegularExpression *regexp,
UErrorCode *status);
@@ -320,7 +323,7 @@ uregex_flags(const URegularExpression *regexp,
* @param status Receives errors detected by this function.
* @stable ICU 3.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_setText(URegularExpression *regexp,
const UChar *text,
int32_t textLength,
@@ -343,7 +346,7 @@ uregex_setText(URegularExpression *regexp,
*
* @stable ICU 4.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_setUText(URegularExpression *regexp,
UText *text,
UErrorCode *status);
@@ -368,7 +371,7 @@ uregex_setUText(URegularExpression *regexp,
* this regular expression.
* @stable ICU 3.0
*/
-U_STABLE const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
uregex_getText(URegularExpression *regexp,
int32_t *textLength,
UErrorCode *status);
@@ -389,7 +392,7 @@ uregex_getText(URegularExpression *regexp,
*
* @stable ICU 4.6
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
uregex_getUText(URegularExpression *regexp,
UText *dest,
UErrorCode *status);
@@ -419,7 +422,7 @@ uregex_getUText(URegularExpression *regexp,
*
* @stable ICU 4.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_refreshUText(URegularExpression *regexp,
UText *text,
UErrorCode *status);
@@ -441,10 +444,10 @@ uregex_refreshUText(URegularExpression *regexp,
* @param startIndex The input string (native) index at which to begin matching, or -1
* to match the input Region.
* @param status Receives errors detected by this function.
- * @return TRUE if there is a match
+ * @return true if there is a match
* @stable ICU 3.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_matches(URegularExpression *regexp,
int32_t startIndex,
UErrorCode *status);
@@ -467,10 +470,10 @@ uregex_matches(URegularExpression *regexp,
* @param startIndex The input string (native) index at which to begin matching, or -1
* to match the input Region.
* @param status Receives errors detected by this function.
- * @return TRUE if there is a match
+ * @return true if there is a match
* @stable ICU 4.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_matches64(URegularExpression *regexp,
int64_t startIndex,
UErrorCode *status);
@@ -495,10 +498,10 @@ uregex_matches64(URegularExpression *regexp,
* @param startIndex The input string (native) index at which to begin matching, or
* -1 to match the Input Region
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match.
+ * @return true if there is a match.
* @stable ICU 3.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_lookingAt(URegularExpression *regexp,
int32_t startIndex,
UErrorCode *status);
@@ -524,10 +527,10 @@ uregex_lookingAt(URegularExpression *regexp,
* @param startIndex The input string (native) index at which to begin matching, or
* -1 to match the Input Region
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match.
+ * @return true if there is a match.
* @stable ICU 4.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_lookingAt64(URegularExpression *regexp,
int64_t startIndex,
UErrorCode *status);
@@ -548,10 +551,10 @@ uregex_lookingAt64(URegularExpression *regexp,
* @param startIndex The position (native) in the input string to begin the search, or
* -1 to search within the Input Region.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 3.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_find(URegularExpression *regexp,
int32_t startIndex,
UErrorCode *status);
@@ -573,10 +576,10 @@ uregex_find(URegularExpression *regexp,
* @param startIndex The position (native) in the input string to begin the search, or
* -1 to search within the Input Region.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 4.6
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_find64(URegularExpression *regexp,
int64_t startIndex,
UErrorCode *status);
@@ -590,11 +593,11 @@ uregex_find64(URegularExpression *regexp,
*
* @param regexp The compiled regular expression.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @see uregex_reset
* @stable ICU 3.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_findNext(URegularExpression *regexp,
UErrorCode *status);
@@ -605,7 +608,7 @@ uregex_findNext(URegularExpression *regexp,
* @return the number of capture groups
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_groupCount(URegularExpression *regexp,
UErrorCode *status);
@@ -625,7 +628,7 @@ uregex_groupCount(URegularExpression *regexp,
*
* @stable ICU 55
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_groupNumberFromName(URegularExpression *regexp,
const UChar *groupName,
int32_t nameLength,
@@ -649,7 +652,7 @@ uregex_groupNumberFromName(URegularExpression *regexp,
*
* @stable ICU 55
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_groupNumberFromCName(URegularExpression *regexp,
const char *groupName,
int32_t nameLength,
@@ -671,7 +674,7 @@ uregex_groupNumberFromCName(URegularExpression *regexp,
* or -1 if no applicable match.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_group(URegularExpression *regexp,
int32_t groupNum,
UChar *dest,
@@ -700,7 +703,7 @@ uregex_group(URegularExpression *regexp,
*
* @stable ICU 4.6
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
uregex_groupUText(URegularExpression *regexp,
int32_t groupNum,
UText *dest,
@@ -721,7 +724,7 @@ uregex_groupUText(URegularExpression *regexp,
* by the specified group.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_start(URegularExpression *regexp,
int32_t groupNum,
UErrorCode *status);
@@ -741,7 +744,7 @@ uregex_start(URegularExpression *regexp,
* by the specified group.
* @stable ICU 4.6
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
uregex_start64(URegularExpression *regexp,
int32_t groupNum,
UErrorCode *status);
@@ -759,7 +762,7 @@ uregex_start64(URegularExpression *regexp,
* @return the (native) index of the position following the last matched character.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_end(URegularExpression *regexp,
int32_t groupNum,
UErrorCode *status);
@@ -778,7 +781,7 @@ uregex_end(URegularExpression *regexp,
* @return the (native) index of the position following the last matched character.
* @stable ICU 4.6
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
uregex_end64(URegularExpression *regexp,
int32_t groupNum,
UErrorCode *status);
@@ -796,7 +799,7 @@ uregex_end64(URegularExpression *regexp,
* @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 3.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_reset(URegularExpression *regexp,
int32_t index,
UErrorCode *status);
@@ -815,7 +818,7 @@ uregex_reset(URegularExpression *regexp,
* @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 4.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_reset64(URegularExpression *regexp,
int64_t index,
UErrorCode *status);
@@ -840,7 +843,7 @@ uregex_reset64(URegularExpression *regexp,
* @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_setRegion(URegularExpression *regexp,
int32_t regionStart,
int32_t regionLimit,
@@ -867,7 +870,7 @@ uregex_setRegion(URegularExpression *regexp,
* @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_setRegion64(URegularExpression *regexp,
int64_t regionStart,
int64_t regionLimit,
@@ -887,7 +890,7 @@ uregex_setRegion64(URegularExpression *regexp,
* @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_setRegionAndStart(URegularExpression *regexp,
int64_t regionStart,
int64_t regionLimit,
@@ -903,7 +906,7 @@ uregex_setRegionAndStart(URegularExpression *regexp,
* @return The starting (native) index of this matcher's region.
* @stable ICU 4.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_regionStart(const URegularExpression *regexp,
UErrorCode *status);
@@ -917,7 +920,7 @@ uregex_regionStart(const URegularExpression *regexp,
* @return The starting (native) index of this matcher's region.
* @stable ICU 4.6
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
uregex_regionStart64(const URegularExpression *regexp,
UErrorCode *status);
@@ -931,7 +934,7 @@ uregex_regionStart64(const URegularExpression *regexp,
* @return The ending point (native) of this matcher's region.
* @stable ICU 4.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_regionEnd(const URegularExpression *regexp,
UErrorCode *status);
@@ -946,7 +949,7 @@ uregex_regionEnd(const URegularExpression *regexp,
* @return The ending point (native) of this matcher's region.
* @stable ICU 4.6
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
uregex_regionEnd64(const URegularExpression *regexp,
UErrorCode *status);
@@ -957,18 +960,18 @@ uregex_regionEnd64(const URegularExpression *regexp,
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
- * @return TRUE if this matcher is using opaque bounds, false if it is not.
+ * @return true if this matcher is using opaque bounds, false if it is not.
* @stable ICU 4.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_hasTransparentBounds(const URegularExpression *regexp,
UErrorCode *status);
/**
* Sets the transparency of region bounds for this URegularExpression.
- * Invoking this function with an argument of TRUE will set matches to use transparent bounds.
- * If the boolean argument is FALSE, then opaque bounds will be used.
+ * Invoking this function with an argument of true will set matches to use transparent bounds.
+ * If the boolean argument is false, then opaque bounds will be used.
*
* Using transparent bounds, the boundaries of the matching region are transparent
* to lookahead, lookbehind, and boundary matching constructs. Those constructs can
@@ -980,11 +983,11 @@ uregex_hasTransparentBounds(const URegularExpression *regexp,
* By default, opaque bounds are used.
*
* @param regexp The compiled regular expression.
- * @param b TRUE for transparent bounds; FALSE for opaque bounds
+ * @param b true for transparent bounds; false for opaque bounds
* @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.0
**/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_useTransparentBounds(URegularExpression *regexp,
UBool b,
UErrorCode *status);
@@ -996,10 +999,10 @@ uregex_useTransparentBounds(URegularExpression *regexp,
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
- * @return TRUE if this matcher is using anchoring bounds.
+ * @return true if this matcher is using anchoring bounds.
* @stable ICU 4.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_hasAnchoringBounds(const URegularExpression *regexp,
UErrorCode *status);
@@ -1013,41 +1016,41 @@ uregex_hasAnchoringBounds(const URegularExpression *regexp,
* Anchoring Bounds are the default for regions.
*
* @param regexp The compiled regular expression.
- * @param b TRUE if to enable anchoring bounds; FALSE to disable them.
+ * @param b true if to enable anchoring bounds; false to disable them.
* @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_useAnchoringBounds(URegularExpression *regexp,
UBool b,
UErrorCode *status);
/**
- * Return TRUE if the most recent matching operation touched the
+ * Return true if the most recent matching operation touched the
* end of the text being processed. In this case, additional input text could
* change the results of that match.
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
- * @return TRUE if the most recent match hit the end of input
+ * @return true if the most recent match hit the end of input
* @stable ICU 4.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_hitEnd(const URegularExpression *regexp,
UErrorCode *status);
/**
- * Return TRUE the most recent match succeeded and additional input could cause
+ * Return true the most recent match succeeded and additional input could cause
* it to fail. If this function returns false and a match was found, then more input
* might change the match but the match won't be lost. If a match was not found,
* then requireEnd has no meaning.
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
- * @return TRUE if more input could cause the most recent match to no longer match.
+ * @return true if more input could cause the most recent match to no longer match.
* @stable ICU 4.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregex_requireEnd(const URegularExpression *regexp,
UErrorCode *status);
@@ -1079,7 +1082,7 @@ uregex_requireEnd(const URegularExpression *regexp,
* is still the full length of the untruncated string.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_replaceAll(URegularExpression *regexp,
const UChar *replacementText,
int32_t replacementLength,
@@ -1108,7 +1111,7 @@ uregex_replaceAll(URegularExpression *regexp,
*
* @stable ICU 4.6
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
uregex_replaceAllUText(URegularExpression *regexp,
UText *replacement,
UText *dest,
@@ -1138,7 +1141,7 @@ uregex_replaceAllUText(URegularExpression *regexp,
* is still the full length of the untruncated string.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_replaceFirst(URegularExpression *regexp,
const UChar *replacementText,
int32_t replacementLength,
@@ -1167,7 +1170,7 @@ uregex_replaceFirst(URegularExpression *regexp,
*
* @stable ICU 4.6
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
uregex_replaceFirstUText(URegularExpression *regexp,
UText *replacement,
UText *dest,
@@ -1219,7 +1222,7 @@ uregex_replaceFirstUText(URegularExpression *regexp,
* @stable ICU 3.0
*
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_appendReplacement(URegularExpression *regexp,
const UChar *replacementText,
int32_t replacementLength,
@@ -1249,7 +1252,7 @@ uregex_appendReplacement(URegularExpression *regexp,
*
* @stable ICU 4.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_appendReplacementUText(URegularExpression *regexp,
UText *replacementText,
UText *dest,
@@ -1279,7 +1282,7 @@ uregex_appendReplacementUText(URegularExpression *regexp,
*
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_appendTail(URegularExpression *regexp,
UChar **destBuf,
int32_t *destCapacity,
@@ -1303,7 +1306,7 @@ uregex_appendTail(URegularExpression *regexp,
*
* @stable ICU 4.6
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
uregex_appendTailUText(URegularExpression *regexp,
UText *dest,
UErrorCode *status);
@@ -1359,7 +1362,7 @@ uregex_appendTailUText(URegularExpression *regexp,
* @return The number of fields into which the input string was split.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_split( URegularExpression *regexp,
UChar *destBuf,
int32_t destCapacity,
@@ -1394,7 +1397,7 @@ uregex_split( URegularExpression *regexp,
*
* @stable ICU 4.6
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_splitUText(URegularExpression *regexp,
UText *destFields[],
int32_t destFieldsCapacity,
@@ -1422,7 +1425,7 @@ uregex_splitUText(URegularExpression *regexp,
* @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 4.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_setTimeLimit(URegularExpression *regexp,
int32_t limit,
UErrorCode *status);
@@ -1436,7 +1439,7 @@ uregex_setTimeLimit(URegularExpression *regexp,
* @return the maximum allowed time for a match, in units of processing steps.
* @stable ICU 4.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_getTimeLimit(const URegularExpression *regexp,
UErrorCode *status);
@@ -1460,7 +1463,7 @@ uregex_getTimeLimit(const URegularExpression *regexp,
*
* @stable ICU 4.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_setStackLimit(URegularExpression *regexp,
int32_t limit,
UErrorCode *status);
@@ -1472,7 +1475,7 @@ uregex_setStackLimit(URegularExpression *regexp,
* stack size is unlimited.
* @stable ICU 4.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregex_getStackLimit(const URegularExpression *regexp,
UErrorCode *status);
@@ -1480,7 +1483,7 @@ uregex_getStackLimit(const URegularExpression *regexp,
/**
* Function pointer for a regular expression matching callback function.
* When set, a callback function will be called periodically during matching
- * operations. If the call back function returns FALSE, the matching
+ * operations. If the call back function returns false, the matching
* operation will be terminated early.
*
* Note: the callback function must not call other functions on this
@@ -1491,8 +1494,8 @@ uregex_getStackLimit(const URegularExpression *regexp,
* uregex_setMatchCallback() is called.
* @param steps the accumulated processing time, in match steps,
* for this matching operation.
- * @return TRUE to continue the matching operation.
- * FALSE to terminate the matching operation.
+ * @return true to continue the matching operation.
+ * false to terminate the matching operation.
* @stable ICU 4.0
*/
U_CDECL_BEGIN
@@ -1515,7 +1518,7 @@ U_CDECL_END
* @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 4.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_setMatchCallback(URegularExpression *regexp,
URegexMatchCallback *callback,
const void *context,
@@ -1533,7 +1536,7 @@ uregex_setMatchCallback(URegularExpression *regexp,
* @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 4.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_getMatchCallback(const URegularExpression *regexp,
URegexMatchCallback **callback,
const void **context,
@@ -1554,7 +1557,7 @@ uregex_getMatchCallback(const URegularExpression *regexp,
* to be attempted, giving the application the opportunity to terminate a long-running
* find operation.
*
- * If the call back function returns FALSE, the find operation will be terminated early.
+ * If the call back function returns false, the find operation will be terminated early.
*
* Note: the callback function must not call other functions on this
* URegularExpression
@@ -1565,8 +1568,8 @@ uregex_getMatchCallback(const URegularExpression *regexp,
* @param matchIndex the next index at which a match attempt will be attempted for this
* find operation. If this callback interrupts the search, this is the
* index at which a find/findNext operation may be re-initiated.
- * @return TRUE to continue the matching operation.
- * FALSE to terminate the matching operation.
+ * @return true to continue the matching operation.
+ * false to terminate the matching operation.
* @stable ICU 4.6
*/
U_CDECL_BEGIN
@@ -1587,7 +1590,7 @@ U_CDECL_END
* @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 4.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_setFindProgressCallback(URegularExpression *regexp,
URegexFindProgressCallback *callback,
const void *context,
@@ -1604,7 +1607,7 @@ uregex_setFindProgressCallback(URegularExpression *regexp,
* @param status A reference to a UErrorCode to receive any errors.
* @stable ICU 4.6
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uregex_getFindProgressCallback(const URegularExpression *regexp,
URegexFindProgressCallback **callback,
const void **context,
diff --git a/contrib/libs/icu/include/unicode/uregion.h b/contrib/libs/icu/include/unicode/uregion.h
index a5de49674b..25472ae640 100644
--- a/contrib/libs/icu/include/unicode/uregion.h
+++ b/contrib/libs/icu/include/unicode/uregion.h
@@ -133,7 +133,7 @@ typedef struct URegion URegion; /**< @stable ICU 52 */
* (U_ILLEGAL_ARGUMENT_ERROR).
* @stable ICU 52
*/
-U_STABLE const URegion* U_EXPORT2
+U_CAPI const URegion* U_EXPORT2
uregion_getRegionFromCode(const char *regionCode, UErrorCode *status);
/**
@@ -141,7 +141,7 @@ uregion_getRegionFromCode(const char *regionCode, UErrorCode *status);
* code is not recognized, the appropriate error code will be set (U_ILLEGAL_ARGUMENT_ERROR).
* @stable ICU 52
*/
-U_STABLE const URegion* U_EXPORT2
+U_CAPI const URegion* U_EXPORT2
uregion_getRegionFromNumericCode (int32_t code, UErrorCode *status);
/**
@@ -149,14 +149,14 @@ uregion_getRegionFromNumericCode (int32_t code, UErrorCode *status);
* The enumeration must be closed with with uenum_close().
* @stable ICU 52
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uregion_getAvailable(URegionType type, UErrorCode *status);
/**
* Returns true if the specified uregion is equal to the specified otherRegion.
* @stable ICU 52
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregion_areEqual(const URegion* uregion, const URegion* otherRegion);
/**
@@ -165,7 +165,7 @@ uregion_areEqual(const URegion* uregion, const URegion* otherRegion);
* this method with region "IT" (Italy) returns the URegion for "039" (Southern Europe).
* @stable ICU 52
*/
-U_STABLE const URegion* U_EXPORT2
+U_CAPI const URegion* U_EXPORT2
uregion_getContainingRegion(const URegion* uregion);
/**
@@ -177,7 +177,7 @@ uregion_getContainingRegion(const URegion* uregion);
* URegion "150" (Europe).
* @stable ICU 52
*/
-U_STABLE const URegion* U_EXPORT2
+U_CAPI const URegion* U_EXPORT2
uregion_getContainingRegionOfType(const URegion* uregion, URegionType type);
/**
@@ -190,7 +190,7 @@ uregion_getContainingRegionOfType(const URegion* uregion, URegionType type);
* and "155" (Western Europe). The enumeration must be closed with with uenum_close().
* @stable ICU 52
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uregion_getContainedRegions(const URegion* uregion, UErrorCode *status);
/**
@@ -202,7 +202,7 @@ uregion_getContainedRegions(const URegion* uregion, UErrorCode *status);
* etc. The enumeration must be closed with with uenum_close().
* @stable ICU 52
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uregion_getContainedRegionsOfType(const URegion* uregion, URegionType type, UErrorCode *status);
/**
@@ -210,7 +210,7 @@ uregion_getContainedRegionsOfType(const URegion* uregion, URegionType type, UErr
* hierarchy.
* @stable ICU 52
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
uregion_contains(const URegion* uregion, const URegion* otherRegion);
/**
@@ -221,14 +221,14 @@ uregion_contains(const URegion* uregion, const URegion* otherRegion);
* "AZ" (Azerbaijan), etc... The enumeration must be closed with with uenum_close().
* @stable ICU 52
*/
-U_STABLE UEnumeration* U_EXPORT2
+U_CAPI UEnumeration* U_EXPORT2
uregion_getPreferredValues(const URegion* uregion, UErrorCode *status);
/**
* Returns the specified uregion's canonical code.
* @stable ICU 52
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
uregion_getRegionCode(const URegion* uregion);
/**
@@ -236,14 +236,14 @@ uregion_getRegionCode(const URegion* uregion);
* for the specified uregion.
* @stable ICU 52
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uregion_getNumericCode(const URegion* uregion);
/**
* Returns the URegionType of the specified uregion.
* @stable ICU 52
*/
-U_STABLE URegionType U_EXPORT2
+U_CAPI URegionType U_EXPORT2
uregion_getType(const URegion* uregion);
diff --git a/contrib/libs/icu/include/unicode/ureldatefmt.h b/contrib/libs/icu/include/unicode/ureldatefmt.h
index e2e1974f2d..3c44890043 100644
--- a/contrib/libs/icu/include/unicode/ureldatefmt.h
+++ b/contrib/libs/icu/include/unicode/ureldatefmt.h
@@ -16,9 +16,12 @@
#include "unicode/unum.h"
#include "unicode/udisplaycontext.h"
-#include "unicode/localpointer.h"
#include "unicode/uformattedvalue.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: URelativeDateTimeFormatter, relative date formatting of unit + numeric offset.
@@ -234,7 +237,7 @@ typedef struct URelativeDateTimeFormatter URelativeDateTimeFormatter; /**< C ty
* or NULL if an error occurred.
* @stable ICU 57
*/
-U_STABLE URelativeDateTimeFormatter* U_EXPORT2
+U_CAPI URelativeDateTimeFormatter* U_EXPORT2
ureldatefmt_open( const char* locale,
UNumberFormat* nfToAdopt,
UDateRelativeDateTimeFormatterStyle width,
@@ -247,7 +250,7 @@ ureldatefmt_open( const char* locale,
* The URelativeDateTimeFormatter object to close.
* @stable ICU 57
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ureldatefmt_close(URelativeDateTimeFormatter *reldatefmt);
struct UFormattedRelativeDateTime;
@@ -266,7 +269,7 @@ typedef struct UFormattedRelativeDateTime UFormattedRelativeDateTime;
* @return A pointer needing ownership.
* @stable ICU 64
*/
-U_STABLE UFormattedRelativeDateTime* U_EXPORT2
+U_CAPI UFormattedRelativeDateTime* U_EXPORT2
ureldatefmt_openResult(UErrorCode* ec);
/**
@@ -283,7 +286,7 @@ ureldatefmt_openResult(UErrorCode* ec);
* @return A UFormattedValue owned by the input object.
* @stable ICU 64
*/
-U_STABLE const UFormattedValue* U_EXPORT2
+U_CAPI const UFormattedValue* U_EXPORT2
ureldatefmt_resultAsValue(const UFormattedRelativeDateTime* ufrdt, UErrorCode* ec);
/**
@@ -292,7 +295,7 @@ ureldatefmt_resultAsValue(const UFormattedRelativeDateTime* ufrdt, UErrorCode* e
* @param ufrdt The object to release.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ureldatefmt_closeResult(UFormattedRelativeDateTime* ufrdt);
@@ -354,7 +357,7 @@ U_NAMESPACE_END
* than resultCapacity, in which case an error is returned.
* @stable ICU 57
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ureldatefmt_formatNumeric( const URelativeDateTimeFormatter* reldatefmt,
double offset,
URelativeDateTimeUnit unit,
@@ -385,7 +388,7 @@ ureldatefmt_formatNumeric( const URelativeDateTimeFormatter* reldatefmt,
* undefined.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ureldatefmt_formatNumericToResult(
const URelativeDateTimeFormatter* reldatefmt,
double offset,
@@ -421,7 +424,7 @@ ureldatefmt_formatNumericToResult(
* than resultCapacity, in which case an error is returned.
* @stable ICU 57
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ureldatefmt_format( const URelativeDateTimeFormatter* reldatefmt,
double offset,
URelativeDateTimeUnit unit,
@@ -455,7 +458,7 @@ ureldatefmt_format( const URelativeDateTimeFormatter* reldatefmt,
* undefined.
* @stable ICU 64
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
ureldatefmt_formatToResult(
const URelativeDateTimeFormatter* reldatefmt,
double offset,
@@ -492,7 +495,7 @@ ureldatefmt_formatToResult(
* in which case an error is returned.
* @stable ICU 57
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
ureldatefmt_combineDateAndTime( const URelativeDateTimeFormatter* reldatefmt,
const UChar * relativeDateString,
int32_t relativeDateStringLen,
diff --git a/contrib/libs/icu/include/unicode/urename.h b/contrib/libs/icu/include/unicode/urename.h
index 30f4b7af39..4605f632ea 100644
--- a/contrib/libs/icu/include/unicode/urename.h
+++ b/contrib/libs/icu/include/unicode/urename.h
@@ -58,6 +58,11 @@
/* C exports renaming data */
+#define CreateLSTMBreakEngine U_ICU_ENTRY_POINT_RENAME(CreateLSTMBreakEngine)
+#define CreateLSTMData U_ICU_ENTRY_POINT_RENAME(CreateLSTMData)
+#define CreateLSTMDataForScript U_ICU_ENTRY_POINT_RENAME(CreateLSTMDataForScript)
+#define DeleteLSTMData U_ICU_ENTRY_POINT_RENAME(DeleteLSTMData)
+#define LSTMDataName U_ICU_ENTRY_POINT_RENAME(LSTMDataName)
#define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToString)
#define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_integerToString)
#define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_stringToInteger)
@@ -130,7 +135,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)
@@ -382,6 +386,7 @@
#define u_strcmpFold U_ICU_ENTRY_POINT_RENAME(u_strcmpFold)
#define u_strcpy U_ICU_ENTRY_POINT_RENAME(u_strcpy)
#define u_strcspn U_ICU_ENTRY_POINT_RENAME(u_strcspn)
+#define u_stringHasBinaryProperty U_ICU_ENTRY_POINT_RENAME(u_stringHasBinaryProperty)
#define u_strlen U_ICU_ENTRY_POINT_RENAME(u_strlen)
#define u_strncasecmp U_ICU_ENTRY_POINT_RENAME(u_strncasecmp)
#define u_strncat U_ICU_ENTRY_POINT_RENAME(u_strncat)
@@ -483,6 +488,7 @@
#define ubiditransform_open U_ICU_ENTRY_POINT_RENAME(ubiditransform_open)
#define ubiditransform_transform U_ICU_ENTRY_POINT_RENAME(ubiditransform_transform)
#define ublock_getCode U_ICU_ENTRY_POINT_RENAME(ublock_getCode)
+#define ubrk_clone U_ICU_ENTRY_POINT_RENAME(ubrk_clone)
#define ubrk_close U_ICU_ENTRY_POINT_RENAME(ubrk_close)
#define ubrk_countAvailable U_ICU_ENTRY_POINT_RENAME(ubrk_countAvailable)
#define ubrk_current U_ICU_ENTRY_POINT_RENAME(ubrk_current)
@@ -535,6 +541,7 @@
#define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneDisplayName)
#define ucal_getTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneID)
#define ucal_getTimeZoneIDForWindowsID U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneIDForWindowsID)
+#define ucal_getTimeZoneOffsetFromLocal U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneOffsetFromLocal)
#define ucal_getTimeZoneTransitionDate U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneTransitionDate)
#define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType)
#define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendTransition)
@@ -918,9 +925,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)
@@ -961,6 +970,7 @@
#define uhash_compareScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_compareScriptSet)
#define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars)
#define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUnicodeString)
+#define uhash_containsKey U_ICU_ENTRY_POINT_RENAME(uhash_containsKey)
#define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count)
#define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtable)
#define uhash_deleteScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_deleteScriptSet)
@@ -969,6 +979,7 @@
#define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find)
#define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get)
#define uhash_geti U_ICU_ENTRY_POINT_RENAME(uhash_geti)
+#define uhash_getiAndFound U_ICU_ENTRY_POINT_RENAME(uhash_getiAndFound)
#define uhash_hashCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashCaselessUnicodeString)
#define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars)
#define uhash_hashIChars U_ICU_ENTRY_POINT_RENAME(uhash_hashIChars)
@@ -976,12 +987,15 @@
#define uhash_hashScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_hashScriptSet)
#define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars)
#define uhash_hashUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashUnicodeString)
+#define uhash_icontainsKey U_ICU_ENTRY_POINT_RENAME(uhash_icontainsKey)
#define uhash_iget U_ICU_ENTRY_POINT_RENAME(uhash_iget)
#define uhash_igeti U_ICU_ENTRY_POINT_RENAME(uhash_igeti)
+#define uhash_igetiAndFound U_ICU_ENTRY_POINT_RENAME(uhash_igetiAndFound)
#define uhash_init U_ICU_ENTRY_POINT_RENAME(uhash_init)
#define uhash_initSize U_ICU_ENTRY_POINT_RENAME(uhash_initSize)
#define uhash_iput U_ICU_ENTRY_POINT_RENAME(uhash_iput)
#define uhash_iputi U_ICU_ENTRY_POINT_RENAME(uhash_iputi)
+#define uhash_iputiAllowZero U_ICU_ENTRY_POINT_RENAME(uhash_iputiAllowZero)
#define uhash_iremove U_ICU_ENTRY_POINT_RENAME(uhash_iremove)
#define uhash_iremovei U_ICU_ENTRY_POINT_RENAME(uhash_iremovei)
#define uhash_nextElement U_ICU_ENTRY_POINT_RENAME(uhash_nextElement)
@@ -989,6 +1003,7 @@
#define uhash_openSize U_ICU_ENTRY_POINT_RENAME(uhash_openSize)
#define uhash_put U_ICU_ENTRY_POINT_RENAME(uhash_put)
#define uhash_puti U_ICU_ENTRY_POINT_RENAME(uhash_puti)
+#define uhash_putiAllowZero U_ICU_ENTRY_POINT_RENAME(uhash_putiAllowZero)
#define uhash_remove U_ICU_ENTRY_POINT_RENAME(uhash_remove)
#define uhash_removeAll U_ICU_ENTRY_POINT_RENAME(uhash_removeAll)
#define uhash_removeElement U_ICU_ENTRY_POINT_RENAME(uhash_removeElement)
@@ -1079,7 +1094,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,16 +1137,21 @@
#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)
#define ulocimp_toLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocimp_toLanguageTag)
#define ulocimp_toLegacyKey U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyKey)
#define ulocimp_toLegacyType U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyType)
+#define ultag_getTKeyStart U_ICU_ENTRY_POINT_RENAME(ultag_getTKeyStart)
#define ultag_isExtensionSubtags U_ICU_ENTRY_POINT_RENAME(ultag_isExtensionSubtags)
#define ultag_isLanguageSubtag U_ICU_ENTRY_POINT_RENAME(ultag_isLanguageSubtag)
#define ultag_isPrivateuseValueSubtags U_ICU_ENTRY_POINT_RENAME(ultag_isPrivateuseValueSubtags)
@@ -1145,6 +1164,8 @@
#define ultag_isUnicodeLocaleKey U_ICU_ENTRY_POINT_RENAME(ultag_isUnicodeLocaleKey)
#define ultag_isUnicodeLocaleType U_ICU_ENTRY_POINT_RENAME(ultag_isUnicodeLocaleType)
#define ultag_isVariantSubtags U_ICU_ENTRY_POINT_RENAME(ultag_isVariantSubtags)
+#define umeas_getPrefixBase U_ICU_ENTRY_POINT_RENAME(umeas_getPrefixBase)
+#define umeas_getPrefixPower U_ICU_ENTRY_POINT_RENAME(umeas_getPrefixPower)
#define umsg_applyPattern U_ICU_ENTRY_POINT_RENAME(umsg_applyPattern)
#define umsg_autoQuoteApostrophe U_ICU_ENTRY_POINT_RENAME(umsg_autoQuoteApostrophe)
#define umsg_clone U_ICU_ENTRY_POINT_RENAME(umsg_clone)
@@ -1245,7 +1266,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 +1291,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)
@@ -1548,6 +1581,7 @@
#define ures_countArrayItems U_ICU_ENTRY_POINT_RENAME(ures_countArrayItems)
#define ures_findResource U_ICU_ENTRY_POINT_RENAME(ures_findResource)
#define ures_findSubResource U_ICU_ENTRY_POINT_RENAME(ures_findSubResource)
+#define ures_getAllChildrenWithFallback U_ICU_ENTRY_POINT_RENAME(ures_getAllChildrenWithFallback)
#define ures_getAllItemsWithFallback U_ICU_ENTRY_POINT_RENAME(ures_getAllItemsWithFallback)
#define ures_getBinary U_ICU_ENTRY_POINT_RENAME(ures_getBinary)
#define ures_getByIndex U_ICU_ENTRY_POINT_RENAME(ures_getByIndex)
@@ -1655,6 +1689,9 @@
#define uset_compact U_ICU_ENTRY_POINT_RENAME(uset_compact)
#define uset_complement U_ICU_ENTRY_POINT_RENAME(uset_complement)
#define uset_complementAll U_ICU_ENTRY_POINT_RENAME(uset_complementAll)
+#define uset_complementAllCodePoints U_ICU_ENTRY_POINT_RENAME(uset_complementAllCodePoints)
+#define uset_complementRange U_ICU_ENTRY_POINT_RENAME(uset_complementRange)
+#define uset_complementString U_ICU_ENTRY_POINT_RENAME(uset_complementString)
#define uset_contains U_ICU_ENTRY_POINT_RENAME(uset_contains)
#define uset_containsAll U_ICU_ENTRY_POINT_RENAME(uset_containsAll)
#define uset_containsAllCodePoints U_ICU_ENTRY_POINT_RENAME(uset_containsAllCodePoints)
@@ -1666,9 +1703,11 @@
#define uset_freeze U_ICU_ENTRY_POINT_RENAME(uset_freeze)
#define uset_getItem U_ICU_ENTRY_POINT_RENAME(uset_getItem)
#define uset_getItemCount U_ICU_ENTRY_POINT_RENAME(uset_getItemCount)
+#define uset_getRangeCount U_ICU_ENTRY_POINT_RENAME(uset_getRangeCount)
#define uset_getSerializedRange U_ICU_ENTRY_POINT_RENAME(uset_getSerializedRange)
#define uset_getSerializedRangeCount U_ICU_ENTRY_POINT_RENAME(uset_getSerializedRangeCount)
#define uset_getSerializedSet U_ICU_ENTRY_POINT_RENAME(uset_getSerializedSet)
+#define uset_hasStrings U_ICU_ENTRY_POINT_RENAME(uset_hasStrings)
#define uset_indexOf U_ICU_ENTRY_POINT_RENAME(uset_indexOf)
#define uset_isEmpty U_ICU_ENTRY_POINT_RENAME(uset_isEmpty)
#define uset_isFrozen U_ICU_ENTRY_POINT_RENAME(uset_isFrozen)
@@ -1678,12 +1717,15 @@
#define uset_openPatternOptions U_ICU_ENTRY_POINT_RENAME(uset_openPatternOptions)
#define uset_remove U_ICU_ENTRY_POINT_RENAME(uset_remove)
#define uset_removeAll U_ICU_ENTRY_POINT_RENAME(uset_removeAll)
+#define uset_removeAllCodePoints U_ICU_ENTRY_POINT_RENAME(uset_removeAllCodePoints)
#define uset_removeAllStrings U_ICU_ENTRY_POINT_RENAME(uset_removeAllStrings)
#define uset_removeRange U_ICU_ENTRY_POINT_RENAME(uset_removeRange)
#define uset_removeString U_ICU_ENTRY_POINT_RENAME(uset_removeString)
#define uset_resemblesPattern U_ICU_ENTRY_POINT_RENAME(uset_resemblesPattern)
#define uset_retain U_ICU_ENTRY_POINT_RENAME(uset_retain)
#define uset_retainAll U_ICU_ENTRY_POINT_RENAME(uset_retainAll)
+#define uset_retainAllCodePoints U_ICU_ENTRY_POINT_RENAME(uset_retainAllCodePoints)
+#define uset_retainString U_ICU_ENTRY_POINT_RENAME(uset_retainString)
#define uset_serialize U_ICU_ENTRY_POINT_RENAME(uset_serialize)
#define uset_serializedContains U_ICU_ENTRY_POINT_RENAME(uset_serializedContains)
#define uset_set U_ICU_ENTRY_POINT_RENAME(uset_set)
diff --git a/contrib/libs/icu/include/unicode/ures.h b/contrib/libs/icu/include/unicode/ures.h
index 839779fada..a6c43f9537 100644
--- a/contrib/libs/icu/include/unicode/ures.h
+++ b/contrib/libs/icu/include/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
@@ -41,9 +44,9 @@
* locale and then ask it for individual resources.
* <P>
* Resource bundles in ICU4C are currently defined using text files which conform to the following
- * <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt">BNF definition</a>.
+ * <a href="https://github.com/unicode-org/icu-docs/blob/main/design/bnf_rb.txt">BNF definition</a>.
* More on resource bundle concepts and syntax can be found in the
- * <a href="http://icu-project.org/userguide/ResourceManagement.html">Users Guide</a>.
+ * <a href="https://unicode-org.github.io/icu/userguide/locale/resources">Users Guide</a>.
* <P>
*/
@@ -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/contrib/libs/icu/include/unicode/uscript.h b/contrib/libs/icu/include/unicode/uscript.h
index 53d57abed1..6cb1532808 100644
--- a/contrib/libs/icu/include/unicode/uscript.h
+++ b/contrib/libs/icu/include/unicode/uscript.h
@@ -484,6 +484,17 @@ typedef enum UScriptCode {
/** @stable ICU 66 */
USCRIPT_YEZIDI = 192,/* Yezi */
+ /** @stable ICU 70 */
+ USCRIPT_CYPRO_MINOAN = 193,/* Cpmn */
+ /** @stable ICU 70 */
+ USCRIPT_OLD_UYGHUR = 194,/* Ougr */
+ /** @stable ICU 70 */
+ USCRIPT_TANGSA = 195,/* Tnsa */
+ /** @stable ICU 70 */
+ USCRIPT_TOTO = 196,/* Toto */
+ /** @stable ICU 70 */
+ USCRIPT_VITHKUQI = 197,/* Vith */
+
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UScriptCode value.
@@ -491,7 +502,7 @@ typedef enum UScriptCode {
*
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- USCRIPT_CODE_LIMIT = 193
+ USCRIPT_CODE_LIMIT = 198
#endif // U_HIDE_DEPRECATED_API
} UScriptCode;
@@ -514,7 +525,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 +538,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 +550,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 +561,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 +573,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 +608,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 +647,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 +679,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/contrib/libs/icu/include/unicode/usearch.h b/contrib/libs/icu/include/unicode/usearch.h
index 080528e347..fd0b84f672 100644
--- a/contrib/libs/icu/include/unicode/usearch.h
+++ b/contrib/libs/icu/include/unicode/usearch.h
@@ -15,25 +15,29 @@
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
-#include "unicode/localpointer.h"
#include "unicode/ucol.h"
#include "unicode/ucoleitr.h"
#include "unicode/ubrk.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C API: StringSearch
*
* C APIs for an engine that provides language-sensitive text searching based
- * on the comparison rules defined in a <tt>UCollator</tt> data struct,
- * see <tt>ucol.h</tt>. This ensures that language eccentricity can be
+ * on the comparison rules defined in a <code>UCollator</code> data struct,
+ * see <code>ucol.h</code>. This ensures that language eccentricity can be
* handled, e.g. for the German collator, characters &szlig; and SS will be matched
* if case is chosen to be ignored.
- * See the <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm">
+ * See the <a href="https://htmlpreview.github.io/?https://github.com/unicode-org/icu-docs/blob/main/design/collation/ICU_collation_design.htm">
* "ICU Collation Design Document"</a> for more information.
* <p>
- * The implementation may use a linear search or a modified form of the Boyer-Moore
- * search; for more information on the latter see
+ * As of ICU4C 4.0 / ICU4J 53, the implementation uses a linear search. In previous versions,
+ * a modified form of the Boyer-Moore searching algorithm was used. For more information
+ * on the modified Boyer-Moore algorithm see
* <a href="http://icu-project.org/docs/papers/efficient_text_searching_in_java.html">
* "Efficient Text Searching in Java"</a>, published in <i>Java Report</i>
* in February, 1999.
@@ -54,18 +58,18 @@
* Option 2. will be the default.
* <p>
* This search has APIs similar to that of other text iteration mechanisms
- * such as the break iterators in <tt>ubrk.h</tt>. Using these
+ * such as the break iterators in <code>ubrk.h</code>. Using these
* APIs, it is easy to scan through text looking for all occurrences of
* a given pattern. This search iterator allows changing of direction by
- * calling a <tt>reset</tt> followed by a <tt>next</tt> or <tt>previous</tt>.
- * Though a direction change can occur without calling <tt>reset</tt> first,
+ * calling a <code>reset</code> followed by a <code>next</code> or <code>previous</code>.
+ * Though a direction change can occur without calling <code>reset</code> first,
* this operation comes with some speed penalty.
* Generally, match results in the forward direction will match the result
* matches in the backwards direction in the reverse order
* <p>
- * <tt>usearch.h</tt> provides APIs to specify the starting position
- * within the text string to be searched, e.g. <tt>usearch_setOffset</tt>,
- * <tt>usearch_preceding</tt> and <tt>usearch_following</tt>. Since the
+ * <code>usearch.h</code> provides APIs to specify the starting position
+ * within the text string to be searched, e.g. <code>usearch_setOffset</code>,
+ * <code>usearch_preceding</code> and <code>usearch_following</code>. Since the
* starting position will be set as it is specified, please take note that
* there are some dangerous positions which the search may render incorrect
* results:
@@ -101,7 +105,7 @@
* Though collator attributes will be taken into consideration while
* performing matches, there are no APIs here for setting and getting the
* attributes. These attributes can be set by getting the collator
- * from <tt>usearch_getCollator</tt> and using the APIs in <tt>ucol.h</tt>.
+ * from <code>usearch_getCollator</code> and using the APIs in <code>ucol.h</code>.
* Lastly to update String Search to the new collator attributes,
* usearch_reset() has to be called.
* <p>
@@ -277,9 +281,13 @@ typedef enum {
/* open and close ------------------------------------------------------ */
/**
-* Creating a search iterator data struct using the argument locale language
+* Creates a String Search iterator data struct using the argument locale language
* rule set. A collator will be created in the process, which will be owned by
-* this search and will be deleted in <tt>usearch_close</tt>.
+* this String Search and will be deleted in <code>usearch_close</code>.
+*
+* The UStringSearch retains a pointer to both the pattern and text strings.
+* The caller must not modify or delete them while using the UStringSearch.
+*
* @param pattern for matching
* @param patternlength length of the pattern, -1 for null-termination
* @param text text string
@@ -288,9 +296,9 @@ typedef enum {
* @param breakiter A BreakIterator that will be used to restrict the points
* at which matches are detected. If a match is found, but
* the match's start or end index is not a boundary as
-* determined by the <tt>BreakIterator</tt>, the match will
+* determined by the <code>BreakIterator</code>, the match will
* be rejected and another will be searched for.
-* If this parameter is <tt>NULL</tt>, no break detection is
+* If this parameter is <code>NULL</code>, no break detection is
* attempted.
* @param status for errors if it occurs. If pattern or text is NULL, or if
* patternlength or textlength is 0 then an
@@ -298,54 +306,59 @@ typedef enum {
* @return search iterator data structure, or NULL if there is an error.
* @stable ICU 2.4
*/
-U_STABLE UStringSearch * U_EXPORT2 usearch_open(const UChar *pattern,
- int32_t patternlength,
- const UChar *text,
+U_CAPI UStringSearch * U_EXPORT2 usearch_open(const UChar *pattern,
+ int32_t patternlength,
+ const UChar *text,
int32_t textlength,
const char *locale,
UBreakIterator *breakiter,
UErrorCode *status);
/**
-* Creating a search iterator data struct using the argument collator language
-* rule set. Note, user retains the ownership of this collator, thus the
+* Creates a String Search iterator data struct using the argument collator language
+* rule set. Note, user retains the ownership of this collator, thus the
* responsibility of deletion lies with the user.
-* NOTE: string search cannot be instantiated from a collator that has
-* collate digits as numbers (CODAN) turned on.
+
+* NOTE: String Search cannot be instantiated from a collator that has
+* collate digits as numbers (CODAN) turned on (UCOL_NUMERIC_COLLATION).
+*
+* The UStringSearch retains a pointer to both the pattern and text strings.
+* The caller must not modify or delete them while using the UStringSearch.
+*
* @param pattern for matching
* @param patternlength length of the pattern, -1 for null-termination
* @param text text string
* @param textlength length of the text string, -1 for null-termination
* @param collator used for the language rules
* @param breakiter A BreakIterator that will be used to restrict the points
-* at which matches are detected. If a match is found, but
-* the match's start or end index is not a boundary as
-* determined by the <tt>BreakIterator</tt>, the match will
-* be rejected and another will be searched for.
-* If this parameter is <tt>NULL</tt>, no break detection is
+* at which matches are detected. If a match is found, but
+* the match's start or end index is not a boundary as
+* determined by the <code>BreakIterator</code>, the match will
+* be rejected and another will be searched for.
+* If this parameter is <code>NULL</code>, no break detection is
* attempted.
-* @param status for errors if it occurs. If collator, pattern or text is NULL,
-* or if patternlength or textlength is 0 then an
+* @param status for errors if it occurs. If collator, pattern or text is NULL,
+* or if patternlength or textlength is 0 then an
* U_ILLEGAL_ARGUMENT_ERROR is returned.
* @return search iterator data structure, or NULL if there is an error.
* @stable ICU 2.4
*/
-U_STABLE UStringSearch * U_EXPORT2 usearch_openFromCollator(
- const UChar *pattern,
+U_CAPI UStringSearch * U_EXPORT2 usearch_openFromCollator(
+ const UChar *pattern,
int32_t patternlength,
- const UChar *text,
+ const UChar *text,
int32_t textlength,
const UCollator *collator,
UBreakIterator *breakiter,
UErrorCode *status);
/**
-* Destroying and cleaning up the search iterator data struct.
-* If a collator is created in <tt>usearch_open</tt>, it will be destroyed here.
-* @param searchiter data struct to clean up
-* @stable ICU 2.4
-*/
-U_STABLE void U_EXPORT2 usearch_close(UStringSearch *searchiter);
+ * Destroys and cleans up the String Search iterator data struct.
+ * If a collator was created in <code>usearch_open</code>, then it will be destroyed here.
+ * @param searchiter The UStringSearch to clean up
+ * @stable ICU 2.4
+ */
+U_CAPI void U_EXPORT2 usearch_close(UStringSearch *searchiter);
#if U_SHOW_CPLUSPLUS_API
@@ -383,24 +396,24 @@ U_NAMESPACE_END
* @param status error status if any.
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2 usearch_setOffset(UStringSearch *strsrch,
- int32_t position,
+U_CAPI void U_EXPORT2 usearch_setOffset(UStringSearch *strsrch,
+ int32_t position,
UErrorCode *status);
/**
* Return the current index in the string text being searched.
* If the iteration has gone past the end of the text (or past the beginning
-* for a backwards search), <tt>USEARCH_DONE</tt> is returned.
+* for a backwards search), <code>USEARCH_DONE</code> is returned.
* @param strsrch search iterator data struct
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_getOffset(const UStringSearch *strsrch);
+U_CAPI int32_t U_EXPORT2 usearch_getOffset(const UStringSearch *strsrch);
/**
* Sets the text searching attributes located in the enum USearchAttribute
* with values from the enum USearchAttributeValue.
-* <tt>USEARCH_DEFAULT</tt> can be used for all attributes for resetting.
+* <code>USEARCH_DEFAULT</code> can be used for all attributes for resetting.
* @param strsrch search iterator data struct
* @param attribute text attribute to be set
* @param value text attribute value
@@ -408,7 +421,7 @@ U_STABLE int32_t U_EXPORT2 usearch_getOffset(const UStringSearch *strsrch);
* @see #usearch_getAttribute
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2 usearch_setAttribute(UStringSearch *strsrch,
+U_CAPI void U_EXPORT2 usearch_setAttribute(UStringSearch *strsrch,
USearchAttribute attribute,
USearchAttributeValue value,
UErrorCode *status);
@@ -421,19 +434,19 @@ U_STABLE void U_EXPORT2 usearch_setAttribute(UStringSearch *strsrch,
* @see #usearch_setAttribute
* @stable ICU 2.4
*/
-U_STABLE USearchAttributeValue U_EXPORT2 usearch_getAttribute(
+U_CAPI USearchAttributeValue U_EXPORT2 usearch_getAttribute(
const UStringSearch *strsrch,
USearchAttribute attribute);
/**
* Returns the index to the match in the text string that was searched.
* This call returns a valid result only after a successful call to
-* <tt>usearch_first</tt>, <tt>usearch_next</tt>, <tt>usearch_previous</tt>,
-* or <tt>usearch_last</tt>.
+* <code>usearch_first</code>, <code>usearch_next</code>, <code>usearch_previous</code>,
+* or <code>usearch_last</code>.
* Just after construction, or after a searching method returns
-* <tt>USEARCH_DONE</tt>, this method will return <tt>USEARCH_DONE</tt>.
+* <code>USEARCH_DONE</code>, this method will return <code>USEARCH_DONE</code>.
* <p>
-* Use <tt>usearch_getMatchedLength</tt> to get the matched string length.
+* Use <code>usearch_getMatchedLength</code> to get the matched string length.
* @param strsrch search iterator data struct
* @return index to a substring within the text string that is being
* searched.
@@ -444,16 +457,16 @@ U_STABLE USearchAttributeValue U_EXPORT2 usearch_getAttribute(
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_getMatchedStart(
+U_CAPI int32_t U_EXPORT2 usearch_getMatchedStart(
const UStringSearch *strsrch);
/**
* Returns the length of text in the string which matches the search pattern.
* This call returns a valid result only after a successful call to
-* <tt>usearch_first</tt>, <tt>usearch_next</tt>, <tt>usearch_previous</tt>,
-* or <tt>usearch_last</tt>.
+* <code>usearch_first</code>, <code>usearch_next</code>, <code>usearch_previous</code>,
+* or <code>usearch_last</code>.
* Just after construction, or after a searching method returns
-* <tt>USEARCH_DONE</tt>, this method will return 0.
+* <code>USEARCH_DONE</code>, this method will return 0.
* @param strsrch search iterator data struct
* @return The length of the match in the string text, or 0 if there is no
* match currently.
@@ -464,22 +477,22 @@ U_STABLE int32_t U_EXPORT2 usearch_getMatchedStart(
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_getMatchedLength(
+U_CAPI int32_t U_EXPORT2 usearch_getMatchedLength(
const UStringSearch *strsrch);
/**
* Returns the text that was matched by the most recent call to
-* <tt>usearch_first</tt>, <tt>usearch_next</tt>, <tt>usearch_previous</tt>,
-* or <tt>usearch_last</tt>.
+* <code>usearch_first</code>, <code>usearch_next</code>, <code>usearch_previous</code>,
+* or <code>usearch_last</code>.
* If the iterator is not pointing at a valid match (e.g. just after
-* construction or after <tt>USEARCH_DONE</tt> has been returned, returns
+* construction or after <code>USEARCH_DONE</code> has been returned, returns
* an empty string. If result is not large enough to store the matched text,
* result will be filled with the partial text and an U_BUFFER_OVERFLOW_ERROR
* will be returned in status. result will be null-terminated whenever
* possible. If the buffer fits the matched text exactly, a null-termination
* is not possible, then a U_STRING_NOT_TERMINATED_ERROR set in status.
* Pre-flighting can be either done with length = 0 or the API
-* <tt>usearch_getMatchedLength</tt>.
+* <code>usearch_getMatchedLength</code>.
* @param strsrch search iterator data struct
* @param result UChar buffer to store the matched string
* @param resultCapacity length of the result buffer
@@ -492,7 +505,7 @@ U_STABLE int32_t U_EXPORT2 usearch_getMatchedLength(
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_getMatchedText(const UStringSearch *strsrch,
+U_CAPI int32_t U_EXPORT2 usearch_getMatchedText(const UStringSearch *strsrch,
UChar *result,
int32_t resultCapacity,
UErrorCode *status);
@@ -506,38 +519,42 @@ U_STABLE int32_t U_EXPORT2 usearch_getMatchedText(const UStringSearch *strsrch,
* @param breakiter A BreakIterator that will be used to restrict the points
* at which matches are detected. If a match is found, but
* the match's start or end index is not a boundary as
-* determined by the <tt>BreakIterator</tt>, the match will
+* determined by the <code>BreakIterator</code>, the match will
* be rejected and another will be searched for.
-* If this parameter is <tt>NULL</tt>, no break detection is
+* If this parameter is <code>NULL</code>, no break detection is
* attempted.
* @param status for errors if it occurs
* @see #usearch_getBreakIterator
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2 usearch_setBreakIterator(UStringSearch *strsrch,
+U_CAPI void U_EXPORT2 usearch_setBreakIterator(UStringSearch *strsrch,
UBreakIterator *breakiter,
UErrorCode *status);
/**
* Returns the BreakIterator that is used to restrict the points at which
* matches are detected. This will be the same object that was passed to the
-* constructor or to <tt>usearch_setBreakIterator</tt>. Note that
-* <tt>NULL</tt>
+* constructor or to <code>usearch_setBreakIterator</code>. Note that
+* <code>NULL</code>
* is a legal value; it means that break detection should not be attempted.
* @param strsrch search iterator data struct
* @return break iterator used
* @see #usearch_setBreakIterator
* @stable ICU 2.4
*/
-U_STABLE const UBreakIterator * U_EXPORT2 usearch_getBreakIterator(
+U_CAPI const UBreakIterator * U_EXPORT2 usearch_getBreakIterator(
const UStringSearch *strsrch);
#endif
-
+
/**
* Set the string text to be searched. Text iteration will hence begin at the
* start of the text string. This method is useful if you want to re-use an
* iterator to search for the same pattern within a different body of text.
+*
+* The UStringSearch retains a pointer to the text string. The caller must not
+* modify or delete the string while using the UStringSearch.
+*
* @param strsrch search iterator data struct
* @param text new string to look for match
* @param textlength length of the new string, -1 for null-termination
@@ -547,7 +564,7 @@ U_STABLE const UBreakIterator * U_EXPORT2 usearch_getBreakIterator(
* @see #usearch_getText
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2 usearch_setText( UStringSearch *strsrch,
+U_CAPI void U_EXPORT2 usearch_setText( UStringSearch *strsrch,
const UChar *text,
int32_t textlength,
UErrorCode *status);
@@ -560,40 +577,44 @@ U_STABLE void U_EXPORT2 usearch_setText( UStringSearch *strsrch,
* @see #usearch_setText
* @stable ICU 2.4
*/
-U_STABLE const UChar * U_EXPORT2 usearch_getText(const UStringSearch *strsrch,
+U_CAPI const UChar * U_EXPORT2 usearch_getText(const UStringSearch *strsrch,
int32_t *length);
/**
* Gets the collator used for the language rules.
* <p>
-* Deleting the returned <tt>UCollator</tt> before calling
-* <tt>usearch_close</tt> would cause the string search to fail.
-* <tt>usearch_close</tt> will delete the collator if this search owns it.
+* Deleting the returned <code>UCollator</code> before calling
+* <code>usearch_close</code> would cause the string search to fail.
+* <code>usearch_close</code> will delete the collator if this search owns it.
* @param strsrch search iterator data struct
* @return collator
* @stable ICU 2.4
*/
-U_STABLE UCollator * U_EXPORT2 usearch_getCollator(
+U_CAPI UCollator * U_EXPORT2 usearch_getCollator(
const UStringSearch *strsrch);
/**
* Sets the collator used for the language rules. User retains the ownership
* of this collator, thus the responsibility of deletion lies with the user.
-* This method causes internal data such as Boyer-Moore shift tables to
-* be recalculated, but the iterator's position is unchanged.
+* This method causes internal data such as the pattern collation elements
+* and shift tables to be recalculated, but the iterator's position is unchanged.
* @param strsrch search iterator data struct
* @param collator to be used
* @param status for errors if it occurs
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2 usearch_setCollator( UStringSearch *strsrch,
+U_CAPI void U_EXPORT2 usearch_setCollator( UStringSearch *strsrch,
const UCollator *collator,
UErrorCode *status);
/**
* Sets the pattern used for matching.
-* Internal data like the Boyer Moore table will be recalculated, but the
+* Internal data like the pattern collation elements will be recalculated, but the
* iterator's position is unchanged.
+*
+* The UStringSearch retains a pointer to the pattern string. The caller must not
+* modify or delete the string while using the UStringSearch.
+*
* @param strsrch search iterator data struct
* @param pattern string
* @param patternlength pattern length, -1 for null-terminated string
@@ -602,7 +623,7 @@ U_STABLE void U_EXPORT2 usearch_setCollator( UStringSearch *strsrch,
* done to strsrch.
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2 usearch_setPattern( UStringSearch *strsrch,
+U_CAPI void U_EXPORT2 usearch_setPattern( UStringSearch *strsrch,
const UChar *pattern,
int32_t patternlength,
UErrorCode *status);
@@ -615,7 +636,7 @@ U_STABLE void U_EXPORT2 usearch_setPattern( UStringSearch *strsrch,
* @return pattern string
* @stable ICU 2.4
*/
-U_STABLE const UChar * U_EXPORT2 usearch_getPattern(
+U_CAPI const UChar * U_EXPORT2 usearch_getPattern(
const UStringSearch *strsrch,
int32_t *length);
@@ -625,28 +646,28 @@ U_STABLE const UChar * U_EXPORT2 usearch_getPattern(
* Returns the first index at which the string text matches the search
* pattern.
* The iterator is adjusted so that its current index (as returned by
-* <tt>usearch_getOffset</tt>) is the match position if one was found.
-* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and
-* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>.
+* <code>usearch_getOffset</code>) is the match position if one was found.
+* If a match is not found, <code>USEARCH_DONE</code> will be returned and
+* the iterator will be adjusted to the index <code>USEARCH_DONE</code>.
* @param strsrch search iterator data struct
* @param status for errors if it occurs
* @return The character index of the first match, or
-* <tt>USEARCH_DONE</tt> if there are no matches.
+* <code>USEARCH_DONE</code> if there are no matches.
* @see #usearch_getOffset
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_first(UStringSearch *strsrch,
+U_CAPI int32_t U_EXPORT2 usearch_first(UStringSearch *strsrch,
UErrorCode *status);
/**
-* Returns the first index equal or greater than <tt>position</tt> at which
+* Returns the first index equal or greater than <code>position</code> at which
* the string text
* matches the search pattern. The iterator is adjusted so that its current
-* index (as returned by <tt>usearch_getOffset</tt>) is the match position if
+* index (as returned by <code>usearch_getOffset</code>) is the match position if
* one was found.
-* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and
-* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>
+* If a match is not found, <code>USEARCH_DONE</code> will be returned and
+* the iterator will be adjusted to the index <code>USEARCH_DONE</code>
* <p>
* Search positions that may render incorrect results are highlighted in the
* header comments. If position is less than or greater than the text range
@@ -654,60 +675,60 @@ U_STABLE int32_t U_EXPORT2 usearch_first(UStringSearch *strsrch,
* @param strsrch search iterator data struct
* @param position to start the search at
* @param status for errors if it occurs
-* @return The character index of the first match following <tt>pos</tt>,
-* or <tt>USEARCH_DONE</tt> if there are no matches.
+* @return The character index of the first match following <code>pos</code>,
+* or <code>USEARCH_DONE</code> if there are no matches.
* @see #usearch_getOffset
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_following(UStringSearch *strsrch,
+U_CAPI int32_t U_EXPORT2 usearch_following(UStringSearch *strsrch,
int32_t position,
UErrorCode *status);
/**
* Returns the last index in the target text at which it matches the search
* pattern. The iterator is adjusted so that its current
-* index (as returned by <tt>usearch_getOffset</tt>) is the match position if
+* index (as returned by <code>usearch_getOffset</code>) is the match position if
* one was found.
-* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and
-* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>.
+* If a match is not found, <code>USEARCH_DONE</code> will be returned and
+* the iterator will be adjusted to the index <code>USEARCH_DONE</code>.
* @param strsrch search iterator data struct
* @param status for errors if it occurs
-* @return The index of the first match, or <tt>USEARCH_DONE</tt> if there
+* @return The index of the first match, or <code>USEARCH_DONE</code> if there
* are no matches.
* @see #usearch_getOffset
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_last(UStringSearch *strsrch,
+U_CAPI int32_t U_EXPORT2 usearch_last(UStringSearch *strsrch,
UErrorCode *status);
/**
-* Returns the first index less than <tt>position</tt> at which the string text
+* Returns the first index less than <code>position</code> at which the string text
* matches the search pattern. The iterator is adjusted so that its current
-* index (as returned by <tt>usearch_getOffset</tt>) is the match position if
+* index (as returned by <code>usearch_getOffset</code>) is the match position if
* one was found.
-* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and
-* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>
+* If a match is not found, <code>USEARCH_DONE</code> will be returned and
+* the iterator will be adjusted to the index <code>USEARCH_DONE</code>
* <p>
* Search positions that may render incorrect results are highlighted in the
* header comments. If position is less than or greater than the text range
* for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned.
* <p>
-* When <tt>USEARCH_OVERLAP</tt> option is off, the last index of the
-* result match is always less than <tt>position</tt>.
-* When <tt>USERARCH_OVERLAP</tt> is on, the result match may span across
-* <tt>position</tt>.
+* When <code>USEARCH_OVERLAP</code> option is off, the last index of the
+* result match is always less than <code>position</code>.
+* When <code>USERARCH_OVERLAP</code> is on, the result match may span across
+* <code>position</code>.
* @param strsrch search iterator data struct
* @param position index position the search is to begin at
* @param status for errors if it occurs
-* @return The character index of the first match preceding <tt>pos</tt>,
-* or <tt>USEARCH_DONE</tt> if there are no matches.
+* @return The character index of the first match preceding <code>pos</code>,
+* or <code>USEARCH_DONE</code> if there are no matches.
* @see #usearch_getOffset
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_preceding(UStringSearch *strsrch,
+U_CAPI int32_t U_EXPORT2 usearch_preceding(UStringSearch *strsrch,
int32_t position,
UErrorCode *status);
@@ -715,40 +736,40 @@ U_STABLE int32_t U_EXPORT2 usearch_preceding(UStringSearch *strsrch,
* Returns the index of the next point at which the string text matches the
* search pattern, starting from the current position.
* The iterator is adjusted so that its current
-* index (as returned by <tt>usearch_getOffset</tt>) is the match position if
+* index (as returned by <code>usearch_getOffset</code>) is the match position if
* one was found.
-* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and
-* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>
+* If a match is not found, <code>USEARCH_DONE</code> will be returned and
+* the iterator will be adjusted to the index <code>USEARCH_DONE</code>
* @param strsrch search iterator data struct
* @param status for errors if it occurs
* @return The index of the next match after the current position, or
-* <tt>USEARCH_DONE</tt> if there are no more matches.
+* <code>USEARCH_DONE</code> if there are no more matches.
* @see #usearch_first
* @see #usearch_getOffset
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_next(UStringSearch *strsrch,
+U_CAPI int32_t U_EXPORT2 usearch_next(UStringSearch *strsrch,
UErrorCode *status);
/**
* Returns the index of the previous point at which the string text matches
* the search pattern, starting at the current position.
* The iterator is adjusted so that its current
-* index (as returned by <tt>usearch_getOffset</tt>) is the match position if
+* index (as returned by <code>usearch_getOffset</code>) is the match position if
* one was found.
-* If a match is not found, <tt>USEARCH_DONE</tt> will be returned and
-* the iterator will be adjusted to the index <tt>USEARCH_DONE</tt>
+* If a match is not found, <code>USEARCH_DONE</code> will be returned and
+* the iterator will be adjusted to the index <code>USEARCH_DONE</code>
* @param strsrch search iterator data struct
* @param status for errors if it occurs
* @return The index of the previous match before the current position,
-* or <tt>USEARCH_DONE</tt> if there are no more matches.
+* or <code>USEARCH_DONE</code> if there are no more matches.
* @see #usearch_last
* @see #usearch_getOffset
* @see #USEARCH_DONE
* @stable ICU 2.4
*/
-U_STABLE int32_t U_EXPORT2 usearch_previous(UStringSearch *strsrch,
+U_CAPI int32_t U_EXPORT2 usearch_previous(UStringSearch *strsrch,
UErrorCode *status);
/**
@@ -761,7 +782,7 @@ U_STABLE int32_t U_EXPORT2 usearch_previous(UStringSearch *strsrch,
* @see #usearch_first
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2 usearch_reset(UStringSearch *strsrch);
+U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch);
#ifndef U_HIDE_INTERNAL_API
/**
@@ -814,11 +835,11 @@ U_STABLE void U_EXPORT2 usearch_reset(UStringSearch *strsrch);
* A value of -1 will be returned if no match was found.
*
* @param status Report any errors. Note that no match found is not an error.
- * @return TRUE if a match was found, FALSE otherwise.
+ * @return true if a match was found, false otherwise.
*
* @internal
*/
-U_INTERNAL UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
+U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
int32_t startIdx,
int32_t *matchStart,
int32_t *matchLimit,
@@ -874,11 +895,11 @@ U_INTERNAL UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
* A value of -1 will be returned if no match was found.
*
* @param status Report any errors. Note that no match found is not an error.
- * @return TRUE if a match was found, FALSE otherwise.
+ * @return true if a match was found, false otherwise.
*
* @internal
*/
-U_INTERNAL UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
+U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
int32_t startIdx,
int32_t *matchStart,
int32_t *matchLimit,
diff --git a/contrib/libs/icu/include/unicode/uset.h b/contrib/libs/icu/include/unicode/uset.h
index 18482c10e7..2ef352ef56 100644
--- a/contrib/libs/icu/include/unicode/uset.h
+++ b/contrib/libs/icu/include/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,80 +554,94 @@ 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);
/**
- * Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"}
- * If this set already any particular character, it has no effect on that character.
+ * Adds each of the characters in this string to the set. Note: "ch" => {"c", "h"}
+ * If this set already contains any particular character, it has no effect on that character.
* A frozen set will not be modified.
* @param set the object to which to add the character
* @param str the source string
* @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);
+#ifndef U_HIDE_DRAFT_API
+/**
+ * Removes EACH of the characters in this string. Note: "ch" == {"c", "h"}
+ * A frozen set will not be modified.
+ *
+ * @param set the object to be modified
+ * @param str the string
+ * @param length the length of the string, or -1 if NUL-terminated
+ * @draft ICU 69
+ */
+U_CAPI void U_EXPORT2
+uset_removeAllCodePoints(USet *set, const UChar *str, int32_t length);
+#endif // U_HIDE_DRAFT_API
+
/**
* Removes from this set all of its elements that are contained in the
* specified set. This operation effectively modifies this
@@ -636,7 +653,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);
/**
@@ -647,15 +664,41 @@ uset_removeAll(USet* set, const USet* removeSet);
* A frozen set will not be modified.
*
* @param set the object for which to retain only the specified range
- * @param start first character, inclusive, of range to be retained
- * to this set.
- * @param end last character, inclusive, of range to be retained
- * to this set.
+ * @param start first character, inclusive, of range
+ * @param end last character, inclusive, of range
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_retain(USet* set, UChar32 start, UChar32 end);
+#ifndef U_HIDE_DRAFT_API
+/**
+ * Retains only the specified string from this set if it is present.
+ * Upon return this set will be empty if it did not contain s, or
+ * will only contain s if it did contain s.
+ * A frozen set will not be modified.
+ *
+ * @param set the object to be modified
+ * @param str the string
+ * @param length the length of the string, or -1 if NUL-terminated
+ * @draft ICU 69
+ */
+U_CAPI void U_EXPORT2
+uset_retainString(USet *set, const UChar *str, int32_t length);
+
+/**
+ * Retains EACH of the characters in this string. Note: "ch" == {"c", "h"}
+ * A frozen set will not be modified.
+ *
+ * @param set the object to be modified
+ * @param str the string
+ * @param length the length of the string, or -1 if NUL-terminated
+ * @draft ICU 69
+ */
+U_CAPI void U_EXPORT2
+uset_retainAllCodePoints(USet *set, const UChar *str, int32_t length);
+#endif // U_HIDE_DRAFT_API
+
/**
* Retains only the elements in this set that are contained in the
* specified set. In other words, removes from this set all of
@@ -668,7 +711,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);
/**
@@ -676,23 +719,71 @@ uset_retainAll(USet* set, const USet* retain);
* possible space, without changing this object's value.
* A frozen set will not be modified.
*
- * @param set the object on which to perfrom the compact
+ * @param set the object on which to perform the compact
* @stable ICU 3.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_compact(USet* set);
/**
- * Inverts this set. This operation modifies this set so that
- * its value is its complement. This operation does not affect
- * the multicharacter strings, if any.
+ * This is equivalent to
+ * <code>uset_complementRange(set, 0, 0x10FFFF)</code>.
+ *
+ * <strong>Note:</strong> This performs a symmetric difference with all code points
+ * <em>and thus retains all multicharacter strings</em>.
+ * In order to achieve a “code point complement” (all code points minus this set),
+ * the easiest is to <code>uset_complement(set); uset_removeAllStrings(set);</code>.
+ *
* A frozen set will not be modified.
* @param set the set
* @stable ICU 2.4
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uset_complement(USet* set);
+#ifndef U_HIDE_DRAFT_API
+/**
+ * Complements the specified range in this set. Any character in
+ * the range will be removed if it is in this set, or will be
+ * added if it is not in this set. If <code>start > end</code>
+ * then an empty range is complemented, leaving the set unchanged.
+ * This is equivalent to a boolean logic XOR.
+ * A frozen set will not be modified.
+ *
+ * @param set the object to be modified
+ * @param start first character, inclusive, of range
+ * @param end last character, inclusive, of range
+ * @draft ICU 69
+ */
+U_CAPI void U_EXPORT2
+uset_complementRange(USet *set, UChar32 start, UChar32 end);
+
+/**
+ * Complements the specified string in this set.
+ * The string will be removed if it is in this set, or will be added if it is not in this set.
+ * A frozen set will not be modified.
+ *
+ * @param set the object to be modified
+ * @param str the string
+ * @param length the length of the string, or -1 if NUL-terminated
+ * @draft ICU 69
+ */
+U_CAPI void U_EXPORT2
+uset_complementString(USet *set, const UChar *str, int32_t length);
+
+/**
+ * Complements EACH of the characters in this string. Note: "ch" == {"c", "h"}
+ * A frozen set will not be modified.
+ *
+ * @param set the object to be modified
+ * @param str the string
+ * @param length the length of the string, or -1 if NUL-terminated
+ * @draft ICU 69
+ */
+U_CAPI void U_EXPORT2
+uset_complementAllCodePoints(USet *set, const UChar *str, int32_t length);
+#endif // U_HIDE_DRAFT_API
+
/**
* Complements in this set all elements contained in the specified
* set. Any character in the other set will be removed if it is
@@ -704,7 +795,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 +805,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 +834,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 +843,61 @@ 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);
+#ifndef U_HIDE_DRAFT_API
+/**
+ * @param set the set
+ * @return true if this set contains multi-character strings or the empty string.
+ * @draft ICU 70
+ */
+U_CAPI UBool U_EXPORT2
+uset_hasStrings(const USet *set);
+#endif // U_HIDE_DRAFT_API
+
/**
- * 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,33 +910,56 @@ 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);
/**
* Returns the character at the given index within this set, where
* the set is ordered by ascending code point. If the index is
- * out of range, return (UChar32)-1. The inverse of this method is
- * <code>indexOf()</code>.
+ * out of range for characters, returns (UChar32)-1.
+ * The inverse of this method is <code>indexOf()</code>.
+ *
+ * For iteration, this is slower than uset_getRangeCount()/uset_getItemCount()
+ * with uset_getItem(), because for each call it skips linearly over <code>index</code>
+ * characters in the ranges.
+ *
* @param set the set
* @param charIndex an index from 0..size()-1 to obtain the char for
* @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);
/**
- * Returns the number of characters and strings contained in the given
- * USet.
+ * Returns the number of characters and strings contained in this set.
+ * The last (uset_getItemCount() - uset_getRangeCount()) items are strings.
+ *
+ * This is slower than uset_getRangeCount() and uset_getItemCount() because
+ * it counts the code points of all ranges.
+ *
* @param set the set
* @return a non-negative integer counting the characters and strings
* contained in set
* @stable ICU 2.4
+ * @see uset_getRangeCount
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uset_size(const USet* set);
+#ifndef U_HIDE_DRAFT_API
+/**
+ * @param set the set
+ * @return the number of ranges in this set.
+ * @draft ICU 70
+ * @see uset_getItemCount
+ * @see uset_getItem
+ * @see uset_size
+ */
+U_CAPI int32_t U_EXPORT2
+uset_getRangeCount(const USet *set);
+#endif // U_HIDE_DRAFT_API
+
/**
* Returns the number of items in this set. An item is either a range
* of characters or a single multicharacter string.
@@ -844,28 +968,38 @@ 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);
/**
* Returns an item of this set. An item is either a range of
- * characters or a single multicharacter string.
+ * characters or a single multicharacter string (which can be the empty string).
+ *
+ * If <code>itemIndex</code> is less than uset_getRangeCount(), then this function returns 0,
+ * and the range is <code>*start</code>..<code>*end</code>.
+ *
+ * If <code>itemIndex</code> is at least uset_getRangeCount() and less than uset_getItemCount(), then
+ * this function copies the string into <code>str[strCapacity]</code> and
+ * returns the length of the string (0 for the empty string).
+ *
+ * If <code>itemIndex</code> is out of range, then this function returns -1.
+ *
+ * Note that 0 is returned for each range as well as for the empty string.
+ *
* @param set the set
- * @param itemIndex a non-negative integer in the range 0..
- * uset_getItemCount(set)-1
- * @param start pointer to variable to receive first character
- * in range, inclusive
- * @param end pointer to variable to receive last character in range,
- * inclusive
+ * @param itemIndex a non-negative integer in the range 0..uset_getItemCount(set)-1
+ * @param start pointer to variable to receive first character in range, inclusive;
+ * can be NULL for a string item
+ * @param end pointer to variable to receive last character in range, inclusive;
+ * can be NULL for a string item
* @param str buffer to receive the string, may be NULL
* @param strCapacity capacity of str, or 0 if str is NULL
- * @param ec error code
- * @return the length of the string (>= 2), or 0 if the item is a
- * range, in which case it is the range *start..*end, or -1 if
- * itemIndex is out of range
+ * @param ec error code; U_INDEX_OUTOFBOUNDS_ERROR if the itemIndex is out of range
+ * @return the length of the string (0 or >= 2), or 0 if the item is a range,
+ * or -1 if the 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 +1013,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 +1026,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 +1037,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 +1048,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 +1070,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 +1091,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 +1113,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 +1134,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 +1145,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 +1201,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 +1212,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 +1222,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 +1245,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 +1261,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/contrib/libs/icu/include/unicode/usetiter.h b/contrib/libs/icu/include/unicode/usetiter.h
index c6396fd76c..5834c308e4 100644
--- a/contrib/libs/icu/include/unicode/usetiter.h
+++ b/contrib/libs/icu/include/unicode/usetiter.h
@@ -33,9 +33,7 @@ class UnicodeString;
* code points or ranges have been returned, it returns the
* multicharacter strings of the UnicodeSet, if any.
*
- * This class is not intended to be subclassed. Consider any fields
- * or methods declared as "protected" to be private. The use of
- * protected in this class is an artifact of history.
+ * This class is not intended for public subclassing.
*
* <p>To iterate over code points and strings, use a loop like this:
* <pre>
@@ -60,25 +58,23 @@ class UnicodeString;
* }
* }
* </pre>
+ *
+ * To iterate over only the strings, start with <code>skipToStrings()</code>.
+ *
* @author M. Davis
* @stable ICU 2.4
*/
-class U_COMMON_API UnicodeSetIterator : public UObject {
-
- protected:
-
+class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject {
/**
* Value of <tt>codepoint</tt> if the iterator points to a string.
* If <tt>codepoint == IS_STRING</tt>, then examine
* <tt>string</tt> for the current iteration result.
- * @stable ICU 2.4
*/
enum { IS_STRING = -1 };
/**
* Current code point, or the special value <tt>IS_STRING</tt>, if
* the iterator points to a string.
- * @stable ICU 2.4
*/
UChar32 codepoint;
@@ -89,7 +85,6 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
* iterating over code points using <tt>next()</tt>, or if
* <tt>codepoint == IS_STRING</tt>, then the value of
* <tt>codepointEnd</tt> is undefined.
- * @stable ICU 2.4
*/
UChar32 codepointEnd;
@@ -97,7 +92,6 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
* If <tt>codepoint == IS_STRING</tt>, then <tt>string</tt> points
* to the current string. If <tt>codepoint != IS_STRING</tt>, the
* value of <tt>string</tt> is undefined.
- * @stable ICU 2.4
*/
const UnicodeString* string;
@@ -170,13 +164,32 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
*/
const UnicodeString& getString();
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Skips over the remaining code points/ranges, if any.
+ * A following call to next() or nextRange() will yield a string, if there is one.
+ * No-op if next() would return false, or if it would yield a string anyway.
+ *
+ * @return *this
+ * @draft ICU 70
+ * @see UnicodeSet#strings()
+ */
+ inline UnicodeSetIterator &skipToStrings() {
+ // Finish code point/range iteration.
+ range = endRange;
+ endElement = -1;
+ nextElement = 0;
+ return *this;
+ }
+#endif // U_HIDE_DRAFT_API
+
/**
* Advances the iteration position to the next element in the set,
* which can be either a single code point or a string.
* If there are no more elements in the set, return false.
*
* <p>
- * If <tt>isString() == TRUE</tt>, the value is a
+ * If <tt>isString() == true</tt>, the value is a
* string, otherwise the value is a
* single code point. Elements of either type can be retrieved
* with the function <tt>getString()</tt>, while elements of
@@ -197,7 +210,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 <tt>isString() == TRUE</tt>, the value is a
+ * false. If <tt>isString() == true</tt>, the value is a
* string and can be accessed with <tt>getString()</tt>. Otherwise the value is a
* range of one or more code points from <tt>getCodepoint()</tt> to
* <tt>getCodepointeEnd()</tt> inclusive.
@@ -205,7 +218,7 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
* <p>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 <tt>getString()</tt>
- * is undefined unless <tt>isString() == TRUE</tt>. Do not mix calls to
+ * is undefined unless <tt>isString() == true</tt>. Do not mix calls to
* <tt>next()</tt> and <tt>nextRange()</tt> without calling
* <tt>reset()</tt> between them. The results of doing so are
* undefined.
@@ -242,71 +255,58 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
*
* @stable ICU 2.4
*/
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
// ======================= PRIVATES ===========================
- protected:
+private:
// endElement and nextElements are really UChar32's, but we keep
// them as signed int32_t's so we can do comparisons with
// endElement set to -1. Leave them as int32_t's.
/** The set
- * @stable ICU 2.4
*/
const UnicodeSet* set;
/** End range
- * @stable ICU 2.4
*/
int32_t endRange;
/** Range
- * @stable ICU 2.4
*/
int32_t range;
/** End element
- * @stable ICU 2.4
*/
int32_t endElement;
/** Next element
- * @stable ICU 2.4
*/
int32_t nextElement;
- //UBool abbreviated;
/** Next string
- * @stable ICU 2.4
*/
int32_t nextString;
/** String count
- * @stable ICU 2.4
*/
int32_t stringCount;
/**
* Points to the string to use when the caller asks for a
* string and the current iteration item is a code point, not a string.
- * @internal
*/
UnicodeString *cpString;
/** Copy constructor. Disallowed.
- * @stable ICU 2.4
*/
- UnicodeSetIterator(const UnicodeSetIterator&); // disallow
+ UnicodeSetIterator(const UnicodeSetIterator&) = delete;
/** Assignment operator. Disallowed.
- * @stable ICU 2.4
*/
- UnicodeSetIterator& operator=(const UnicodeSetIterator&); // disallow
+ UnicodeSetIterator& operator=(const UnicodeSetIterator&) = delete;
/** Load range
- * @stable ICU 2.4
*/
- virtual void loadRange(int32_t range);
-
+ void loadRange(int32_t range);
};
inline UBool UnicodeSetIterator::isString() const {
- return codepoint == (UChar32)IS_STRING;
+ return codepoint < 0;
}
inline UChar32 UnicodeSetIterator::getCodepoint() const {
diff --git a/contrib/libs/icu/include/unicode/ushape.h b/contrib/libs/icu/include/unicode/ushape.h
index 78b4d027a8..14371edc8f 100644
--- a/contrib/libs/icu/include/unicode/ushape.h
+++ b/contrib/libs/icu/include/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,
@@ -323,7 +323,7 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
#define U_SHAPE_PRESERVE_PRESENTATION 0x8000
/** Presentation form option:
* Replace Arabic Presentation Forms-A and Arabic Presentationo Forms-B with
- * their unshaped correspondants in range 0+06xx, before shaping.
+ * their unshaped correspondents in range 0+06xx, before shaping.
* @stable ICU 3.6
*/
#define U_SHAPE_PRESERVE_PRESENTATION_NOOP 0
diff --git a/contrib/libs/icu/include/unicode/uspoof.h b/contrib/libs/icu/include/unicode/uspoof.h
index 63a13387b0..b674c91b2c 100644
--- a/contrib/libs/icu/include/unicode/uspoof.h
+++ b/contrib/libs/icu/include/unicode/uspoof.h
@@ -22,12 +22,12 @@
#include "unicode/utypes.h"
#include "unicode/uset.h"
#include "unicode/parseerr.h"
-#include "unicode/localpointer.h"
#if !UCONFIG_NO_NORMALIZATION
#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
#include "unicode/unistr.h"
#include "unicode/uniset.h"
#endif
@@ -154,10 +154,10 @@
* UChar* skel = (UChar*) malloc(++len * sizeof(UChar));
* status = U_ZERO_ERROR;
* uspoof_getSkeleton(sc, 0, str, -1, skel, len, &status);
- * UBool result = FALSE;
+ * UBool result = false;
* for (size_t i=0; i<DICTIONARY_LENGTH; i++) {
* result = u_strcmp(skel, skeletons[i]) == 0;
- * if (result == TRUE) { break; }
+ * if (result == true) { break; }
* }
* // Has confusable in dictionary: 1 (status: U_ZERO_ERROR)
* printf("Has confusable in dictionary: %d (status: %s)\n", result, u_errorName(status));
@@ -502,7 +502,7 @@ typedef enum USpoofChecks {
USPOOF_ALL_CHECKS = 0xFFFF,
/**
- * Enable the return of auxillary (non-error) information in the
+ * Enable the return of auxiliary (non-error) information in the
* upper bits of the check results value.
*
* If this "check" is not enabled, the results of {@link uspoof_check} will be
@@ -601,7 +601,7 @@ typedef enum USpoofChecks {
* @return the newly created Spoof Checker
* @stable ICU 4.2
*/
-U_STABLE USpoofChecker * U_EXPORT2
+U_CAPI USpoofChecker * U_EXPORT2
uspoof_open(UErrorCode *status);
@@ -626,7 +626,7 @@ uspoof_open(UErrorCode *status);
* @see uspoof_serialize
* @stable ICU 4.2
*/
-U_STABLE USpoofChecker * U_EXPORT2
+U_CAPI USpoofChecker * U_EXPORT2
uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLength,
UErrorCode *pErrorCode);
@@ -660,7 +660,7 @@ uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLeng
* @return A spoof checker that uses the rules from the input files.
* @stable ICU 4.2
*/
-U_STABLE USpoofChecker * U_EXPORT2
+U_CAPI USpoofChecker * U_EXPORT2
uspoof_openFromSource(const char *confusables, int32_t confusablesLen,
const char *confusablesWholeScript, int32_t confusablesWholeScriptLen,
int32_t *errType, UParseError *pe, UErrorCode *status);
@@ -671,7 +671,7 @@ uspoof_openFromSource(const char *confusables, int32_t confusablesLen,
* its implementation.
* @stable ICU 4.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uspoof_close(USpoofChecker *sc);
/**
@@ -683,7 +683,7 @@ uspoof_close(USpoofChecker *sc);
* @return
* @stable ICU 4.2
*/
-U_STABLE USpoofChecker * U_EXPORT2
+U_CAPI USpoofChecker * U_EXPORT2
uspoof_clone(const USpoofChecker *sc, UErrorCode *status);
@@ -691,8 +691,10 @@ uspoof_clone(const USpoofChecker *sc, UErrorCode *status);
* Specify the bitmask of checks that will be performed by {@link uspoof_check}. Calling this method
* overwrites any checks that may have already been enabled. By default, all checks are enabled.
*
- * To enable specific checks and disable all others, the "whitelisted" checks should be ORed together. For
- * example, to fail strings containing characters outside of the set specified by {@link uspoof_setAllowedChars} and
+ * To enable specific checks and disable all others,
+ * OR together only the bit constants for the desired checks.
+ * For example, to fail strings containing characters outside of
+ * the set specified by {@link uspoof_setAllowedChars} and
* also strings that contain digits from mixed numbering systems:
*
* <pre>
@@ -701,8 +703,9 @@ uspoof_clone(const USpoofChecker *sc, UErrorCode *status);
* }
* </pre>
*
- * To disable specific checks and enable all others, the "blacklisted" checks should be ANDed away from
- * ALL_CHECKS. For example, if you are not planning to use the {@link uspoof_areConfusable} functionality,
+ * To disable specific checks and enable all others,
+ * start with ALL_CHECKS and "AND away" the not-desired checks.
+ * For example, if you are not planning to use the {@link uspoof_areConfusable} functionality,
* it is good practice to disable the CONFUSABLE check:
*
* <pre>
@@ -724,7 +727,7 @@ uspoof_clone(const USpoofChecker *sc, UErrorCode *status);
* @stable ICU 4.2
*
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status);
/**
@@ -738,7 +741,7 @@ uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status);
* @stable ICU 4.2
*
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status);
/**
@@ -752,7 +755,7 @@ uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status);
* @see URestrictionLevel
* @stable ICU 51
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uspoof_setRestrictionLevel(USpoofChecker *sc, URestrictionLevel restrictionLevel);
@@ -763,7 +766,7 @@ uspoof_setRestrictionLevel(USpoofChecker *sc, URestrictionLevel restrictionLevel
* @see URestrictionLevel
* @stable ICU 51
*/
-U_STABLE URestrictionLevel U_EXPORT2
+U_CAPI URestrictionLevel U_EXPORT2
uspoof_getRestrictionLevel(const USpoofChecker *sc);
/**
@@ -808,7 +811,7 @@ uspoof_getRestrictionLevel(const USpoofChecker *sc);
* @param status The error code, set if this function encounters a problem.
* @stable ICU 4.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uspoof_setAllowedLocales(USpoofChecker *sc, const char *localesList, UErrorCode *status);
/**
@@ -832,7 +835,7 @@ uspoof_setAllowedLocales(USpoofChecker *sc, const char *localesList, UErrorCode
*
* @stable ICU 4.2
*/
-U_STABLE const char * U_EXPORT2
+U_CAPI const char * U_EXPORT2
uspoof_getAllowedLocales(USpoofChecker *sc, UErrorCode *status);
@@ -854,7 +857,7 @@ uspoof_getAllowedLocales(USpoofChecker *sc, UErrorCode *status);
* @param status The error code, set if this function encounters a problem.
* @stable ICU 4.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uspoof_setAllowedChars(USpoofChecker *sc, const USet *chars, UErrorCode *status);
@@ -878,7 +881,7 @@ uspoof_setAllowedChars(USpoofChecker *sc, const USet *chars, UErrorCode *status)
* the USPOOF_CHAR_LIMIT test.
* @stable ICU 4.2
*/
-U_STABLE const USet * U_EXPORT2
+U_CAPI const USet * U_EXPORT2
uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status);
@@ -914,7 +917,7 @@ uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status);
* @see uspoof_check2
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_check(const USpoofChecker *sc,
const UChar *id, int32_t length,
int32_t *position,
@@ -953,7 +956,7 @@ uspoof_check(const USpoofChecker *sc,
* @see uspoof_check2UTF8
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_checkUTF8(const USpoofChecker *sc,
const char *id, int32_t length,
int32_t *position,
@@ -988,7 +991,7 @@ uspoof_checkUTF8(const USpoofChecker *sc,
* @see uspoof_check2UnicodeString
* @stable ICU 58
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_check2(const USpoofChecker *sc,
const UChar* id, int32_t length,
USpoofCheckResult* checkResult,
@@ -1025,7 +1028,7 @@ uspoof_check2(const USpoofChecker *sc,
* @see uspoof_check2UnicodeString
* @stable ICU 58
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_check2UTF8(const USpoofChecker *sc,
const char *id, int32_t length,
USpoofCheckResult* checkResult,
@@ -1049,7 +1052,7 @@ uspoof_check2UTF8(const USpoofChecker *sc,
* @see uspoof_check2UnicodeString
* @stable ICU 58
*/
-U_STABLE USpoofCheckResult* U_EXPORT2
+U_CAPI USpoofCheckResult* U_EXPORT2
uspoof_openCheckResult(UErrorCode *status);
/**
@@ -1059,7 +1062,7 @@ uspoof_openCheckResult(UErrorCode *status);
* @param checkResult The instance of USpoofCheckResult to close
* @stable ICU 58
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uspoof_closeCheckResult(USpoofCheckResult *checkResult);
/**
@@ -1076,7 +1079,7 @@ uspoof_closeCheckResult(USpoofCheckResult *checkResult);
* @see uspoof_setChecks
* @stable ICU 58
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_getCheckResultChecks(const USpoofCheckResult *checkResult, UErrorCode *status);
/**
@@ -1089,7 +1092,7 @@ uspoof_getCheckResultChecks(const USpoofCheckResult *checkResult, UErrorCode *st
* @see uspoof_setRestrictionLevel
* @stable ICU 58
*/
-U_STABLE URestrictionLevel U_EXPORT2
+U_CAPI URestrictionLevel U_EXPORT2
uspoof_getCheckResultRestrictionLevel(const USpoofCheckResult *checkResult, UErrorCode *status);
/**
@@ -1103,7 +1106,7 @@ uspoof_getCheckResultRestrictionLevel(const USpoofCheckResult *checkResult, UErr
* @param status The error code, set if an error occurred.
* @stable ICU 58
*/
-U_STABLE const USet* U_EXPORT2
+U_CAPI const USet* U_EXPORT2
uspoof_getCheckResultNumerics(const USpoofCheckResult *checkResult, UErrorCode *status);
@@ -1131,7 +1134,7 @@ uspoof_getCheckResultNumerics(const USpoofCheckResult *checkResult, UErrorCode *
* @param sc The USpoofChecker
* @param id1 The first of the two identifiers to be compared for
* confusability. The strings are in UTF-16 format.
- * @param length1 the length of the first identifer, expressed in
+ * @param length1 the length of the first identifier, expressed in
* 16 bit UTF-16 code units, or -1 if the string is
* nul terminated.
* @param id2 The second of the two identifiers to be compared for
@@ -1150,7 +1153,7 @@ uspoof_getCheckResultNumerics(const USpoofCheckResult *checkResult, UErrorCode *
*
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_areConfusable(const USpoofChecker *sc,
const UChar *id1, int32_t length1,
const UChar *id2, int32_t length2,
@@ -1183,7 +1186,7 @@ uspoof_areConfusable(const USpoofChecker *sc,
*
* @see uspoof_areConfusable
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_areConfusableUTF8(const USpoofChecker *sc,
const char *id1, int32_t length1,
const char *id2, int32_t length2,
@@ -1223,7 +1226,7 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc,
* @stable ICU 4.2
* @see uspoof_areConfusable
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_getSkeleton(const USpoofChecker *sc,
uint32_t type,
const UChar *id, int32_t length,
@@ -1263,7 +1266,7 @@ uspoof_getSkeleton(const USpoofChecker *sc,
*
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_getSkeletonUTF8(const USpoofChecker *sc,
uint32_t type,
const char *id, int32_t length,
@@ -1282,7 +1285,7 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc,
*
* @stable ICU 51
*/
-U_STABLE const USet * U_EXPORT2
+U_CAPI const USet * U_EXPORT2
uspoof_getInclusionSet(UErrorCode *status);
/**
@@ -1297,7 +1300,7 @@ uspoof_getInclusionSet(UErrorCode *status);
*
* @stable ICU 51
*/
-U_STABLE const USet * U_EXPORT2
+U_CAPI const USet * U_EXPORT2
uspoof_getRecommendedSet(UErrorCode *status);
/**
@@ -1322,7 +1325,7 @@ uspoof_getRecommendedSet(UErrorCode *status);
* @see utrie2_openFromSerialized()
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_serialize(USpoofChecker *sc,
void *data, int32_t capacity,
UErrorCode *status);
@@ -1388,7 +1391,7 @@ U_NAMESPACE_END
* @param status The error code, set if this function encounters a problem.
* @stable ICU 4.2
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UErrorCode *status);
@@ -1412,7 +1415,7 @@ uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UEr
* the USPOOF_CHAR_LIMIT test.
* @stable ICU 4.2
*/
-U_STABLE const icu::UnicodeSet * U_EXPORT2
+U_CAPI const icu::UnicodeSet * U_EXPORT2
uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status);
/**
@@ -1443,7 +1446,7 @@ uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status);
* @see uspoof_check2UnicodeString
* @stable ICU 4.2
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_checkUnicodeString(const USpoofChecker *sc,
const icu::UnicodeString &id,
int32_t *position,
@@ -1474,7 +1477,7 @@ uspoof_checkUnicodeString(const USpoofChecker *sc,
* @see uspoof_check2UTF8
* @stable ICU 58
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_check2UnicodeString(const USpoofChecker *sc,
const icu::UnicodeString &id,
USpoofCheckResult* checkResult,
@@ -1501,7 +1504,7 @@ uspoof_check2UnicodeString(const USpoofChecker *sc,
*
* @see uspoof_areConfusable
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
uspoof_areConfusableUnicodeString(const USpoofChecker *sc,
const icu::UnicodeString &s1,
const icu::UnicodeString &s2,
@@ -1549,7 +1552,7 @@ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
*
* @stable ICU 51
*/
-U_STABLE const icu::UnicodeSet * U_EXPORT2
+U_CAPI const icu::UnicodeSet * U_EXPORT2
uspoof_getInclusionUnicodeSet(UErrorCode *status);
/**
@@ -1564,7 +1567,7 @@ uspoof_getInclusionUnicodeSet(UErrorCode *status);
*
* @stable ICU 51
*/
-U_STABLE const icu::UnicodeSet * U_EXPORT2
+U_CAPI const icu::UnicodeSet * U_EXPORT2
uspoof_getRecommendedUnicodeSet(UErrorCode *status);
#endif /* U_SHOW_CPLUSPLUS_API */
diff --git a/contrib/libs/icu/include/unicode/usprep.h b/contrib/libs/icu/include/unicode/usprep.h
index 914eb84871..f8a0f58e0d 100644
--- a/contrib/libs/icu/include/unicode/usprep.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/ustdio.h b/contrib/libs/icu/include/unicode/ustdio.h
index 342c2b4604..5aad6b9bbe 100644
--- a/contrib/libs/icu/include/unicode/ustdio.h
+++ b/contrib/libs/icu/include/unicode/ustdio.h
@@ -30,9 +30,12 @@
#include "unicode/utypes.h"
#include "unicode/ucnv.h"
#include "unicode/utrans.h"
-#include "unicode/localpointer.h"
#include "unicode/unum.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_CONVERSION
/*
@@ -48,7 +51,7 @@
wastes a lot of time and space.
* Test stdin and stdout with the u_f* functions
* Testing should be done for reading and writing multi-byte encodings,
- and make sure that a character that is contained across buffer boundries
+ and make sure that a character that is contained across buffer boundaries
works even for incomplete characters.
* Make sure that the last character is flushed when the file/string is closed.
* snprintf should follow the C99 standard for the return value, which is
@@ -99,7 +102,7 @@
* <p>This API provides an stdio-like API wrapper around ICU's other
* formatting and parsing APIs. It is meant to ease the transition of adding
* Unicode support to a preexisting applications using stdio. The following
- * is a small list of noticable differences between stdio and ICU I/O's
+ * is a small list of noticeable differences between stdio and ICU I/O's
* ustdio implementation.</p>
*
* <ul>
@@ -228,18 +231,18 @@ typedef enum {
* That is, data written to a UFILE will be formatted using the conventions
* specified by that UFILE's Locale; this data will be in the character set
* specified by that UFILE's codepage.
- * @param filename The name of the file to open.
+ * @param filename The name of the file to open. Must be 0-terminated.
* @param perm The read/write permission for the UFILE; one of "r", "w", "rw"
* @param locale The locale whose conventions will be used to format
* and parse output. If this parameter is NULL, the default locale will
* be used.
* @param codepage The codepage in which data will be written to and
- * read from the file. If this paramter is NULL the system default codepage
+ * read from the file. If this parameter is NULL the system default codepage
* will be used.
* @return A new UFILE, or NULL if an error occurred.
* @stable ICU 3.0
*/
-U_STABLE UFILE* U_EXPORT2
+U_CAPI UFILE* U_EXPORT2
u_fopen(const char *filename,
const char *perm,
const char *locale,
@@ -251,18 +254,18 @@ u_fopen(const char *filename,
* That is, data written to a UFILE will be formatted using the conventions
* specified by that UFILE's Locale; this data will be in the character set
* specified by that UFILE's codepage.
- * @param filename The name of the file to open.
+ * @param filename The name of the file to open. Must be 0-terminated.
* @param perm The read/write permission for the UFILE; one of "r", "w", "rw"
* @param locale The locale whose conventions will be used to format
* and parse output. If this parameter is NULL, the default locale will
* be used.
* @param codepage The codepage in which data will be written to and
- * read from the file. If this paramter is NULL the system default codepage
+ * read from the file. If this parameter is NULL the system default codepage
* will be used.
* @return A new UFILE, or NULL if an error occurred.
* @stable ICU 54
*/
-U_STABLE UFILE* U_EXPORT2
+U_CAPI UFILE* U_EXPORT2
u_fopen_u(const UChar *filename,
const char *perm,
const char *locale,
@@ -278,13 +281,13 @@ u_fopen_u(const UChar *filename,
* and parse output. If this parameter is NULL, the default locale will
* be used.
* @param codepage The codepage in which data will be written to and
- * read from the file. If this paramter is NULL, data will be written and
+ * read from the file. If this parameter is NULL, data will be written and
* read using the default codepage for <TT>locale</TT>, unless <TT>locale</TT>
* is NULL, in which case the system default codepage will be used.
* @return A new UFILE, or NULL if an error occurred.
* @stable ICU 3.0
*/
-U_STABLE UFILE* U_EXPORT2
+U_CAPI UFILE* U_EXPORT2
u_finit(FILE *f,
const char *locale,
const char *codepage);
@@ -298,14 +301,14 @@ u_finit(FILE *f,
* and parse output. If this parameter is NULL, the default locale will
* be used.
* @param codepage The codepage in which data will be written to and
- * read from the file. If this paramter is NULL, data will be written and
+ * read from the file. If this parameter is NULL, data will be written and
* read using the default codepage for <TT>locale</TT>, unless <TT>locale</TT>
* is NULL, in which case the system default codepage will be used.
* @return A new UFILE, or NULL if an error occurred. If an error occurs
* the ownership of the FILE* stream remains with the caller.
* @stable ICU 4.4
*/
-U_STABLE UFILE* U_EXPORT2
+U_CAPI UFILE* U_EXPORT2
u_fadopt(FILE *f,
const char *locale,
const char *codepage);
@@ -324,7 +327,7 @@ u_fadopt(FILE *f,
* @return A new UFILE, or NULL if an error occurred.
* @stable ICU 3.0
*/
-U_STABLE UFILE* U_EXPORT2
+U_CAPI UFILE* U_EXPORT2
u_fstropen(UChar *stringBuf,
int32_t capacity,
const char *locale);
@@ -335,7 +338,7 @@ u_fstropen(UChar *stringBuf,
* @stable ICU 3.0
* @see u_fflush
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_fclose(UFILE *file);
#if U_SHOW_CPLUSPLUS_API
@@ -360,12 +363,12 @@ U_NAMESPACE_END
/**
* Tests if the UFILE is at the end of the file stream.
* @param f The UFILE from which to read.
- * @return Returns TRUE after the first read operation that attempts to
- * read past the end of the file. It returns FALSE if the current position is
+ * @return Returns true after the first read operation that attempts to
+ * read past the end of the file. It returns false if the current position is
* not end of file.
* @stable ICU 3.0
*/
-U_STABLE UBool U_EXPORT2
+U_CAPI UBool U_EXPORT2
u_feof(UFILE *f);
/**
@@ -378,7 +381,7 @@ u_feof(UFILE *f);
* @param file The UFILE to flush.
* @stable ICU 3.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
u_fflush(UFILE *file);
/**
@@ -386,7 +389,7 @@ u_fflush(UFILE *file);
* @param file The UFILE to rewind.
* @stable ICU 3.0
*/
-U_STABLE void
+U_CAPI void
u_frewind(UFILE *file);
/**
@@ -395,7 +398,7 @@ u_frewind(UFILE *file);
* @return A FILE*, owned by the UFILE. (The FILE <EM>must not</EM> be modified or closed)
* @stable ICU 3.0
*/
-U_STABLE FILE* U_EXPORT2
+U_CAPI FILE* U_EXPORT2
u_fgetfile(UFILE *f);
#if !UCONFIG_NO_FORMATTING
@@ -408,7 +411,7 @@ u_fgetfile(UFILE *f);
* @return The locale whose conventions are used to format and parse output.
* @stable ICU 3.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
u_fgetlocale(UFILE *file);
/**
@@ -419,7 +422,7 @@ u_fgetlocale(UFILE *file);
* @return NULL if successful, otherwise a negative number.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_fsetlocale(UFILE *file,
const char *locale);
@@ -434,7 +437,7 @@ u_fsetlocale(UFILE *file,
* or NULL if an error occurred.
* @stable ICU 3.0
*/
-U_STABLE const char* U_EXPORT2
+U_CAPI const char* U_EXPORT2
u_fgetcodepage(UFILE *file);
/**
@@ -452,7 +455,7 @@ u_fgetcodepage(UFILE *file);
* @see u_frewind
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_fsetcodepage(const char *codepage,
UFILE *file);
@@ -463,7 +466,7 @@ u_fsetcodepage(const char *codepage,
* @return alias to the converter (The converter <EM>must not</EM> be modified or closed)
* @stable ICU 3.0
*/
-U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
+U_CAPI UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
#if !UCONFIG_NO_FORMATTING
/**
@@ -472,7 +475,7 @@ U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
* @return alias to the number formatter (The formatter <EM>must not</EM> be modified or closed)
* @stable ICU 51
*/
- U_STABLE const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *f);
+ U_CAPI const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *f);
/* Output functions */
@@ -483,7 +486,7 @@ U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
* @return The number of Unicode characters written to <TT>stdout</TT>
* @stable ICU 49
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_printf(const char *patternSpecification,
... );
@@ -495,7 +498,7 @@ u_printf(const char *patternSpecification,
* @return The number of Unicode characters written to <TT>f</TT>.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_fprintf(UFILE *f,
const char *patternSpecification,
... );
@@ -512,7 +515,7 @@ u_fprintf(UFILE *f,
* @see u_fprintf
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vfprintf(UFILE *f,
const char *patternSpecification,
va_list ap);
@@ -524,7 +527,7 @@ u_vfprintf(UFILE *f,
* @return The number of Unicode characters written to <TT>stdout</TT>
* @stable ICU 49
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_printf_u(const UChar *patternSpecification,
... );
@@ -533,7 +536,7 @@ u_printf_u(const UChar *patternSpecification,
* @return UFILE that writes to <TT>stdout</TT>
* @stable ICU 49
*/
-U_STABLE UFILE * U_EXPORT2
+U_CAPI UFILE * U_EXPORT2
u_get_stdout(void);
/**
@@ -544,7 +547,7 @@ u_get_stdout(void);
* @return The number of Unicode characters written to <TT>f</TT>.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_fprintf_u(UFILE *f,
const UChar *patternSpecification,
... );
@@ -561,7 +564,7 @@ u_fprintf_u(UFILE *f,
* @see u_fprintf_u
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vfprintf_u(UFILE *f,
const UChar *patternSpecification,
va_list ap);
@@ -576,7 +579,7 @@ u_vfprintf_u(UFILE *f,
* @see u_file_write
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_fputs(const UChar *s,
UFILE *f);
@@ -587,7 +590,7 @@ u_fputs(const UChar *s,
* @return The character written if successful, EOF otherwise.
* @stable ICU 3.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_fputc(UChar32 uc,
UFILE *f);
@@ -602,7 +605,7 @@ u_fputc(UChar32 uc,
* @see u_fputs
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_file_write(const UChar *ustring,
int32_t count,
UFILE *f);
@@ -620,7 +623,7 @@ u_file_write(const UChar *ustring,
* if an error occurred.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_fscanf(UFILE *f,
const char *patternSpecification,
... );
@@ -638,7 +641,7 @@ u_fscanf(UFILE *f,
* @see u_fscanf
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vfscanf(UFILE *f,
const char *patternSpecification,
va_list ap);
@@ -652,7 +655,7 @@ u_vfscanf(UFILE *f,
* if an error occurred.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_fscanf_u(UFILE *f,
const UChar *patternSpecification,
... );
@@ -670,7 +673,7 @@ u_fscanf_u(UFILE *f,
* @see u_fscanf_u
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vfscanf_u(UFILE *f,
const UChar *patternSpecification,
va_list ap);
@@ -688,7 +691,7 @@ u_vfscanf_u(UFILE *f,
* @return A pointer to <TT>s</TT>, or NULL if no characters were available.
* @stable ICU 3.0
*/
-U_STABLE UChar* U_EXPORT2
+U_CAPI UChar* U_EXPORT2
u_fgets(UChar *s,
int32_t n,
UFILE *f);
@@ -702,7 +705,7 @@ u_fgets(UChar *s,
* @return The UChar value read, or U+FFFF if no character was available.
* @stable ICU 3.0
*/
-U_STABLE UChar U_EXPORT2
+U_CAPI UChar U_EXPORT2
u_fgetc(UFILE *f);
/**
@@ -715,21 +718,21 @@ u_fgetc(UFILE *f);
* @see u_unescape()
* @stable ICU 3.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_fgetcx(UFILE *f);
/**
* Unget a UChar from a UFILE.
* If this function is not the first to operate on <TT>f</TT> after a call
* to <TT>u_fgetc</TT>, the results are undefined.
- * If this function is passed a character that was not recieved from the
+ * If this function is passed a character that was not received from the
* previous <TT>u_fgetc</TT> or <TT>u_fgetcx</TT> call, the results are undefined.
* @param c The UChar to put back on the stream.
* @param f The UFILE to receive <TT>c</TT>.
* @return The UChar32 value put back if successful, U_EOF otherwise.
* @stable ICU 3.0
*/
-U_STABLE UChar32 U_EXPORT2
+U_CAPI UChar32 U_EXPORT2
u_fungetc(UChar32 c,
UFILE *f);
@@ -743,7 +746,7 @@ u_fungetc(UChar32 c,
* @return The number of Unicode characters read.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_file_read(UChar *chars,
int32_t count,
UFILE *f);
@@ -767,7 +770,7 @@ u_file_read(UChar *chars,
* on the result of this function.
* @stable ICU 3.0
*/
-U_STABLE UTransliterator* U_EXPORT2
+U_CAPI UTransliterator* U_EXPORT2
u_fsettransliterator(UFILE *file, UFileDirection direction,
UTransliterator *adopt, UErrorCode *status);
@@ -788,7 +791,7 @@ u_fsettransliterator(UFILE *file, UFileDirection direction,
* does not include the terminating null character.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_sprintf(UChar *buffer,
const char *patternSpecification,
... );
@@ -810,7 +813,7 @@ u_sprintf(UChar *buffer,
* the terminating null character.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_snprintf(UChar *buffer,
int32_t count,
const char *patternSpecification,
@@ -829,7 +832,7 @@ u_snprintf(UChar *buffer,
* @see u_sprintf
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vsprintf(UChar *buffer,
const char *patternSpecification,
va_list ap);
@@ -854,7 +857,7 @@ u_vsprintf(UChar *buffer,
* @see u_sprintf
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vsnprintf(UChar *buffer,
int32_t count,
const char *patternSpecification,
@@ -869,7 +872,7 @@ u_vsnprintf(UChar *buffer,
* @return The number of Unicode characters written to <TT>buffer</TT>.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_sprintf_u(UChar *buffer,
const UChar *patternSpecification,
... );
@@ -890,7 +893,7 @@ u_sprintf_u(UChar *buffer,
* <TT>buffer</TT> had count been sufficiently large.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_snprintf_u(UChar *buffer,
int32_t count,
const UChar *patternSpecification,
@@ -909,7 +912,7 @@ u_snprintf_u(UChar *buffer,
* @see u_sprintf_u
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vsprintf_u(UChar *buffer,
const UChar *patternSpecification,
va_list ap);
@@ -934,7 +937,7 @@ u_vsprintf_u(UChar *buffer,
* @see u_sprintf_u
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vsnprintf_u(UChar *buffer,
int32_t count,
const UChar *patternSpecification,
@@ -952,7 +955,7 @@ u_vsnprintf_u(UChar *buffer,
* if an error occurred.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_sscanf(const UChar *buffer,
const char *patternSpecification,
... );
@@ -971,7 +974,7 @@ u_sscanf(const UChar *buffer,
* @see u_sscanf
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vsscanf(const UChar *buffer,
const char *patternSpecification,
va_list ap);
@@ -986,7 +989,7 @@ u_vsscanf(const UChar *buffer,
* if an error occurred.
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_sscanf_u(const UChar *buffer,
const UChar *patternSpecification,
... );
@@ -1005,7 +1008,7 @@ u_sscanf_u(const UChar *buffer,
* @see u_sscanf_u
* @stable ICU 3.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
u_vsscanf_u(const UChar *buffer,
const UChar *patternSpecification,
va_list ap);
diff --git a/contrib/libs/icu/include/unicode/ustring.h b/contrib/libs/icu/include/unicode/ustring.h
index 245b766545..5452fbe09a 100644
--- a/contrib/libs/icu/include/unicode/ustring.h
+++ b/contrib/libs/icu/include/unicode/ustring.h
@@ -72,7 +72,7 @@
* their occurrence is rare. Almost all characters in modern use require only
* a single UChar code unit (i.e., their code point values are <=0xffff).
*
- * For more details see the User Guide Strings chapter (http://icu-project.org/userguide/strings.html).
+ * For more details see the User Guide Strings chapter (https://unicode-org.github.io/icu/userguide/strings/).
* For a discussion of the handling of unpaired surrogates see also
* Jitterbug 2145 and its icu mailing list proposal on 2002-sep-18.
*/
@@ -89,7 +89,7 @@
* @return The number of UChars in <code>chars</code>, 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 <code>dst</code>.
* @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 <code>dst</code>.
* @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 <code>matchSet</code>, 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 <code>s1</code> is bitwise greater than <code>s2</code>.
* @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 <code>s1</code> is bitwise greater than <code>s2</code>.
* @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 <code>dst</code>.
* @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 <code>dst</code>.
* @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 <code>dst</code>.
* @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 <code>dst</code>.
* @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 <code>dst</code>.
* @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 <code>dst</code>.
* @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 <code>dest</code>
* @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 <code>dest</code>
* @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 <code>dest</code>.
* @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/contrib/libs/icu/include/unicode/utext.h b/contrib/libs/icu/include/unicode/utext.h
index 37d71a3172..c6d1e53a8c 100644
--- a/contrib/libs/icu/include/unicode/utext.h
+++ b/contrib/libs/icu/include/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<=index<limit.
- * If FALSE, then the returned chunk must contain text
+ * If false, then the returned chunk must contain text
* before the index, so that start<index<=limit.
* @return True if the requested index could be accessed. The chunk
* will contain the requested text.
@@ -1114,7 +1114,7 @@ UTextReplace(UText *ut,
* @param nativeStart The index of the start of the region to be copied or moved
* @param nativeLimit The index of the character following the region to be replaced.
* @param nativeDest The 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
@@ -1535,7 +1535,7 @@ struct UText {
* @return pointer to the UText, allocated if necessary, with extra space set up if requested.
* @stable ICU 3.4
*/
-U_STABLE UText * U_EXPORT2
+U_CAPI UText * U_EXPORT2
utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status);
// do not use #ifndef U_HIDE_INTERNAL_API around the following!
diff --git a/contrib/libs/icu/include/unicode/utf.h b/contrib/libs/icu/include/unicode/utf.h
index ef512997f0..c9d5f5785c 100644
--- a/contrib/libs/icu/include/unicode/utf.h
+++ b/contrib/libs/icu/include/unicode/utf.h
@@ -103,7 +103,7 @@
* code point values (0..U+10ffff). They are indicated with negative values instead.
*
* For more information see the ICU User Guide Strings chapter
- * (http://userguide.icu-project.org/strings).
+ * (https://unicode-org.github.io/icu/userguide/strings).
*
* <em>Usage:</em>
* 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/contrib/libs/icu/include/unicode/utf16.h b/contrib/libs/icu/include/unicode/utf16.h
index 9fd7d5c8a7..3902c60e95 100644
--- a/contrib/libs/icu/include/unicode/utf16.h
+++ b/contrib/libs/icu/include/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).
*
* <em>Usage:</em>
* ICU coding guidelines for if() statements should be followed when using these macros.
@@ -34,6 +34,7 @@
#ifndef __UTF16_H__
#define __UTF16_H__
+#include <stdbool.h>
#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<capacity
* @param capacity size of the string buffer
* @param c code point to append
- * @param isError output UBool set to TRUE if an error occurs, otherwise not modified
+ * @param isError output UBool set to true if an error occurs, otherwise not modified
* @see U16_APPEND_UNSAFE
* @stable ICU 2.4
*/
@@ -396,7 +397,7 @@
(s)[(i)++]=(uint16_t)(((c)>>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/contrib/libs/icu/include/unicode/utf8.h b/contrib/libs/icu/include/unicode/utf8.h
index 4987a00e8e..5a07435fcf 100644
--- a/contrib/libs/icu/include/unicode/utf8.h
+++ b/contrib/libs/icu/include/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).
*
* <em>Usage:</em>
* ICU coding guidelines for if() statements should be followed when using these macros.
@@ -34,6 +34,7 @@
#ifndef __UTF8_H__
#define __UTF8_H__
+#include <stdbool.h>
#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<capacity
* @param capacity int32_t size of the string buffer
* @param c UChar32 code point to append
- * @param isError output UBool set to TRUE if an error occurs, otherwise not modified
+ * @param isError output UBool set to true if an error occurs, otherwise not modified
* @see U8_APPEND_UNSAFE
* @stable ICU 2.4
*/
@@ -472,7 +473,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
(s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \
(s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \
} else { \
- (isError)=TRUE; \
+ (isError)=true; \
} \
} UPRV_BLOCK_MACRO_END
diff --git a/contrib/libs/icu/include/unicode/utf_old.h b/contrib/libs/icu/include/unicode/utf_old.h
index b2428e6b31..160f5ad0a9 100644
--- a/contrib/libs/icu/include/unicode/utf_old.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/utmscale.h b/contrib/libs/icu/include/unicode/utmscale.h
index d8b8a2e668..5a0bdc68c6 100644
--- a/contrib/libs/icu/include/unicode/utmscale.h
+++ b/contrib/libs/icu/include/unicode/utmscale.h
@@ -449,7 +449,7 @@ typedef enum UTimeScaleValue {
*
* @stable ICU 3.2
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
utmscale_getTimeScaleValue(UDateTimeScale timeScale, UTimeScaleValue value, UErrorCode *status);
/* Conversion to 'universal time scale' */
@@ -465,7 +465,7 @@ U_STABLE int64_t U_EXPORT2
*
* @stable ICU 3.2
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *status);
/* Conversion from 'universal time scale' */
@@ -481,7 +481,7 @@ U_STABLE int64_t U_EXPORT2
*
* @stable ICU 3.2
*/
-U_STABLE int64_t U_EXPORT2
+U_CAPI int64_t U_EXPORT2
utmscale_toInt64(int64_t universalTime, UDateTimeScale timeScale, UErrorCode *status);
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/include/unicode/utrace.h b/contrib/libs/icu/include/unicode/utrace.h
index 5b4a0497bf..677486f473 100644
--- a/contrib/libs/icu/include/unicode/utrace.h
+++ b/contrib/libs/icu/include/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.
@@ -177,24 +173,23 @@ typedef enum UTraceFunctionNumber {
UTRACE_RES_DATA_LIMIT,
#endif // U_HIDE_INTERNAL_API
-#ifndef U_HIDE_DRAFT_API
/**
* The lowest break iterator location.
- * @draft ICU 67
+ * @stable ICU 67
*/
UTRACE_UBRK_START=0x4000,
/**
* Indicates that a character instance of break iterator was created.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
UTRACE_UBRK_CREATE_CHARACTER = UTRACE_UBRK_START,
/**
* Indicates that a word instance of break iterator was created.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
UTRACE_UBRK_CREATE_WORD,
@@ -204,21 +199,21 @@ typedef enum UTraceFunctionNumber {
* Provides one C-style string to UTraceData: the lb value ("",
* "loose", "strict", or "normal").
*
- * @draft ICU 67
+ * @stable ICU 67
*/
UTRACE_UBRK_CREATE_LINE,
/**
* Indicates that a sentence instance of break iterator was created.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
UTRACE_UBRK_CREATE_SENTENCE,
/**
* Indicates that a title instance of break iterator was created.
*
- * @draft ICU 67
+ * @stable ICU 67
*/
UTRACE_UBRK_CREATE_TITLE,
@@ -228,12 +223,10 @@ typedef enum UTraceFunctionNumber {
* Provides one C-style string to UTraceData: the script code of what
* the break engine cover ("Hani", "Khmr", "Laoo", "Mymr", or "Thai").
*
- * @draft ICU 67
+ * @stable ICU 67
*/
UTRACE_UBRK_CREATE_BREAK_ENGINE,
-#endif // U_HIDE_DRAFT_API
-
#ifndef U_HIDE_INTERNAL_API
/**
* One more than the highest normal break iterator trace location.
@@ -249,7 +242,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 +250,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 +324,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 +338,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 +460,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 +481,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 +498,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/contrib/libs/icu/include/unicode/utrans.h b/contrib/libs/icu/include/unicode/utrans.h
index 021af498a8..1ad7dbda62 100644
--- a/contrib/libs/icu/include/unicode/utrans.h
+++ b/contrib/libs/icu/include/unicode/utrans.h
@@ -17,12 +17,15 @@
#if !UCONFIG_NO_TRANSLITERATION
-#include "unicode/localpointer.h"
#include "unicode/urep.h"
#include "unicode/parseerr.h"
#include "unicode/uenum.h"
#include "unicode/uset.h"
+#if U_SHOW_CPLUSPLUS_API
+#include "unicode/localpointer.h"
+#endif // U_SHOW_CPLUSPLUS_API
+
/********************************************************************
* General Notes
********************************************************************
@@ -188,7 +191,7 @@ typedef struct UTransPosition {
* utrans_xxx() functions, or NULL if the open call fails.
* @stable ICU 2.8
*/
-U_STABLE UTransliterator* U_EXPORT2
+U_CAPI UTransliterator* U_EXPORT2
utrans_openU(const UChar *id,
int32_t idLength,
UTransDirection dir,
@@ -212,7 +215,7 @@ utrans_openU(const UChar *id,
* inverse of trans, or NULL if the open call fails.
* @stable ICU 2.0
*/
-U_STABLE UTransliterator* U_EXPORT2
+U_CAPI UTransliterator* U_EXPORT2
utrans_openInverse(const UTransliterator* trans,
UErrorCode* status);
@@ -226,7 +229,7 @@ utrans_openInverse(const UTransliterator* trans,
* utrans_xxx() functions, or NULL if the clone call fails.
* @stable ICU 2.0
*/
-U_STABLE UTransliterator* U_EXPORT2
+U_CAPI UTransliterator* U_EXPORT2
utrans_clone(const UTransliterator* trans,
UErrorCode* status);
@@ -236,7 +239,7 @@ utrans_clone(const UTransliterator* trans,
* @param trans the transliterator to be closed.
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrans_close(UTransliterator* trans);
#if U_SHOW_CPLUSPLUS_API
@@ -272,7 +275,7 @@ U_NAMESPACE_END
*
* @stable ICU 2.8
*/
-U_STABLE const UChar * U_EXPORT2
+U_CAPI const UChar * U_EXPORT2
utrans_getUnicodeID(const UTransliterator *trans,
int32_t *resultLength);
@@ -290,7 +293,7 @@ utrans_getUnicodeID(const UTransliterator *trans,
* @param status a pointer to the UErrorCode
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrans_register(UTransliterator* adoptedTrans,
UErrorCode* status);
@@ -303,7 +306,7 @@ utrans_register(UTransliterator* adoptedTrans,
* @param idLength the length of id, or -1 if id is zero-terminated
* @stable ICU 2.8
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrans_unregisterID(const UChar* id, int32_t idLength);
/**
@@ -324,7 +327,7 @@ utrans_unregisterID(const UChar* id, int32_t idLength);
* @see UnicodeSet
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrans_setFilter(UTransliterator* trans,
const UChar* filterPattern,
int32_t filterPatternLen,
@@ -337,7 +340,7 @@ utrans_setFilter(UTransliterator* trans,
* @return the number of system transliterators.
* @stable ICU 2.0
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
utrans_countAvailableIDs(void);
/**
@@ -349,7 +352,7 @@ utrans_countAvailableIDs(void);
*
* @stable ICU 2.8
*/
-U_STABLE UEnumeration * U_EXPORT2
+U_CAPI UEnumeration * U_EXPORT2
utrans_openIDs(UErrorCode *pErrorCode);
/********************************************************************
@@ -379,7 +382,7 @@ utrans_openIDs(UErrorCode *pErrorCode);
* @param status a pointer to the UErrorCode
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrans_trans(const UTransliterator* trans,
UReplaceable* rep,
const UReplaceableCallbacks* repFunc,
@@ -430,7 +433,7 @@ utrans_trans(const UTransliterator* trans,
* @param status a pointer to the UErrorCode
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrans_transIncremental(const UTransliterator* trans,
UReplaceable* rep,
const UReplaceableCallbacks* repFunc,
@@ -467,7 +470,7 @@ utrans_transIncremental(const UTransliterator* trans,
* @param status a pointer to the UErrorCode
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrans_transUChars(const UTransliterator* trans,
UChar* text,
int32_t* textLength,
@@ -502,7 +505,7 @@ utrans_transUChars(const UTransliterator* trans,
* @see utrans_transIncremental
* @stable ICU 2.0
*/
-U_STABLE void U_EXPORT2
+U_CAPI void U_EXPORT2
utrans_transIncrementalUChars(const UTransliterator* trans,
UChar* text,
int32_t* textLength,
@@ -515,7 +518,7 @@ utrans_transIncrementalUChars(const UTransliterator* trans,
* transliterator.
*
* @param trans The transliterator
- * @param escapeUnprintable if TRUE then convert unprintable characters to their
+ * @param escapeUnprintable if true then convert unprintable characters to their
* hex escape representations, \\uxxxx or \\Uxxxxxxxx.
* Unprintable characters are those other than
* U+000A, U+0020..U+007E.
@@ -527,7 +530,7 @@ utrans_transIncrementalUChars(const UTransliterator* trans,
* in which case an error is returned).
* @stable ICU 53
*/
-U_STABLE int32_t U_EXPORT2
+U_CAPI int32_t U_EXPORT2
utrans_toRules( const UTransliterator* trans,
UBool escapeUnprintable,
UChar* result, int32_t resultLength,
@@ -537,9 +540,9 @@ utrans_toRules( const UTransliterator* trans,
* Returns the set of all characters that may be modified in the input text by
* this UTransliterator, optionally ignoring the transliterator's current filter.
* @param trans The transliterator.
- * @param ignoreFilter If FALSE, the returned set incorporates the
+ * @param ignoreFilter If false, the returned set incorporates the
* UTransliterator's current filter; if the filter is changed,
- * the return value of this function will change. If TRUE, the
+ * the return value of this function will change. If true, the
* returned set ignores the effect of the UTransliterator's
* current filter.
* @param fillIn Pointer to a USet object to receive the modifiable characters
@@ -552,7 +555,7 @@ utrans_toRules( const UTransliterator* trans,
* error, NULL is returned.
* @stable ICU 53
*/
-U_STABLE USet* U_EXPORT2
+U_CAPI USet* U_EXPORT2
utrans_getSourceSet(const UTransliterator* trans,
UBool ignoreFilter,
USet* fillIn,
diff --git a/contrib/libs/icu/include/unicode/utypes.h b/contrib/libs/icu/include/unicode/utypes.h
index 8d8f54764e..f890d5d1db 100644
--- a/contrib/libs/icu/include/unicode/utypes.h
+++ b/contrib/libs/icu/include/unicode/utypes.h
@@ -400,7 +400,7 @@ typedef double UDate;
* suitable subclass.
*
* For more information, see:
- * http://icu-project.org/userguide/conventions
+ * https://unicode-org.github.io/icu/userguide/dev/codingguidelines#details-about-icu-error-codes
*
* Note: By convention, ICU functions that take a reference (C++) or a pointer
* (C) to a UErrorCode first test:
@@ -479,13 +479,21 @@ 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. */
+ /**
+ * 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.
+ *
+ * @stable ICU 68
+ */
+ U_INPUT_TOO_LONG_ERROR = 31,
#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 +723,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/contrib/libs/icu/include/unicode/uvernum.h b/contrib/libs/icu/include/unicode/uvernum.h
index c66776d10b..42e8865d7e 100644
--- a/contrib/libs/icu/include/unicode/uvernum.h
+++ b/contrib/libs/icu/include/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 70
/** 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 _70
/**
* \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 "70.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 "70"
#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 "70.1"
#endif /* U_HIDE_INTERNAL_API */
/*===========================================================================
diff --git a/contrib/libs/icu/include/unicode/uversion.h b/contrib/libs/icu/include/unicode/uversion.h
index 5700f62cbf..113568df8c 100644
--- a/contrib/libs/icu/include/unicode/uversion.h
+++ b/contrib/libs/icu/include/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/contrib/libs/icu/include/unicode/vtzone.h b/contrib/libs/icu/include/unicode/vtzone.h
index 641adec512..e7d2f51541 100644
--- a/contrib/libs/icu/include/unicode/vtzone.h
+++ b/contrib/libs/icu/include/unicode/vtzone.h
@@ -72,7 +72,7 @@ public:
*semantically equal.
* @stable ICU 3.8
*/
- virtual UBool operator==(const TimeZone& that) const;
+ virtual bool operator==(const TimeZone& that) const override;
/**
* Return true if the given <code>TimeZone</code> objects are
@@ -82,9 +82,7 @@ public:
* semantically unequal.
* @stable ICU 3.8
*/
-#if __cplusplus > 201703L
- virtual UBool operator!=(const TimeZone& that) const;
-#endif
+ virtual bool operator!=(const TimeZone& that) const;
/**
* Create a <code>VTimeZone</code> instance by the time zone ID.
@@ -121,7 +119,7 @@ public:
* created from VTIMEZONE data, the initial value is set by the TZURL property value
* in the data. Otherwise, the initial value is not set.
* @param url Receives the RFC2445 TZURL property value.
- * @return TRUE if TZURL attribute is available and value is set.
+ * @return true if TZURL attribute is available and value is set.
* @stable ICU 3.8
*/
UBool getTZURL(UnicodeString& url) const;
@@ -138,7 +136,7 @@ public:
* was created from VTIMEZONE data, the initial value is set by the LAST-MODIFIED property
* value in the data. Otherwise, the initial value is not set.
* @param lastModified Receives the last modified date.
- * @return TRUE if lastModified attribute is available and value is set.
+ * @return true if lastModified attribute is available and value is set.
* @stable ICU 3.8
*/
UBool getLastModified(UDate& lastModified) const;
@@ -159,7 +157,7 @@ public:
void write(UnicodeString& result, UErrorCode& status) const;
/**
- * Writes RFC2445 VTIMEZONE data for this time zone applicalbe
+ * Writes RFC2445 VTIMEZONE data for this time zone applicable
* for dates after the specified start time.
* @param start The start date.
* @param result Output param to filled in with the VTIMEZONE data.
@@ -169,7 +167,7 @@ public:
void write(UDate start, UnicodeString& result, UErrorCode& status) const;
/**
- * Writes RFC2445 VTIMEZONE data applicalbe for the specified date.
+ * Writes RFC2445 VTIMEZONE data applicable for the specified date.
* Some common iCalendar implementations can only handle a single time
* zone property or a pair of standard and daylight time properties using
* BYDAY rule with day of week (such as BYDAY=1SUN). This method produce
@@ -189,7 +187,7 @@ public:
* @return A new copy of this TimeZone object.
* @stable ICU 3.8
*/
- virtual VTimeZone* clone() const;
+ virtual VTimeZone* clone() const override;
/**
* Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add
@@ -216,7 +214,7 @@ public:
* @stable ICU 3.8
*/
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
- uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const;
+ uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const override;
/**
* Gets the time zone offset, for current date, modified in case of
@@ -239,7 +237,7 @@ public:
*/
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
uint8_t dayOfWeek, int32_t millis,
- int32_t monthLength, UErrorCode& status) const;
+ int32_t monthLength, UErrorCode& status) const override;
/**
* Returns the time zone raw and GMT offset for the given moment
@@ -264,7 +262,18 @@ public:
* @stable ICU 3.8
*/
virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
- int32_t& dstOffset, UErrorCode& ec) const;
+ int32_t& dstOffset, UErrorCode& ec) const override;
+
+#ifndef U_FORCE_HIDE_DRAFT_API
+ /**
+ * Get time zone offsets from local wall time.
+ * @draft ICU 69
+ */
+ virtual void getOffsetFromLocal(
+ UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
+ UTimeZoneLocalOption duplicatedTimeOpt,
+ int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override;
+#endif /* U_FORCE_HIDE_DRAFT_API */
/**
* Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
@@ -273,7 +282,7 @@ public:
* @param offsetMillis The new raw GMT offset for this time zone.
* @stable ICU 3.8
*/
- virtual void setRawOffset(int32_t offsetMillis);
+ virtual void setRawOffset(int32_t offsetMillis) override;
/**
* Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
@@ -282,7 +291,7 @@ public:
* @return The TimeZone's raw GMT offset.
* @stable ICU 3.8
*/
- virtual int32_t getRawOffset(void) const;
+ virtual int32_t getRawOffset(void) const override;
/**
* Queries if this time zone uses daylight savings time.
@@ -290,7 +299,7 @@ public:
* false, otherwise.
* @stable ICU 3.8
*/
- virtual UBool useDaylightTime(void) const;
+ virtual UBool useDaylightTime(void) const override;
#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
@@ -306,7 +315,7 @@ public:
* false, otherwise.
* @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead.
*/
- virtual UBool inDaylightTime(UDate date, UErrorCode& status) const;
+ virtual UBool inDaylightTime(UDate date, UErrorCode& status) const override;
#endif // U_FORCE_HIDE_DEPRECATED_API
/**
@@ -317,27 +326,27 @@ public:
* with the possible exception of the ID
* @stable ICU 3.8
*/
- virtual UBool hasSameRules(const TimeZone& other) const;
+ virtual UBool hasSameRules(const TimeZone& other) const override;
/**
* Gets the first time zone transition after the base time.
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
- virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
+ virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const override;
/**
* Gets the most recent time zone transition before the base time.
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
- virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
+ virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const override;
/**
* Returns the number of <code>TimeZoneRule</code>s which represents time transitions,
@@ -347,7 +356,7 @@ public:
* @return The number of <code>TimeZoneRule</code>s representing time transitions.
* @stable ICU 3.8
*/
- virtual int32_t countTransitionRules(UErrorCode& status) const;
+ virtual int32_t countTransitionRules(UErrorCode& status) const override;
/**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
@@ -366,7 +375,7 @@ public:
* @stable ICU 3.8
*/
virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
- const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const;
+ const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const override;
private:
enum { DEFAULT_VTIMEZONE_LINES = 100 };
@@ -452,7 +461,7 @@ public:
* other classes have different class IDs.
* @stable ICU 3.8
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
};
U_NAMESPACE_END