mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +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
|
||||
/*
|
||||
*******************************************************************************
|
||||
|
|
@ -52,7 +52,7 @@ U_NAMESPACE_BEGIN
|
|||
// -------------------------------------
|
||||
|
||||
BreakIterator*
|
||||
BreakIterator::buildInstance(const Locale& loc, const char *type, int32_t kind, UErrorCode &status)
|
||||
BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &status)
|
||||
{
|
||||
char fnbuff[256];
|
||||
char ext[4]={'\0'};
|
||||
|
|
@ -121,7 +121,6 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, int32_t kind,
|
|||
U_LOCALE_BASED(locBased, *(BreakIterator*)result);
|
||||
locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status),
|
||||
actualLocale.data());
|
||||
result->setBreakType(kind);
|
||||
}
|
||||
|
||||
ures_close(b);
|
||||
|
|
@ -195,7 +194,7 @@ BreakIterator::getAvailableLocales(int32_t& count)
|
|||
|
||||
// ------------------------------------------
|
||||
//
|
||||
// Default constructor and destructor
|
||||
// Constructors, destructor and assignment operator
|
||||
//
|
||||
//-------------------------------------------
|
||||
|
||||
|
|
@ -204,6 +203,19 @@ BreakIterator::BreakIterator()
|
|||
*validLocale = *actualLocale = 0;
|
||||
}
|
||||
|
||||
BreakIterator::BreakIterator(const BreakIterator &other) : UObject(other) {
|
||||
uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale));
|
||||
uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale));
|
||||
}
|
||||
|
||||
BreakIterator &BreakIterator::operator =(const BreakIterator &other) {
|
||||
if (this != &other) {
|
||||
uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale));
|
||||
uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
BreakIterator::~BreakIterator()
|
||||
{
|
||||
}
|
||||
|
|
@ -265,7 +277,7 @@ ICUBreakIteratorService::~ICUBreakIteratorService() {}
|
|||
// defined in ucln_cmn.h
|
||||
U_NAMESPACE_END
|
||||
|
||||
static icu::UInitOnce gInitOnce;
|
||||
static icu::UInitOnce gInitOnceBrkiter;
|
||||
static icu::ICULocaleService* gService = NULL;
|
||||
|
||||
|
||||
|
|
@ -280,7 +292,7 @@ static UBool U_CALLCONV breakiterator_cleanup(void) {
|
|||
delete gService;
|
||||
gService = NULL;
|
||||
}
|
||||
gInitOnce.reset();
|
||||
gInitOnceBrkiter.reset();
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -296,7 +308,7 @@ initService(void) {
|
|||
static ICULocaleService*
|
||||
getService(void)
|
||||
{
|
||||
umtx_initOnce(gInitOnce, &initService);
|
||||
umtx_initOnce(gInitOnceBrkiter, &initService);
|
||||
return gService;
|
||||
}
|
||||
|
||||
|
|
@ -306,7 +318,7 @@ getService(void)
|
|||
static inline UBool
|
||||
hasService(void)
|
||||
{
|
||||
return !gInitOnce.isReset() && getService() != NULL;
|
||||
return !gInitOnceBrkiter.isReset() && getService() != NULL;
|
||||
}
|
||||
|
||||
// -------------------------------------
|
||||
|
|
@ -400,10 +412,10 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
|
|||
BreakIterator *result = NULL;
|
||||
switch (kind) {
|
||||
case UBRK_CHARACTER:
|
||||
result = BreakIterator::buildInstance(loc, "grapheme", kind, status);
|
||||
result = BreakIterator::buildInstance(loc, "grapheme", status);
|
||||
break;
|
||||
case UBRK_WORD:
|
||||
result = BreakIterator::buildInstance(loc, "word", kind, status);
|
||||
result = BreakIterator::buildInstance(loc, "word", status);
|
||||
break;
|
||||
case UBRK_LINE:
|
||||
uprv_strcpy(lbType, "line");
|
||||
|
|
@ -416,10 +428,10 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
|
|||
uprv_strcat(lbType, lbKeyValue);
|
||||
}
|
||||
}
|
||||
result = BreakIterator::buildInstance(loc, lbType, kind, status);
|
||||
result = BreakIterator::buildInstance(loc, lbType, status);
|
||||
break;
|
||||
case UBRK_SENTENCE:
|
||||
result = BreakIterator::buildInstance(loc, "sentence", kind, status);
|
||||
result = BreakIterator::buildInstance(loc, "sentence", status);
|
||||
#if !UCONFIG_NO_FILTERED_BREAK_ITERATION
|
||||
{
|
||||
char ssKeyValue[kKeyValueLenMax] = {0};
|
||||
|
|
@ -436,7 +448,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
|
|||
#endif
|
||||
break;
|
||||
case UBRK_TITLE:
|
||||
result = BreakIterator::buildInstance(loc, "title", kind, status);
|
||||
result = BreakIterator::buildInstance(loc, "title", status);
|
||||
break;
|
||||
default:
|
||||
status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue