mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 00:47:31 +09:00
Issue #1971 - Part 2: Update ICU source to 63.2.
This commit is contained in:
parent
8df84683be
commit
1e69214382
3160 changed files with 275815 additions and 234203 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
|
|
@ -230,7 +230,8 @@ typedef enum USentenceBreakTag {
|
|||
* @param locale The locale specifying the text-breaking conventions. Note that
|
||||
* locale keys such as "lb" and "ss" may be used to modify text break behavior,
|
||||
* see general discussion of BreakIterator C API.
|
||||
* @param text The text to be iterated over.
|
||||
* @param text The text to be iterated over. May be null, in which case ubrk_setText() is
|
||||
* used to specify the text to be iterated.
|
||||
* @param textLength The number of characters in text, or -1 if null-terminated.
|
||||
* @param status A UErrorCode to receive any errors.
|
||||
* @return A UBreakIterator for the specified locale.
|
||||
|
|
@ -267,6 +268,31 @@ ubrk_openRules(const UChar *rules,
|
|||
UParseError *parseErr,
|
||||
UErrorCode *status);
|
||||
|
||||
/**
|
||||
* Open a new UBreakIterator for locating text boundaries using precompiled binary rules.
|
||||
* Opening a UBreakIterator this way is substantially faster than using ubrk_openRules.
|
||||
* Binary rules may be obtained using ubrk_getBinaryRules. The compiled rules are not
|
||||
* compatible across different major versions of ICU, nor across platforms of different
|
||||
* endianness or different base character set family (ASCII vs EBCDIC).
|
||||
* @param binaryRules A set of compiled binary rules specifying the text breaking
|
||||
* conventions. Ownership of the storage containing the compiled
|
||||
* rules remains with the caller of this function. The compiled
|
||||
* rules must not be modified or deleted during the life of the
|
||||
* break iterator.
|
||||
* @param rulesLength The length of binaryRules in bytes; must be >= 0.
|
||||
* @param text The text to be iterated over. May be null, in which case
|
||||
* ubrk_setText() is used to specify the text to be iterated.
|
||||
* @param textLength The number of characters in text, or -1 if null-terminated.
|
||||
* @param status Pointer to UErrorCode to receive any errors.
|
||||
* @return UBreakIterator for the specified rules.
|
||||
* @see ubrk_getBinaryRules
|
||||
* @stable ICU 59
|
||||
*/
|
||||
U_STABLE UBreakIterator* U_EXPORT2
|
||||
ubrk_openBinaryRules(const uint8_t *binaryRules, int32_t rulesLength,
|
||||
const UChar * text, int32_t textLength,
|
||||
UErrorCode * status);
|
||||
|
||||
/**
|
||||
* Thread safe cloning operation
|
||||
* @param bi iterator to be cloned
|
||||
|
|
@ -481,7 +507,7 @@ ubrk_countAvailable(void);
|
|||
|
||||
|
||||
/**
|
||||
* Returns true if the specfied position is a boundary position. As a side
|
||||
* Returns true if the specified position is a boundary position. As a side
|
||||
* effect, leaves the iterator pointing to the first boundary position at
|
||||
* or after "offset".
|
||||
* @param bi The break iterator to use.
|
||||
|
|
@ -515,7 +541,7 @@ ubrk_getRuleStatus(UBreakIterator *bi);
|
|||
* @param fillInVec an array to be filled in with the status values.
|
||||
* @param capacity the length of the supplied vector. A length of zero causes
|
||||
* the function to return the number of status values, in the
|
||||
* normal way, without attemtping to store any values.
|
||||
* normal way, without attempting to store any values.
|
||||
* @param status receives error codes.
|
||||
* @return The number of rule status values from rules that determined
|
||||
* the most recent boundary returned by the break iterator.
|
||||
|
|
@ -566,6 +592,37 @@ ubrk_refreshUText(UBreakIterator *bi,
|
|||
UText *text,
|
||||
UErrorCode *status);
|
||||
|
||||
|
||||
/**
|
||||
* Get a compiled binary version of the rules specifying the behavior of a UBreakIterator.
|
||||
* The binary rules may be used with ubrk_openBinaryRules to open a new UBreakIterator
|
||||
* more quickly than using ubrk_openRules. The compiled rules are not compatible across
|
||||
* different major versions of ICU, nor across platforms of different endianness or
|
||||
* different base character set family (ASCII vs EBCDIC). Supports preflighting (with
|
||||
* binaryRules=NULL and rulesCapacity=0) to get the rules length without copying them to
|
||||
* the binaryRules buffer. However, whether preflighting or not, if the actual length
|
||||
* is greater than INT32_MAX, then the function returns 0 and sets *status to
|
||||
* U_INDEX_OUTOFBOUNDS_ERROR.
|
||||
|
||||
* @param bi The break iterator to use.
|
||||
* @param binaryRules Buffer to receive the compiled binary rules; set to NULL for
|
||||
* preflighting.
|
||||
* @param rulesCapacity Capacity (in bytes) of the binaryRules buffer; set to 0 for
|
||||
* preflighting. Must be >= 0.
|
||||
* @param status Pointer to UErrorCode to receive any errors, such as
|
||||
* U_BUFFER_OVERFLOW_ERROR, U_INDEX_OUTOFBOUNDS_ERROR, or
|
||||
* U_ILLEGAL_ARGUMENT_ERROR.
|
||||
* @return The actual byte length of the binary rules, if <= INT32_MAX;
|
||||
* otherwise 0. If not preflighting and this is larger than
|
||||
* rulesCapacity, *status will be set to an error.
|
||||
* @see ubrk_openBinaryRules
|
||||
* @stable ICU 59
|
||||
*/
|
||||
U_STABLE int32_t U_EXPORT2
|
||||
ubrk_getBinaryRules(UBreakIterator *bi,
|
||||
uint8_t * binaryRules, int32_t rulesCapacity,
|
||||
UErrorCode * status);
|
||||
|
||||
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue