Bug 1792775 - Part 2: Update in-tree ICU to 72. r=platform-i18n-reviewers,dminor

Update to ICU 72 by running `./update-icu.sh https://github.com/unicode-org/icu.git maint/maint-72`.

Differential Revision: https://phabricator.services.mozilla.com/D160180
This commit is contained in:
André Bargull 2022-11-23 08:38:46 +00:00
Родитель aa4f2ac584
Коммит 409ed6f810
1654 изменённых файлов: 117835 добавлений и 46659 удалений

Двоичные данные
config/external/icu/data/icudt71l.dat → config/external/icu/data/icudt72l.dat поставляемый

Двоичный файл не отображается.

4
config/external/icu/i18n/sources.mozbuild поставляемый
Просмотреть файл

@ -42,6 +42,7 @@ sources = [
'/intl/icu/source/i18n/decContext.cpp',
'/intl/icu/source/i18n/decimfmt.cpp',
'/intl/icu/source/i18n/decNumber.cpp',
'/intl/icu/source/i18n/displayoptions.cpp',
'/intl/icu/source/i18n/double-conversion-bignum-dtoa.cpp',
'/intl/icu/source/i18n/double-conversion-bignum.cpp',
'/intl/icu/source/i18n/double-conversion-cached-powers.cpp',
@ -257,6 +258,7 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/datefmt.h',
'/intl/icu/source/i18n/unicode/dcfmtsym.h',
'/intl/icu/source/i18n/unicode/decimfmt.h',
'/intl/icu/source/i18n/unicode/displayoptions.h',
'/intl/icu/source/i18n/unicode/dtfmtsym.h',
'/intl/icu/source/i18n/unicode/dtitvfmt.h',
'/intl/icu/source/i18n/unicode/dtitvinf.h',
@ -310,6 +312,7 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/udat.h',
'/intl/icu/source/i18n/unicode/udateintervalformat.h',
'/intl/icu/source/i18n/unicode/udatpg.h',
'/intl/icu/source/i18n/unicode/udisplayoptions.h',
'/intl/icu/source/i18n/unicode/ufieldpositer.h',
'/intl/icu/source/i18n/unicode/uformattable.h',
'/intl/icu/source/i18n/unicode/uformattedvalue.h',
@ -318,7 +321,6 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/ulocdata.h',
'/intl/icu/source/i18n/unicode/umsg.h',
'/intl/icu/source/i18n/unicode/unirepl.h',
'/intl/icu/source/i18n/unicode/unounclass.h',
'/intl/icu/source/i18n/unicode/unum.h',
'/intl/icu/source/i18n/unicode/unumberformatter.h',
'/intl/icu/source/i18n/unicode/unumberrangeformatter.h',

Просмотреть файл

@ -1,5 +1,5 @@
commit c205e7ee49a7086a28b9c275fcfdac9ca3dc815d
Author: yumaoka <y.umaoka@gmail.com>
Date: Wed Mar 30 14:47:46 2022 -0400
commit ff3514f257ea10afe7e710e9f946f68d256704b1
Author: Peter Edberg <pedberg@unicode.org>
Date: Thu Oct 13 13:44:35 2022 -0700
ICU-21971 Added a new numeric currecny code SLE/695 for Sierra Leone Leone.
ICU-21958 integrate CLDR release-42-beta5 to ICU main for 72

Просмотреть файл

@ -341,7 +341,7 @@ $(top_builddir)/config/icu-config: $(top_builddir)/Makefile $(top_srcdir)/config
chmod u+w $@
@echo "# Following from icu/icu4c/source/config/Makefile.inc" >> $@
LC_ALL=C $(SED) -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@
@echo "# Following from @platform_make_fragment@" >> $@
@echo "# Following from @platform_make_fragment_name@" >> $@
LC_ALL=C $(SED) -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@
cat $(top_srcdir)/config/icu-config-bottom >> $@
chmod u-w $@
@ -375,7 +375,7 @@ icu4j-data-install icu4j-data: all tests
# For updating Windows makefiles
WINDOWS_UPDATEFILES=$(srcdir)/data/makedata.mak $(shell find $(srcdir) -name '*.vcproj' -o -name '*.vcxproj')
WINDOWS_UPDATEFILES=$(srcdir)/data/makedata.mak $(srcdir)/allinone/Build.Windows.IcuVersion.props
WINDOWS_UPDATEFILES_SED=config/windows-update.sed

Просмотреть файл

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html -->
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This file is used to set the ICU Major Version number, which is used as a suffix on various file names in other Visual Studio projects. -->
<PropertyGroup>
<IcuMajorVersion>72</IcuMajorVersion>
</PropertyGroup>
</Project>

Просмотреть файл

@ -9,14 +9,16 @@
<BuildToolVersion>$(VisualStudioVersion)</BuildToolVersion>
<!-- Only use the MSBuildToolsVersion if we don't have the VisualStudioVersion and MSBuildToolsVersion is set to something other than Current. -->
<BuildToolVersion Condition="'$(BuildToolVersion)'=='' and '$(MSBuildToolsVersion)' != 'Current'">$(MSBuildToolsVersion)</BuildToolVersion>
<!-- Note:
<!-- Version Note:
v140 is the Visual Studio 2015 toolset. (14.0)
v141 is the Visual Studio 2017 toolset. (15.0)
v142 is the Visual Studio 2019 toolset. (16.0)
v143 is the Visual Studio 2022 toolset. (17.0)
-->
<AutoDetectedPlatformToolset Condition="'$(BuildToolVersion)'=='14.0'">v140</AutoDetectedPlatformToolset>
<AutoDetectedPlatformToolset Condition="'$(BuildToolVersion)'=='15.0'">v141</AutoDetectedPlatformToolset>
<AutoDetectedPlatformToolset Condition="'$(BuildToolVersion)'=='16.0'">v142</AutoDetectedPlatformToolset>
<AutoDetectedPlatformToolset Condition="'$(BuildToolVersion)'=='17.0'">v143</AutoDetectedPlatformToolset>
</PropertyGroup>
<PropertyGroup Label="EmptyDefaultPlatformToolset">
<DefaultPlatformToolset Condition=" '$(DefaultPlatformToolset)' == '' ">$(AutoDetectedPlatformToolset)</DefaultPlatformToolset>
@ -30,11 +32,11 @@
If not already set, use the latest installed version of the Windows 10 SDK.
The Windows 10 SDK is backwards compatible to Windows 7, as long as WINVER and _WIN32_WINNT are set before compiling.
Note:
- With VS2019, using a value of "10.0" means that it will use the latest installed version.
- With VS2019, VS2022 using a value of "10.0" means that it will use the latest installed version.
- With VS2017, we need to manually detect the latest SDK version from the registry.
- With VS2015, use the Windows 8.1 SDK.
-->
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and '$(PlatformToolset)'=='v142'">
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and ('$(PlatformToolset)'=='v142' or '$(PlatformToolset)'=='v143')">
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and ('$(PlatformToolset)'=='v141' or '$(AutodetectWin10SDK)'=='true')">

Просмотреть файл

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html -->
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This file is used to set default configuration options for all non-UWP Visual Studio projects. -->
<!-- The following import will set the ICU Major Version number. -->
<Import Project="Build.Windows.IcuVersion.props" />
<!-- These are the default project configurations for building. -->
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">

Просмотреть файл

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html -->
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- The following import will set the ICU Major Version number. -->
<Import Project="Build.Windows.IcuVersion.props" />
<!-- This file is used to set common configuration options for all *_uwp projects. -->
<PropertyGroup>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>

Просмотреть файл

@ -37,23 +37,23 @@ Appendable::appendString(const UChar *s, int32_t length) {
UChar c;
while((c=*s++)!=0) {
if(!appendCodeUnit(c)) {
return FALSE;
return false;
}
}
} else if(length>0) {
const UChar *limit=s+length;
do {
if(!appendCodeUnit(*s++)) {
return FALSE;
return false;
}
} while(s<limit);
}
return TRUE;
return true;
}
UBool
Appendable::reserveAppendCapacity(int32_t /*appendCapacity*/) {
return TRUE;
return true;
}
UChar *

Просмотреть файл

@ -309,9 +309,9 @@ BMPSet::contains(UChar32 c) const {
// surrogate or supplementary code point
return containsSlow(c, list4kStarts[0xd], list4kStarts[0x11]);
} else {
// Out-of-range code points get FALSE, consistent with long-standing
// Out-of-range code points get false, consistent with long-standing
// behavior of UnicodeSet::contains(c).
return FALSE;
return false;
}
}

Просмотреть файл

@ -261,10 +261,10 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) {
const UChar *extStart = u_memrchr(dictfname, 0x002e, dictnlength); // last dot
if (extStart != NULL) {
int32_t len = (int32_t)(extStart - dictfname);
ext.appendInvariantChars(UnicodeString(FALSE, extStart + 1, dictnlength - len - 1), status);
ext.appendInvariantChars(UnicodeString(false, extStart + 1, dictnlength - len - 1), status);
dictnlength = len;
}
dictnbuf.appendInvariantChars(UnicodeString(FALSE, dictfname, dictnlength), status);
dictnbuf.appendInvariantChars(UnicodeString(false, dictfname, dictnlength), status);
ures_close(b);
UDataMemory *file = udata_open(U_ICUDATA_BRKITR, ext.data(), dictnbuf.data(), &status);

Просмотреть файл

@ -279,7 +279,7 @@ ICUBreakIteratorService::~ICUBreakIteratorService() {}
// defined in ucln_cmn.h
U_NAMESPACE_END
static icu::UInitOnce gInitOnceBrkiter = U_INITONCE_INITIALIZER;
static icu::UInitOnce gInitOnceBrkiter {};
static icu::ICULocaleService* gService = NULL;
@ -296,7 +296,7 @@ static UBool U_CALLCONV breakiterator_cleanup(void) {
}
gInitOnceBrkiter.reset();
#endif
return TRUE;
return true;
}
U_CDECL_END
U_NAMESPACE_BEGIN
@ -347,7 +347,7 @@ BreakIterator::unregister(URegistryKey key, UErrorCode& status)
}
status = U_MEMORY_ALLOCATION_ERROR;
}
return FALSE;
return false;
}
// -------------------------------------

Просмотреть файл

@ -20,7 +20,7 @@ U_NAMESPACE_BEGIN
UBool
ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Length,
ByteSink &sink, Edits *edits, UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) { return FALSE; }
if (U_FAILURE(errorCode)) { return false; }
char scratch[200];
int32_t s8Length = 0;
for (int32_t i = 0; i < s16Length;) {
@ -44,7 +44,7 @@ ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Lengt
}
if (j > (INT32_MAX - s8Length)) {
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
return FALSE;
return false;
}
sink.Append(buffer, j);
s8Length += j;
@ -52,17 +52,17 @@ ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Lengt
if (edits != nullptr) {
edits->addReplace(length, s8Length);
}
return TRUE;
return true;
}
UBool
ByteSinkUtil::appendChange(const uint8_t *s, const uint8_t *limit,
const char16_t *s16, int32_t s16Length,
ByteSink &sink, Edits *edits, UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) { return FALSE; }
if (U_FAILURE(errorCode)) { return false; }
if ((limit - s) > INT32_MAX) {
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
return FALSE;
return false;
}
return appendChange((int32_t)(limit - s), s16, s16Length, sink, edits, errorCode);
}
@ -109,16 +109,16 @@ UBool
ByteSinkUtil::appendUnchanged(const uint8_t *s, const uint8_t *limit,
ByteSink &sink, uint32_t options, Edits *edits,
UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) { return FALSE; }
if (U_FAILURE(errorCode)) { return false; }
if ((limit - s) > INT32_MAX) {
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
return FALSE;
return false;
}
int32_t length = (int32_t)(limit - s);
if (length > 0) {
appendNonEmptyUnchanged(s, length, sink, options, edits);
}
return TRUE;
return true;
}
CharStringByteSink::CharStringByteSink(CharString* dest) : dest_(*dest) {

Просмотреть файл

@ -4,6 +4,9 @@
// bytesinkutil.h
// created: 2017sep14 Markus W. Scherer
#ifndef BYTESINKUTIL_H
#define BYTESINKUTIL_H
#include "unicode/utypes.h"
#include "unicode/bytestream.h"
#include "unicode/edits.h"
@ -81,3 +84,5 @@ private:
};
U_NAMESPACE_END
#endif //BYTESINKUTIL_H

Просмотреть файл

@ -30,14 +30,14 @@ void ByteSink::Flush() {}
CheckedArrayByteSink::CheckedArrayByteSink(char* outbuf, int32_t capacity)
: outbuf_(outbuf), capacity_(capacity < 0 ? 0 : capacity),
size_(0), appended_(0), overflowed_(FALSE) {
size_(0), appended_(0), overflowed_(false) {
}
CheckedArrayByteSink::~CheckedArrayByteSink() {}
CheckedArrayByteSink& CheckedArrayByteSink::Reset() {
size_ = appended_ = 0;
overflowed_ = FALSE;
overflowed_ = false;
return *this;
}
@ -48,14 +48,14 @@ void CheckedArrayByteSink::Append(const char* bytes, int32_t n) {
if (n > (INT32_MAX - appended_)) {
// TODO: Report as integer overflow, not merely buffer overflow.
appended_ = INT32_MAX;
overflowed_ = TRUE;
overflowed_ = true;
return;
}
appended_ += n;
int32_t available = capacity_ - size_;
if (n > available) {
n = available;
overflowed_ = TRUE;
overflowed_ = true;
}
if (n > 0 && bytes != (outbuf_ + size_)) {
uprv_memcpy(outbuf_ + size_, bytes, n);

Просмотреть файл

@ -337,13 +337,13 @@ BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length,
}
} else {
uniqueValue=value;
haveUniqueValue=TRUE;
haveUniqueValue=true;
}
} else {
if(!findUniqueValue(pos+value, haveUniqueValue, uniqueValue)) {
return NULL;
}
haveUniqueValue=TRUE;
haveUniqueValue=true;
}
} while(--length>1);
return pos+1; // ignore the last comparison byte
@ -359,9 +359,9 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u
}
pos=findUniqueValueFromBranch(pos, node+1, haveUniqueValue, uniqueValue);
if(pos==NULL) {
return FALSE;
return false;
}
haveUniqueValue=TRUE;
haveUniqueValue=true;
} else if(node<kMinValueLead) {
// linear-match node
pos+=node-kMinLinearMatch+1; // Ignore the match bytes.
@ -370,14 +370,14 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u
int32_t value=readValue(pos, node>>1);
if(haveUniqueValue) {
if(value!=uniqueValue) {
return FALSE;
return false;
}
} else {
uniqueValue=value;
haveUniqueValue=TRUE;
haveUniqueValue=true;
}
if(isFinal) {
return TRUE;
return true;
}
pos=skipValue(pos, node);
}

Просмотреть файл

@ -231,7 +231,7 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err
}
uprv_sortArray(elements, elementsLength, (int32_t)sizeof(BytesTrieElement),
compareElementStrings, strings,
FALSE, // need not be a stable sort
false, // need not be a stable sort
&errorCode);
if(U_FAILURE(errorCode)) {
return;
@ -375,7 +375,7 @@ BytesTrieBuilder::createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t le
UBool
BytesTrieBuilder::ensureCapacity(int32_t length) {
if(bytes==NULL) {
return FALSE; // previous memory allocation had failed
return false; // previous memory allocation had failed
}
if(length>bytesCapacity) {
int32_t newCapacity=bytesCapacity;
@ -388,7 +388,7 @@ BytesTrieBuilder::ensureCapacity(int32_t length) {
uprv_free(bytes);
bytes=NULL;
bytesCapacity=0;
return FALSE;
return false;
}
uprv_memcpy(newBytes+(newCapacity-bytesLength),
bytes+(bytesCapacity-bytesLength), bytesLength);
@ -396,7 +396,7 @@ BytesTrieBuilder::ensureCapacity(int32_t length) {
bytes=newBytes;
bytesCapacity=newCapacity;
}
return TRUE;
return true;
}
int32_t
@ -463,7 +463,7 @@ int32_t
BytesTrieBuilder::writeValueAndType(UBool hasValue, int32_t value, int32_t node) {
int32_t offset=write(node);
if(hasValue) {
offset=writeValueAndFinal(value, FALSE);
offset=writeValueAndFinal(value, false);
}
return offset;
}

Просмотреть файл

@ -101,12 +101,12 @@ BytesTrie::Iterator::hasNext() const { return pos_!=NULL || !stack_->isEmpty();
UBool
BytesTrie::Iterator::next(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
const uint8_t *pos=pos_;
if(pos==NULL) {
if(stack_->isEmpty()) {
return FALSE;
return false;
}
// Pop the state off the stack and continue with the next outbound edge of
// the branch node.
@ -119,7 +119,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
if(length>1) {
pos=branchNext(pos, length, errorCode);
if(pos==NULL) {
return TRUE; // Reached a final value.
return true; // Reached a final value.
}
} else {
str_->append((char)*pos++, errorCode);
@ -141,7 +141,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
} else {
pos_=skipValue(pos, node);
}
return TRUE;
return true;
}
if(maxLength_>0 && str_->length()==maxLength_) {
return truncateAndStop();
@ -152,7 +152,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
}
pos=branchNext(pos, node+1, errorCode);
if(pos==NULL) {
return TRUE; // Reached a final value.
return true; // Reached a final value.
}
} else {
// Linear-match node, append length bytes to str_.
@ -177,7 +177,7 @@ UBool
BytesTrie::Iterator::truncateAndStop() {
pos_=NULL;
value_=-1; // no real value for str
return TRUE;
return true;
}
// Branch node, needs to take the first outbound edge and push state for the rest.

Просмотреть файл

@ -119,7 +119,7 @@ UnicodeString CanonicalIterator::getSource() {
* Resets the iterator so that one can start again from the beginning.
*/
void CanonicalIterator::reset() {
done = FALSE;
done = false;
for (int i = 0; i < current_length; ++i) {
current[i] = 0;
}
@ -151,7 +151,7 @@ UnicodeString CanonicalIterator::next() {
for (i = current_length - 1; ; --i) {
if (i < 0) {
done = TRUE;
done = true;
break;
}
current[i]++;
@ -176,7 +176,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st
if(U_FAILURE(status)) {
return;
}
done = FALSE;
done = false;
cleanPieces();
@ -521,7 +521,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con
int32_t decompLen=decompString.length();
// See if it matches the start of segment (at segmentPos)
UBool ok = FALSE;
UBool ok = false;
UChar32 cp;
int32_t decompPos = 0;
UChar32 decompCp;
@ -537,7 +537,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con
if (decompPos == decompLen) { // done, have all decomp characters!
temp.append(segment+i, segLen-i);
ok = TRUE;
ok = true;
break;
}
U16_NEXT(decomp, decompPos, decompLen, decompCp);

Просмотреть файл

@ -36,11 +36,11 @@ namespace {
UBool U_CALLCONV characterproperties_cleanup();
constexpr int32_t NUM_INCLUSIONS = UPROPS_SRC_COUNT + UCHAR_INT_LIMIT - UCHAR_INT_START;
constexpr int32_t NUM_INCLUSIONS = UPROPS_SRC_COUNT + (UCHAR_INT_LIMIT - UCHAR_INT_START);
struct Inclusion {
UnicodeSet *fSet = nullptr;
UInitOnce fInitOnce = U_INITONCE_INITIALIZER;
UInitOnce fInitOnce {};
};
Inclusion gInclusions[NUM_INCLUSIONS]; // cached getInclusions()
@ -85,7 +85,7 @@ UBool U_CALLCONV characterproperties_cleanup() {
ucptrie_close(reinterpret_cast<UCPTrie *>(maps[i]));
maps[i] = nullptr;
}
return TRUE;
return true;
}
void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) {
@ -210,7 +210,7 @@ const UnicodeSet *getInclusionsForSource(UPropertySource src, UErrorCode &errorC
void U_CALLCONV initIntPropInclusion(UProperty prop, UErrorCode &errorCode) {
// This function is invoked only via umtx_initOnce().
U_ASSERT(UCHAR_INT_START <= prop && prop < UCHAR_INT_LIMIT);
int32_t inclIndex = UPROPS_SRC_COUNT + prop - UCHAR_INT_START;
int32_t inclIndex = UPROPS_SRC_COUNT + (prop - UCHAR_INT_START);
U_ASSERT(gInclusions[inclIndex].fSet == nullptr);
UPropertySource src = uprops_getSource(prop);
const UnicodeSet *incl = getInclusionsForSource(src, errorCode);
@ -255,7 +255,7 @@ const UnicodeSet *CharacterProperties::getInclusionsForProperty(
UProperty prop, UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) { return nullptr; }
if (UCHAR_INT_START <= prop && prop < UCHAR_INT_LIMIT) {
int32_t inclIndex = UPROPS_SRC_COUNT + prop - UCHAR_INT_START;
int32_t inclIndex = UPROPS_SRC_COUNT + (prop - UCHAR_INT_START);
Inclusion &i = gInclusions[inclIndex];
umtx_initOnce(i.fInitOnce, &initIntPropInclusion, prop, errorCode);
return i.fSet;

Просмотреть файл

@ -220,7 +220,7 @@ UBool CharString::ensureCapacity(int32_t capacity,
int32_t desiredCapacityHint,
UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
if(capacity>buffer.getCapacity()) {
if(desiredCapacityHint==0) {
@ -230,10 +230,10 @@ UBool CharString::ensureCapacity(int32_t capacity,
buffer.resize(capacity, len+1)==NULL
) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return FALSE;
return false;
}
}
return TRUE;
return true;
}
CharString &CharString::appendPathPart(StringPiece s, UErrorCode &errorCode) {

Просмотреть файл

@ -177,8 +177,8 @@ private:
UBool ensureCapacity(int32_t capacity, int32_t desiredCapacityHint, UErrorCode &errorCode);
CharString(const CharString &other); // forbid copying of this class
CharString &operator=(const CharString &other); // forbid copying of this class
CharString(const CharString &other) = delete; // forbid copying of this class
CharString &operator=(const CharString &other) = delete; // forbid copying of this class
/**
* Returns U_FILE_ALT_SEP_CHAR if found in string, and U_FILE_SEP_CHAR is not found.

Просмотреть файл

@ -134,5 +134,5 @@ U_CFUNC UBool cmemory_cleanup(void) {
pAlloc = NULL;
pRealloc = NULL;
pFree = NULL;
return TRUE;
return true;
}

Просмотреть файл

@ -58,7 +58,7 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
<Link>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc71d.dll</OutputFile>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc$(IcuMajorVersion)d.dll</OutputFile>
<ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuucd.pdb</ProgramDatabaseFile>
<ImportLibrary>..\..\$(IcuLibOutputDir)\icuucd.lib</ImportLibrary>
</Link>
@ -70,7 +70,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
</ClCompile>
<Link>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc71.dll</OutputFile>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc$(IcuMajorVersion).dll</OutputFile>
<ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuuc.pdb</ProgramDatabaseFile>
<ImportLibrary>..\..\$(IcuLibOutputDir)\icuuc.lib</ImportLibrary>
</Link>

Просмотреть файл

@ -125,7 +125,7 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<AdditionalDependencies>vccorlib.lib;msvcrt.lib;vcruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc71.dll</OutputFile>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc$(IcuMajorVersion).dll</OutputFile>
<ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuuc.pdb</ProgramDatabaseFile>
<ImportLibrary>..\..\$(IcuLibOutputDir)\icuuc.lib</ImportLibrary>
</Link>
@ -148,7 +148,7 @@
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>vccorlibd.lib;msvcrtd.lib;vcruntimed.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc71d.dll</OutputFile>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc$(IcuMajorVersion)d.dll</OutputFile>
<ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuucd.pdb</ProgramDatabaseFile>
<ImportLibrary>..\..\$(IcuLibOutputDir)\icuucd.lib</ImportLibrary>
</Link>

Просмотреть файл

@ -51,8 +51,8 @@ class U_COMMON_API CStr : public UMemory {
private:
CharString s;
CStr(const CStr &other); // Forbid copying of this class.
CStr &operator =(const CStr &other); // Forbid assignment.
CStr(const CStr &other) = delete; // Forbid copying of this class.
CStr &operator =(const CStr &other) = delete; // Forbid assignment.
};
U_NAMESPACE_END

Просмотреть файл

@ -119,7 +119,7 @@ public:
// Select the currently marked candidate, point after it in the text, and invalidate self
int32_t acceptMarked( UText *text );
// Back up from the current candidate to the next shorter one; return TRUE if that exists
// Back up from the current candidate to the next shorter one; return true if that exists
// and point the text after it
UBool backUp( UText *text );
@ -165,9 +165,9 @@ UBool
PossibleWord::backUp( UText *text ) {
if (current > 0) {
utext_setNativeIndex(text, offset + cuLengths[--current]);
return TRUE;
return true;
}
return FALSE;
return false;
}
/*
@ -1146,7 +1146,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
// Input UText is in one contiguous UTF-16 chunk.
// Use Read-only aliasing UnicodeString.
inString.setTo(FALSE,
inString.setTo(false,
inText->chunkContents + rangeStart - inText->chunkNativeStart,
rangeEnd - rangeStart);
} else {

Просмотреть файл

@ -221,7 +221,7 @@ UBool Edits::growArray() {
// Not U_BUFFER_OVERFLOW_ERROR because that could be confused on a string transform API
// with a result-string-buffer overflow.
errorCode_ = U_INDEX_OUTOFBOUNDS_ERROR;
return FALSE;
return false;
} else if (capacity >= (INT32_MAX / 2)) {
newCapacity = INT32_MAX;
} else {
@ -230,25 +230,25 @@ UBool Edits::growArray() {
// Grow by at least 5 units so that a maximal change record will fit.
if ((newCapacity - capacity) < 5) {
errorCode_ = U_INDEX_OUTOFBOUNDS_ERROR;
return FALSE;
return false;
}
uint16_t *newArray = (uint16_t *)uprv_malloc((size_t)newCapacity * 2);
if (newArray == NULL) {
errorCode_ = U_MEMORY_ALLOCATION_ERROR;
return FALSE;
return false;
}
uprv_memcpy(newArray, array, (size_t)length * 2);
releaseArray();
array = newArray;
capacity = newCapacity;
return TRUE;
return true;
}
UBool Edits::copyErrorTo(UErrorCode &outErrorCode) const {
if (U_FAILURE(outErrorCode)) { return TRUE; }
if (U_SUCCESS(errorCode_)) { return FALSE; }
if (U_FAILURE(outErrorCode)) { return true; }
if (U_SUCCESS(errorCode_)) { return false; }
outErrorCode = errorCode_;
return TRUE;
return true;
}
Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &errorCode) {
@ -257,7 +257,7 @@ Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &error
// Parallel iteration over both Edits.
Iterator abIter = ab.getFineIterator();
Iterator bcIter = bc.getFineIterator();
UBool abHasNext = TRUE, bcHasNext = TRUE;
UBool abHasNext = true, bcHasNext = true;
// Copy iterator state into local variables, so that we can modify and subdivide spans.
// ab old & new length, bc old & new length
int32_t aLength = 0, ab_bLength = 0, bc_bLength = 0, cLength = 0;
@ -400,7 +400,7 @@ Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &error
Edits::Iterator::Iterator(const uint16_t *a, int32_t len, UBool oc, UBool crs) :
array(a), index(0), length(len), remaining(0),
onlyChanges_(oc), coarse(crs),
dir(0), changed(FALSE), oldLength_(0), newLength_(0),
dir(0), changed(false), oldLength_(0), newLength_(0),
srcIndex(0), replIndex(0), destIndex(0) {}
int32_t Edits::Iterator::readLength(int32_t head) {
@ -441,16 +441,16 @@ void Edits::Iterator::updatePreviousIndexes() {
UBool Edits::Iterator::noNext() {
// No change before or beyond the string.
dir = 0;
changed = FALSE;
changed = false;
oldLength_ = newLength_ = 0;
return FALSE;
return false;
}
UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
// Forward iteration: Update the string indexes to the limit of the current span,
// and post-increment-read array units to assemble a new span.
// Leaves the array index one after the last unit of that span.
if (U_FAILURE(errorCode)) { return FALSE; }
if (U_FAILURE(errorCode)) { return false; }
// We have an errorCode in case we need to start guarding against integer overflows.
// It is also convenient for caller loops if we bail out when an error was set elsewhere.
if (dir > 0) {
@ -464,7 +464,7 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
// Stay on the current one of a sequence of compressed changes.
++index; // next() rests on the index after the sequence unit.
dir = 1;
return TRUE;
return true;
}
}
dir = 1;
@ -473,7 +473,7 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
// Fine-grained iterator: Continue a sequence of compressed changes.
if (remaining > 1) {
--remaining;
return TRUE;
return true;
}
remaining = 0;
}
@ -483,7 +483,7 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
int32_t u = array[index++];
if (u <= MAX_UNCHANGED) {
// Combine adjacent unchanged ranges.
changed = FALSE;
changed = false;
oldLength_ = u + 1;
while (index < length && (u = array[index]) <= MAX_UNCHANGED) {
++index;
@ -498,10 +498,10 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
// already fetched u > MAX_UNCHANGED at index
++index;
} else {
return TRUE;
return true;
}
}
changed = TRUE;
changed = true;
if (u <= MAX_SHORT_CHANGE) {
int32_t oldLen = u >> 12;
int32_t newLen = (u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH;
@ -516,14 +516,14 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
if (num > 1) {
remaining = num; // This is the first of two or more changes.
}
return TRUE;
return true;
}
} else {
U_ASSERT(u <= 0x7fff);
oldLength_ = readLength((u >> 6) & 0x3f);
newLength_ = readLength(u & 0x3f);
if (!coarse) {
return TRUE;
return true;
}
}
// Combine adjacent changes.
@ -539,14 +539,14 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
newLength_ += readLength(u & 0x3f);
}
}
return TRUE;
return true;
}
UBool Edits::Iterator::previous(UErrorCode &errorCode) {
// Backward iteration: Pre-decrement-read array units to assemble a new span,
// then update the string indexes to the start of that span.
// Leaves the array index on the head unit of that span.
if (U_FAILURE(errorCode)) { return FALSE; }
if (U_FAILURE(errorCode)) { return false; }
// We have an errorCode in case we need to start guarding against integer overflows.
// It is also convenient for caller loops if we bail out when an error was set elsewhere.
if (dir >= 0) {
@ -559,7 +559,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
// Stay on the current one of a sequence of compressed changes.
--index; // previous() rests on the sequence unit.
dir = -1;
return TRUE;
return true;
}
updateNextIndexes();
}
@ -572,7 +572,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
if (remaining <= (u & SHORT_CHANGE_NUM_MASK)) {
++remaining;
updatePreviousIndexes();
return TRUE;
return true;
}
remaining = 0;
}
@ -582,7 +582,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
int32_t u = array[--index];
if (u <= MAX_UNCHANGED) {
// Combine adjacent unchanged ranges.
changed = FALSE;
changed = false;
oldLength_ = u + 1;
while (index > 0 && (u = array[index - 1]) <= MAX_UNCHANGED) {
--index;
@ -591,9 +591,9 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
newLength_ = oldLength_;
// No need to handle onlyChanges as long as previous() is called only from findIndex().
updatePreviousIndexes();
return TRUE;
return true;
}
changed = TRUE;
changed = true;
if (u <= MAX_SHORT_CHANGE) {
int32_t oldLen = u >> 12;
int32_t newLen = (u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH;
@ -609,7 +609,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
remaining = 1; // This is the last of two or more changes.
}
updatePreviousIndexes();
return TRUE;
return true;
}
} else {
if (u <= 0x7fff) {
@ -629,7 +629,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
}
if (!coarse) {
updatePreviousIndexes();
return TRUE;
return true;
}
}
// Combine adjacent changes.
@ -648,7 +648,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
}
}
updatePreviousIndexes();
return TRUE;
return true;
}
int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &errorCode) {
@ -705,7 +705,7 @@ int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &erro
// The index is in the current span.
return 0;
}
while (next(FALSE, errorCode)) {
while (next(false, errorCode)) {
if (findSource) {
spanStart = srcIndex;
spanLength = oldLength_;
@ -739,7 +739,7 @@ int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &erro
}
int32_t Edits::Iterator::destinationIndexFromSourceIndex(int32_t i, UErrorCode &errorCode) {
int32_t where = findIndex(i, TRUE, errorCode);
int32_t where = findIndex(i, true, errorCode);
if (where < 0) {
// Error or before the string.
return 0;
@ -758,7 +758,7 @@ int32_t Edits::Iterator::destinationIndexFromSourceIndex(int32_t i, UErrorCode &
}
int32_t Edits::Iterator::sourceIndexFromDestinationIndex(int32_t i, UErrorCode &errorCode) {
int32_t where = findIndex(i, FALSE, errorCode);
int32_t where = findIndex(i, false, errorCode);
if (where < 0) {
// Error or before the string.
return 0;

Просмотреть файл

@ -22,7 +22,7 @@ U_NAMESPACE_BEGIN
namespace {
EmojiProps *singleton = nullptr;
icu::UInitOnce emojiInitOnce = U_INITONCE_INITIALIZER;
icu::UInitOnce emojiInitOnce {};
UBool U_CALLCONV emojiprops_cleanup() {
delete singleton;

Просмотреть файл

@ -58,7 +58,7 @@ static int32_t U_CALLCONV compareUnicodeString(UElement t1, UElement t2) {
/**
* A UVector which implements a set of strings.
*/
class U_COMMON_API UStringSet : public UVector {
class UStringSet : public UVector {
public:
UStringSet(UErrorCode &status) : UVector(uprv_deleteUObject,
uhash_compareUnicodeString,
@ -482,7 +482,7 @@ SimpleFilteredSentenceBreakIterator::last(void) {
/**
* Concrete implementation of builder class.
*/
class U_COMMON_API SimpleFilteredBreakIteratorBuilder : public FilteredBreakIteratorBuilder {
class SimpleFilteredBreakIteratorBuilder : public FilteredBreakIteratorBuilder {
public:
virtual ~SimpleFilteredBreakIteratorBuilder();
SimpleFilteredBreakIteratorBuilder(const Locale &fromLocale, UErrorCode &status);
@ -614,11 +614,11 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
i++) {
const UnicodeString *abbr = fSet.getStringAt(i);
if(abbr) {
FB_TRACE("build",abbr,TRUE,i);
FB_TRACE("build",abbr,true,i);
ustrs[n] = *abbr; // copy by value
FB_TRACE("ustrs[n]",&ustrs[n],TRUE,i);
FB_TRACE("ustrs[n]",&ustrs[n],true,i);
} else {
FB_TRACE("build",abbr,FALSE,i);
FB_TRACE("build",abbr,false,i);
status = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
@ -629,37 +629,37 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
for(int i=0;i<subCount;i++) {
int nn = ustrs[i].indexOf(kFULLSTOP); // TODO: non-'.' abbreviations
if(nn>-1 && (nn+1)!=ustrs[i].length()) {
FB_TRACE("partial",&ustrs[i],FALSE,i);
FB_TRACE("partial",&ustrs[i],false,i);
// is partial.
// is it unique?
int sameAs = -1;
for(int j=0;j<subCount;j++) {
if(j==i) continue;
if(ustrs[i].compare(0,nn+1,ustrs[j],0,nn+1)==0) {
FB_TRACE("prefix",&ustrs[j],FALSE,nn+1);
FB_TRACE("prefix",&ustrs[j],false,nn+1);
//UBool otherIsPartial = ((nn+1)!=ustrs[j].length()); // true if ustrs[j] doesn't end at nn
if(partials[j]==0) { // hasn't been processed yet
partials[j] = kSuppressInReverse | kAddToForward;
FB_TRACE("suppressing",&ustrs[j],FALSE,j);
FB_TRACE("suppressing",&ustrs[j],false,j);
} else if(partials[j] & kSuppressInReverse) {
sameAs = j; // the other entry is already in the reverse table.
}
}
}
FB_TRACE("for partial same-",&ustrs[i],FALSE,sameAs);
FB_TRACE(" == partial #",&ustrs[i],FALSE,partials[i]);
FB_TRACE("for partial same-",&ustrs[i],false,sameAs);
FB_TRACE(" == partial #",&ustrs[i],false,partials[i]);
UnicodeString prefix(ustrs[i], 0, nn+1);
if(sameAs == -1 && partials[i] == 0) {
// first one - add the prefix to the reverse table.
prefix.reverse();
builder->add(prefix, kPARTIAL, status);
revCount++;
FB_TRACE("Added partial",&prefix,FALSE, i);
FB_TRACE(u_errorName(status),&ustrs[i],FALSE,i);
FB_TRACE("Added partial",&prefix,false, i);
FB_TRACE(u_errorName(status),&ustrs[i],false,i);
partials[i] = kSuppressInReverse | kAddToForward;
} else {
FB_TRACE("NOT adding partial",&prefix,FALSE, i);
FB_TRACE(u_errorName(status),&ustrs[i],FALSE,i);
FB_TRACE("NOT adding partial",&prefix,false, i);
FB_TRACE(u_errorName(status),&ustrs[i],false,i);
}
}
}
@ -668,9 +668,9 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
ustrs[i].reverse();
builder->add(ustrs[i], kMATCH, status);
revCount++;
FB_TRACE(u_errorName(status), &ustrs[i], FALSE, i);
FB_TRACE(u_errorName(status), &ustrs[i], false, i);
} else {
FB_TRACE("Adding fwd",&ustrs[i], FALSE, i);
FB_TRACE("Adding fwd",&ustrs[i], false, i);
// an optimization would be to only add the portion after the '.'
// for example, for "Ph.D." we store ".hP" in the reverse table. We could just store "D." in the forward,
@ -682,12 +682,12 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
////if(debug2) u_printf("SUPPRESS- not Added(%d): /%S/ status=%s\n",partials[i], ustrs[i].getTerminatedBuffer(), u_errorName(status));
}
}
FB_TRACE("AbbrCount",NULL,FALSE, subCount);
FB_TRACE("AbbrCount",NULL,false, subCount);
if(revCount>0) {
backwardsTrie.adoptInstead(builder->build(USTRINGTRIE_BUILD_FAST, status));
if(U_FAILURE(status)) {
FB_TRACE(u_errorName(status),NULL,FALSE, -1);
FB_TRACE(u_errorName(status),NULL,false, -1);
return NULL;
}
}
@ -695,7 +695,7 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
if(fwdCount>0) {
forwardsPartialTrie.adoptInstead(builder2->build(USTRINGTRIE_BUILD_FAST, status));
if(U_FAILURE(status)) {
FB_TRACE(u_errorName(status),NULL,FALSE, -1);
FB_TRACE(u_errorName(status),NULL,false, -1);
return NULL;
}
}

Просмотреть файл

@ -137,14 +137,14 @@ UnicodeString &
FilteredNormalizer2::normalizeSecondAndAppend(UnicodeString &first,
const UnicodeString &second,
UErrorCode &errorCode) const {
return normalizeSecondAndAppend(first, second, TRUE, errorCode);
return normalizeSecondAndAppend(first, second, true, errorCode);
}
UnicodeString &
FilteredNormalizer2::append(UnicodeString &first,
const UnicodeString &second,
UErrorCode &errorCode) const {
return normalizeSecondAndAppend(first, second, FALSE, errorCode);
return normalizeSecondAndAppend(first, second, false, errorCode);
}
UnicodeString &
@ -224,7 +224,7 @@ UBool
FilteredNormalizer2::isNormalized(const UnicodeString &s, UErrorCode &errorCode) const {
uprv_checkCanGetBuffer(s, errorCode);
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
USetSpanCondition spanCondition=USET_SPAN_SIMPLE;
for(int32_t prevSpanLimit=0; prevSpanLimit<s.length();) {
@ -235,19 +235,19 @@ FilteredNormalizer2::isNormalized(const UnicodeString &s, UErrorCode &errorCode)
if( !norm2.isNormalized(s.tempSubStringBetween(prevSpanLimit, spanLimit), errorCode) ||
U_FAILURE(errorCode)
) {
return FALSE;
return false;
}
spanCondition=USET_SPAN_NOT_CONTAINED;
}
prevSpanLimit=spanLimit;
}
return TRUE;
return true;
}
UBool
FilteredNormalizer2::isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
const char *s = sp.data();
int32_t length = sp.length();
@ -259,14 +259,14 @@ FilteredNormalizer2::isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) con
} else {
if (!norm2.isNormalizedUTF8(StringPiece(s, spanLength), errorCode) ||
U_FAILURE(errorCode)) {
return FALSE;
return false;
}
spanCondition = USET_SPAN_NOT_CONTAINED;
}
s += spanLength;
length -= spanLength;
}
return TRUE;
return true;
}
UNormalizationCheckResult

Просмотреть файл

@ -115,8 +115,8 @@ public:
inline UBool equals(const Hashtable& that) const;
private:
Hashtable(const Hashtable &other); // forbid copying of this class
Hashtable &operator=(const Hashtable &other); // forbid copying of this class
Hashtable(const Hashtable &other) = delete; // forbid copying of this class
Hashtable &operator=(const Hashtable &other) = delete; // forbid copying of this class
};
/*********************************************************************

Просмотреть файл

@ -59,8 +59,8 @@ struct UPlugData {
void *context; /**< user context data */
char name[UPLUG_NAME_MAX]; /**< name of plugin */
UPlugLevel level; /**< level of plugin */
UBool awaitingLoad; /**< TRUE if the plugin is awaiting a load call */
UBool dontUnload; /**< TRUE if plugin must stay resident (leak plugin and lib) */
UBool awaitingLoad; /**< true if the plugin is awaiting a load call */
UBool dontUnload; /**< true if plugin must stay resident (leak plugin and lib) */
UErrorCode pluginStatus; /**< status code of plugin */
};
@ -304,11 +304,11 @@ static void uplug_queryPlug(UPlugData *plug, UErrorCode *status) {
if(U_SUCCESS(*status)) {
if(plug->level == UPLUG_LEVEL_INVALID) {
plug->pluginStatus = U_PLUGIN_DIDNT_SET_LEVEL;
plug->awaitingLoad = FALSE;
plug->awaitingLoad = false;
}
} else {
plug->pluginStatus = U_INTERNAL_PROGRAM_ERROR;
plug->awaitingLoad = FALSE;
plug->awaitingLoad = false;
}
}
@ -322,7 +322,7 @@ static void uplug_loadPlug(UPlugData *plug, UErrorCode *status) {
return;
}
uplug_callPlug(plug, UPLUG_REASON_LOAD, status);
plug->awaitingLoad = FALSE;
plug->awaitingLoad = false;
if(!U_SUCCESS(*status)) {
plug->pluginStatus = U_INTERNAL_PROGRAM_ERROR;
}
@ -347,8 +347,8 @@ static UPlugData *uplug_allocateEmptyPlug(UErrorCode *status)
plug->structSize = sizeof(UPlugData);
plug->name[0]=0;
plug->level = UPLUG_LEVEL_UNKNOWN; /* initialize to null state */
plug->awaitingLoad = TRUE;
plug->dontUnload = FALSE;
plug->awaitingLoad = true;
plug->dontUnload = false;
plug->pluginStatus = U_ZERO_ERROR;
plug->libName[0] = 0;
plug->config[0]=0;
@ -403,9 +403,9 @@ static void uplug_deallocatePlug(UPlugData *plug, UErrorCode *status) {
pluginCount = uplug_removeEntryAt(pluginList, pluginCount, sizeof(plug[0]), uplug_pluginNumber(plug));
} else {
/* not ok- leave as a message. */
plug->awaitingLoad=FALSE;
plug->awaitingLoad=false;
plug->entrypoint=0;
plug->dontUnload=TRUE;
plug->dontUnload=true;
}
}
@ -558,8 +558,8 @@ uplug_initErrorPlug(const char *libName, const char *sym, const char *config, co
if(U_FAILURE(*status)) return NULL;
plug->pluginStatus = loadStatus;
plug->awaitingLoad = FALSE; /* Won't load. */
plug->dontUnload = TRUE; /* cannot unload. */
plug->awaitingLoad = false; /* Won't load. */
plug->dontUnload = true; /* cannot unload. */
if(sym!=NULL) {
uprv_strncpy(plug->sym, sym, UPLUG_NAME_MAX);
@ -646,7 +646,7 @@ static UBool U_CALLCONV uplug_cleanup(void)
}
/* close other held libs? */
gCurrentLevel = UPLUG_LEVEL_LOW;
return TRUE;
return true;
}
#if U_ENABLE_DYLOAD
@ -678,7 +678,7 @@ static void uplug_loadWaitingPlugs(UErrorCode *status) {
currentLevel = newLevel;
}
}
pluginToLoad->awaitingLoad = FALSE;
pluginToLoad->awaitingLoad = false;
}
}
}
@ -694,7 +694,7 @@ static void uplug_loadWaitingPlugs(UErrorCode *status) {
} else {
uplug_loadPlug(pluginToLoad, &subStatus);
}
pluginToLoad->awaitingLoad = FALSE;
pluginToLoad->awaitingLoad = false;
}
}

Просмотреть файл

@ -67,9 +67,9 @@ LoadedNormalizer2Impl::isAcceptable(void * /*context*/,
) {
// Normalizer2Impl *me=(Normalizer2Impl *)context;
// uprv_memcpy(me->dataVersion, pInfo->dataVersion, 4);
return TRUE;
return true;
} else {
return FALSE;
return false;
}
}
@ -134,14 +134,14 @@ U_CDECL_END
#if !NORM2_HARDCODE_NFC_DATA
static Norm2AllModes *nfcSingleton;
static icu::UInitOnce nfcInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce nfcInitOnce {};
#endif
static Norm2AllModes *nfkcSingleton;
static icu::UInitOnce nfkcInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce nfkcInitOnce {};
static Norm2AllModes *nfkc_cfSingleton;
static icu::UInitOnce nfkc_cfInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce nfkc_cfInitOnce {};
static UHashtable *cache=NULL;
@ -185,7 +185,7 @@ static UBool U_CALLCONV uprv_loaded_normalizer2_cleanup() {
uhash_close(cache);
cache=NULL;
return TRUE;
return true;
}
U_CDECL_END

Просмотреть файл

@ -15,7 +15,7 @@ U_NAMESPACE_BEGIN
#define UPRV_ISDIGIT(c) (((c) >= '0') && ((c) <= '9'))
#define UPRV_ISALPHANUM(c) (uprv_isASCIILetter(c) || UPRV_ISDIGIT(c) )
const char* kAttributeKey = "attribute";
constexpr const char* kAttributeKey = "attribute";
static bool _isExtensionSubtags(char key, const char* s, int32_t len) {
switch (uprv_tolower(key)) {
@ -459,7 +459,7 @@ Locale LocaleBuilder::build(UErrorCode& errorCode)
UBool LocaleBuilder::copyErrorTo(UErrorCode &outErrorCode) const {
if (U_FAILURE(outErrorCode)) {
// Do not overwrite the older error code
return TRUE;
return true;
}
outErrorCode = status_;
return U_FAILURE(outErrorCode);

Просмотреть файл

@ -0,0 +1,632 @@
// © 2022 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
//
// Internal static data tables used by uresbund.cpp
// WARNING: This file is mechanically generated by the CLDR-to-ICU tool
// (see tools/cldr/cldr-to-icu/src/main/java/org/unicode/tool/cldrtoicu/generator/ResourcFallbackCodeGenerator.java).
// DO NOT HAND EDIT!!!
#ifdef INCLUDED_FROM_URESBUND_CPP
//======================================================================
// Default script table
const char scriptCodeChars[] =
"Aghb\0Ahom\0Arab\0Armi\0Armn\0Avst\0Bamu\0Bass\0Beng\0Brah\0Cakm\0"
"Cans\0Cari\0Cham\0Cher\0Chrs\0Copt\0Cprt\0Cyrl\0Deva\0Egyp\0Ethi\0"
"Geor\0Gong\0Gonm\0Goth\0Grek\0Gujr\0Guru\0Hans\0Hant\0Hebr\0Hluw\0"
"Hmnp\0Ital\0Jpan\0Kali\0Kana\0Kawi\0Khar\0Khmr\0Kits\0Knda\0Kore\0"
"Lana\0Laoo\0Lepc\0Lina\0Lisu\0Lyci\0Lydi\0Mand\0Mani\0Medf\0Merc\0"
"Mlym\0Mong\0Mroo\0Mymr\0Narb\0Nkoo\0Nshu\0Ogam\0Olck\0Orkh\0Orya\0"
"Osge\0Ougr\0Pauc\0Phli\0Phnx\0Plrd\0Prti\0Rohg\0Runr\0Samr\0Sarb\0"
"Saur\0Sgnw\0Sinh\0Sogd\0Sora\0Soyo\0Syrc\0Tale\0Talu\0Taml\0Tang\0"
"Tavt\0Telu\0Tfng\0Thaa\0Thai\0Tibt\0Tnsa\0Toto\0Ugar\0Vaii\0Wcho\0"
"Xpeo\0Xsux\0Yiii\0";
const char dsLocaleIDChars[] =
"ab\0abq\0adp\0ady\0ae\0aeb\0aho\0ajt\0akk\0alt\0am\0apc\0apd\0"
"ar\0arc\0arq\0ars\0ary\0arz\0as\0ase\0av\0avl\0awa\0az_IQ\0az_IR\0"
"az_RU\0ba\0bal\0bap\0bax\0bcq\0be\0bej\0bfq\0bft\0bfy\0bg\0bgc\0"
"bgn\0bgx\0bhb\0bhi\0bho\0bji\0bjj\0blt\0bn\0bo\0bpy\0bqi\0bra\0"
"brh\0brx\0bsq\0bst\0btv\0bua\0byn\0ccp\0ce\0chm\0chr\0cja\0cjm\0"
"ckb\0cmg\0cop\0cr\0crh\0crk\0crl\0csw\0ctd\0cu\0cv\0dar\0dcc\0"
"dgl\0dmf\0doi\0drh\0drs\0dty\0dv\0dz\0egy\0eky\0el\0esg\0ett\0"
"fa\0fia\0fub\0gan\0gbm\0gbz\0gez\0ggn\0gjk\0gju\0glk\0gmv\0gof\0"
"gom\0gon\0got\0grc\0grt\0gu\0gvr\0gwc\0gwt\0ha_CM\0ha_SD\0hak\0"
"haz\0hdy\0he\0hi\0hlu\0hmd\0hnd\0hne\0hnj\0hno\0hoc\0hoj\0hsn\0"
"hy\0ii\0inh\0iu\0iw\0ja\0ji\0jml\0ka\0kaa\0kaw\0kbd\0kby\0kdt\0"
"kfr\0kfy\0khb\0khn\0kht\0khw\0kjg\0kk\0kk_AF\0kk_CN\0kk_IR\0kk_MN\0"
"km\0kn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h_VN\0zhx\0zkt\0";
const int32_t defaultScriptTable[] = {
0, 90, // ab -> Cyrl
3, 90, // abq -> Cyrl
7, 465, // adp -> Tibt
11, 90, // ady -> Cyrl
15, 25, // ae -> Avst
18, 10, // aeb -> Arab
22, 5, // aho -> Ahom
26, 10, // ajt -> Arab
30, 500, // akk -> Xsux
34, 90, // alt -> Cyrl
38, 105, // am -> Ethi
41, 10, // apc -> Arab
45, 10, // apd -> Arab
49, 10, // ar -> Arab
52, 15, // arc -> Armi
56, 10, // arq -> Arab
60, 10, // ars -> Arab
64, 10, // ary -> Arab
68, 10, // arz -> Arab
72, 40, // as -> Beng
75, 390, // ase -> Sgnw
79, 90, // av -> Cyrl
82, 10, // avl -> Arab
86, 95, // awa -> Deva
90, 10, // az_IQ -> Arab
96, 10, // az_IR -> Arab
102, 90, // az_RU -> Cyrl
108, 90, // ba -> Cyrl
111, 10, // bal -> Arab
115, 95, // bap -> Deva
119, 30, // bax -> Bamu
123, 105, // bcq -> Ethi
127, 90, // be -> Cyrl
130, 10, // bej -> Arab
134, 430, // bfq -> Taml
138, 10, // bft -> Arab
142, 95, // bfy -> Deva
146, 90, // bg -> Cyrl
149, 95, // bgc -> Deva
153, 10, // bgn -> Arab
157, 130, // bgx -> Grek
161, 95, // bhb -> Deva
165, 95, // bhi -> Deva
169, 95, // bho -> Deva
173, 105, // bji -> Ethi
177, 95, // bjj -> Deva
181, 440, // blt -> Tavt
185, 40, // bn -> Beng
188, 465, // bo -> Tibt
191, 40, // bpy -> Beng
195, 10, // bqi -> Arab
199, 95, // bra -> Deva
203, 10, // brh -> Arab
207, 95, // brx -> Deva
211, 35, // bsq -> Bass
215, 105, // bst -> Ethi
219, 95, // btv -> Deva
223, 90, // bua -> Cyrl
227, 105, // byn -> Ethi
231, 50, // ccp -> Cakm
235, 90, // ce -> Cyrl
238, 90, // chm -> Cyrl
242, 70, // chr -> Cher
246, 10, // cja -> Arab
250, 65, // cjm -> Cham
254, 10, // ckb -> Arab
258, 410, // cmg -> Soyo
262, 80, // cop -> Copt
266, 55, // cr -> Cans
269, 90, // crh -> Cyrl
273, 55, // crk -> Cans
277, 55, // crl -> Cans
281, 55, // csw -> Cans
285, 340, // ctd -> Pauc
289, 90, // cu -> Cyrl
292, 90, // cv -> Cyrl
295, 90, // dar -> Cyrl
299, 10, // dcc -> Arab
303, 10, // dgl -> Arab
307, 265, // dmf -> Medf
311, 95, // doi -> Deva
315, 280, // drh -> Mong
319, 105, // drs -> Ethi
323, 95, // dty -> Deva
327, 455, // dv -> Thaa
330, 465, // dz -> Tibt
333, 100, // egy -> Egyp
337, 180, // eky -> Kali
341, 130, // el -> Grek
344, 120, // esg -> Gonm
348, 170, // ett -> Ital
352, 10, // fa -> Arab
355, 10, // fia -> Arab
359, 10, // fub -> Arab
363, 145, // gan -> Hans
367, 95, // gbm -> Deva
371, 10, // gbz -> Arab
375, 105, // gez -> Ethi
379, 95, // ggn -> Deva
383, 10, // gjk -> Arab
387, 10, // gju -> Arab
391, 10, // glk -> Arab
395, 105, // gmv -> Ethi
399, 105, // gof -> Ethi
403, 95, // gom -> Deva
407, 445, // gon -> Telu
411, 125, // got -> Goth
415, 85, // grc -> Cprt
419, 40, // grt -> Beng
423, 135, // gu -> Gujr
426, 95, // gvr -> Deva
430, 10, // gwc -> Arab
434, 10, // gwt -> Arab
438, 10, // ha_CM -> Arab
444, 10, // ha_SD -> Arab
450, 145, // hak -> Hans
454, 10, // haz -> Arab
458, 105, // hdy -> Ethi
462, 155, // he -> Hebr
465, 95, // hi -> Deva
468, 160, // hlu -> Hluw
472, 355, // hmd -> Plrd
476, 10, // hnd -> Arab
480, 95, // hne -> Deva
484, 165, // hnj -> Hmnp
488, 10, // hno -> Arab
492, 95, // hoc -> Deva
496, 95, // hoj -> Deva
500, 145, // hsn -> Hans
504, 20, // hy -> Armn
507, 505, // ii -> Yiii
510, 90, // inh -> Cyrl
514, 55, // iu -> Cans
517, 155, // iw -> Hebr
520, 175, // ja -> Jpan
523, 155, // ji -> Hebr
526, 95, // jml -> Deva
530, 110, // ka -> Geor
533, 90, // kaa -> Cyrl
537, 190, // kaw -> Kawi
541, 90, // kbd -> Cyrl
545, 10, // kby -> Arab
549, 460, // kdt -> Thai
553, 95, // kfr -> Deva
557, 95, // kfy -> Deva
561, 425, // khb -> Talu
565, 95, // khn -> Deva
569, 290, // kht -> Mymr
573, 10, // khw -> Arab
577, 225, // kjg -> Laoo
581, 90, // kk -> Cyrl
584, 10, // kk_AF -> Arab
590, 10, // kk_CN -> Arab
596, 10, // kk_IR -> Arab
602, 10, // kk_MN -> Arab
608, 200, // km -> Khmr
611, 210, // kn -> Knda
614, 215, // ko -> Kore
617, 90, // koi -> Cyrl
621, 95, // kok -> Deva
625, 105, // kqy -> Ethi
629, 90, // krc -> Cyrl
633, 95, // kru -> Deva
637, 10, // ks -> Arab
640, 105, // ktb -> Ethi
644, 10, // ku_LB -> Arab
650, 90, // kum -> Cyrl
654, 90, // kv -> Cyrl
657, 10, // kvx -> Arab
661, 105, // kxc -> Ethi
665, 95, // kxl -> Deva
669, 460, // kxm -> Thai
673, 10, // kxp -> Arab
677, 90, // ky -> Cyrl
680, 10, // ky_CN -> Arab
686, 10, // kzh -> Arab
690, 235, // lab -> Lina
694, 155, // lad -> Hebr
698, 10, // lah -> Arab
702, 90, // lbe -> Cyrl
706, 460, // lcp -> Thai
710, 230, // lep -> Lepc
714, 90, // lez -> Cyrl
718, 95, // lif -> Deva
722, 240, // lis -> Lisu
726, 10, // lki -> Arab
730, 445, // lmn -> Telu
734, 225, // lo -> Laoo
737, 10, // lrc -> Arab
741, 10, // luz -> Arab
745, 460, // lwl -> Thai
749, 145, // lzh -> Hans
753, 95, // mag -> Deva
757, 95, // mai -> Deva
761, 300, // man_GN -> Nkoo
768, 10, // mde -> Arab
772, 90, // mdf -> Cyrl
776, 105, // mdx -> Ethi
780, 10, // mfa -> Arab
784, 95, // mgp -> Deva
788, 90, // mk -> Cyrl
791, 10, // mki -> Arab
795, 275, // ml -> Mlym
798, 90, // mn -> Cyrl
801, 280, // mn_CN -> Mong
807, 40, // mni -> Beng
811, 290, // mnw -> Mymr
815, 95, // mr -> Deva
818, 95, // mrd -> Deva
822, 90, // mrj -> Cyrl
826, 285, // mro -> Mroo
830, 10, // ms_CC -> Arab
836, 95, // mtr -> Deva
840, 10, // mvy -> Arab
844, 95, // mwr -> Deva
848, 165, // mww -> Hmnp
852, 290, // my -> Mymr
855, 105, // mym -> Ethi
859, 90, // myv -> Cyrl
863, 255, // myz -> Mand
867, 10, // mzn -> Arab
871, 145, // nan -> Hans
875, 95, // ne -> Deva
878, 95, // new -> Deva
882, 490, // nnp -> Wcho
886, 220, // nod -> Lana
890, 95, // noe -> Deva
894, 370, // non -> Runr
898, 300, // nqo -> Nkoo
902, 55, // nsk -> Cans
906, 470, // nst -> Tnsa
910, 55, // oj -> Cans
913, 55, // ojs -> Cans
917, 325, // or -> Orya
920, 10, // oru -> Arab
924, 90, // os -> Cyrl
927, 330, // osa -> Osge
931, 10, // ota -> Arab
935, 320, // otk -> Orkh
939, 335, // oui -> Ougr
943, 140, // pa -> Guru
946, 10, // pa_PK -> Arab
952, 345, // pal -> Phli
956, 495, // peo -> Xpeo
960, 10, // phl -> Arab
964, 350, // phn -> Phnx
968, 45, // pka -> Brah
972, 130, // pnt -> Grek
976, 95, // ppa -> Deva
980, 195, // pra -> Khar
984, 10, // prd -> Arab
988, 10, // ps -> Arab
991, 95, // raj -> Deva
995, 365, // rhg -> Rohg
999, 450, // rif -> Tfng
1003, 95, // rjs -> Deva
1007, 40, // rkt -> Beng
1011, 10, // rmt -> Arab
1015, 90, // ru -> Cyrl
1018, 90, // rue -> Cyrl
1022, 185, // ryu -> Kana
1026, 95, // sa -> Deva
1029, 90, // sah -> Cyrl
1033, 315, // sat -> Olck
1037, 385, // saz -> Saur
1041, 95, // sck -> Deva
1045, 10, // scl -> Arab
1049, 10, // sd -> Arab
1052, 95, // sd_IN -> Deva
1058, 10, // sdh -> Arab
1062, 310, // sga -> Ogam
1066, 105, // sgw -> Ethi
1070, 450, // shi -> Tfng
1074, 290, // shn -> Mymr
1078, 10, // shu -> Arab
1082, 395, // si -> Sinh
1085, 10, // skr -> Arab
1089, 375, // smp -> Samr
1093, 400, // sog -> Sogd
1097, 460, // sou -> Thai
1101, 90, // sr -> Cyrl
1104, 405, // srb -> Sora
1108, 95, // srx -> Deva
1112, 10, // swb -> Arab
1116, 95, // swv -> Deva
1120, 40, // syl -> Beng
1124, 415, // syr -> Syrc
1128, 430, // ta -> Taml
1131, 95, // taj -> Deva
1135, 210, // tcy -> Knda
1139, 420, // tdd -> Tale
1143, 95, // tdg -> Deva
1147, 95, // tdh -> Deva
1151, 445, // te -> Telu
1154, 90, // tg -> Cyrl
1157, 10, // tg_PK -> Arab
1163, 460, // th -> Thai
1166, 95, // thl -> Deva
1170, 95, // thq -> Deva
1174, 95, // thr -> Deva
1178, 105, // ti -> Ethi
1181, 105, // tig -> Ethi
1185, 95, // tkt -> Deva
1189, 10, // trw -> Arab
1193, 130, // tsd -> Grek
1197, 95, // tsf -> Deva
1201, 465, // tsj -> Tibt
1205, 90, // tt -> Cyrl
1208, 460, // tts -> Thai
1212, 435, // txg -> Tang
1216, 475, // txo -> Toto
1220, 90, // tyv -> Cyrl
1224, 0, // udi -> Aghb
1228, 90, // udm -> Cyrl
1232, 10, // ug -> Arab
1235, 90, // ug_KZ -> Cyrl
1241, 90, // ug_MN -> Cyrl
1247, 480, // uga -> Ugar
1251, 90, // uk -> Cyrl
1254, 40, // unr -> Beng
1258, 95, // unr_NP -> Deva
1265, 40, // unx -> Beng
1269, 10, // ur -> Arab
1272, 10, // uz_AF -> Arab
1278, 90, // uz_CN -> Cyrl
1284, 485, // vai -> Vaii
1288, 105, // wal -> Ethi
1292, 445, // wbq -> Telu
1296, 95, // wbr -> Deva
1300, 10, // wni -> Arab
1304, 115, // wsg -> Gong
1308, 95, // wtm -> Deva
1312, 145, // wuu -> Hans
1316, 75, // xco -> Chrs
1320, 60, // xcr -> Cari
1324, 245, // xlc -> Lyci
1328, 250, // xld -> Lydi
1332, 110, // xmf -> Geor
1336, 260, // xmn -> Mani
1340, 270, // xmr -> Merc
1344, 295, // xna -> Narb
1348, 95, // xnr -> Deva
1352, 360, // xpr -> Prti
1356, 380, // xsa -> Sarb
1360, 95, // xsr -> Deva
1364, 155, // yi -> Hebr
1367, 150, // yue -> Hant
1371, 145, // yue_CN -> Hans
1378, 10, // zdj -> Arab
1382, 450, // zgh -> Tfng
1386, 145, // zh -> Hans
1389, 150, // zh_AU -> Hant
1395, 150, // zh_BN -> Hant
1401, 150, // zh_GB -> Hant
1407, 150, // zh_GF -> Hant
1413, 150, // zh_HK -> Hant
1419, 150, // zh_ID -> Hant
1425, 150, // zh_MO -> Hant
1431, 150, // zh_PA -> Hant
1437, 150, // zh_PF -> Hant
1443, 150, // zh_PH -> Hant
1449, 150, // zh_SR -> Hant
1455, 150, // zh_TH -> Hant
1461, 150, // zh_TW -> Hant
1467, 150, // zh_US -> Hant
1473, 150, // zh_VN -> Hant
1479, 305, // zhx -> Nshu
1483, 205, // zkt -> Kits
};
//======================================================================
// Parent locale table
const char parentLocaleChars[] =
"az_Arab\0az_Cyrl\0bal_Latn\0blt_Latn\0bm_Nkoo\0bs_Cyrl\0byn_Latn\0"
"cu_Glag\0dje_Arab\0dyo_Arab\0en_001\0en_150\0en_AG\0en_AI\0en_AT\0"
"en_AU\0en_BB\0en_BE\0en_BM\0en_BS\0en_BW\0en_BZ\0en_CC\0en_CH\0"
"en_CK\0en_CM\0en_CX\0en_CY\0en_DE\0en_DG\0en_DK\0en_DM\0en_Dsrt\0"
"en_ER\0en_FI\0en_FJ\0en_FK\0en_FM\0en_GB\0en_GD\0en_GG\0en_GH\0"
"en_GI\0en_GM\0en_GY\0en_HK\0en_IE\0en_IL\0en_IM\0en_IN\0en_IO\0"
"en_JE\0en_JM\0en_KE\0en_KI\0en_KN\0en_KY\0en_LC\0en_LR\0en_LS\0"
"en_MG\0en_MO\0en_MS\0en_MT\0en_MU\0en_MV\0en_MW\0en_MY\0en_NA\0"
"en_NF\0en_NG\0en_NL\0en_NR\0en_NU\0en_NZ\0en_PG\0en_PK\0en_PN\0"
"en_PW\0en_RW\0en_SB\0en_SC\0en_SD\0en_SE\0en_SG\0en_SH\0en_SI\0"
"en_SL\0en_SS\0en_SX\0en_SZ\0en_Shaw\0en_TC\0en_TK\0en_TO\0en_TT\0"
"en_TV\0en_TZ\0en_UG\0en_VC\0en_VG\0en_VU\0en_WS\0en_ZA\0en_ZM\0"
"en_ZW\0es_419\0es_AR\0es_BO\0es_BR\0es_BZ\0es_CL\0es_CO\0es_CR\0"
"es_CU\0es_DO\0es_EC\0es_GT\0es_HN\0es_MX\0es_NI\0es_PA\0es_PE\0"
"es_PR\0es_PY\0es_SV\0es_US\0es_UY\0es_VE\0ff_Adlm\0ff_Arab\0fr_HT\0"
"ha_Arab\0hi_Latn\0ht\0iu_Latn\0kk_Arab\0ks_Deva\0ku_Arab\0ky_Arab\0"
"ky_Latn\0ml_Arab\0mn_Mong\0mni_Mtei\0ms_Arab\0nb\0nn\0no\0pa_Arab\0"
"pt_AO\0pt_CH\0pt_CV\0pt_FR\0pt_GQ\0pt_GW\0pt_LU\0pt_MO\0pt_MZ\0"
"pt_PT\0pt_ST\0pt_TL\0root\0sat_Deva\0sd_Deva\0sd_Khoj\0sd_Sind\0"
"shi_Latn\0so_Arab\0sr_Latn\0sw_Arab\0tg_Arab\0ug_Cyrl\0uz_Arab\0"
"uz_Cyrl\0vai_Latn\0wo_Arab\0yo_Arab\0yue_Hans\0zh_Hant\0zh_Hant_HK\0"
"zh_Hant_MO\0";
const int32_t parentLocaleTable[] = {
0, 1017, // az_Arab -> root
8, 1017, // az_Cyrl -> root
16, 1017, // bal_Latn -> root
25, 1017, // blt_Latn -> root
34, 1017, // bm_Nkoo -> root
42, 1017, // bs_Cyrl -> root
50, 1017, // byn_Latn -> root
59, 1017, // cu_Glag -> root
67, 1017, // dje_Arab -> root
76, 1017, // dyo_Arab -> root
92, 85, // en_150 -> en_001
99, 85, // en_AG -> en_001
105, 85, // en_AI -> en_001
111, 92, // en_AT -> en_150
117, 85, // en_AU -> en_001
123, 85, // en_BB -> en_001
129, 92, // en_BE -> en_150
135, 85, // en_BM -> en_001
141, 85, // en_BS -> en_001
147, 85, // en_BW -> en_001
153, 85, // en_BZ -> en_001
159, 85, // en_CC -> en_001
165, 92, // en_CH -> en_150
171, 85, // en_CK -> en_001
177, 85, // en_CM -> en_001
183, 85, // en_CX -> en_001
189, 85, // en_CY -> en_001
195, 92, // en_DE -> en_150
201, 85, // en_DG -> en_001
207, 92, // en_DK -> en_150
213, 85, // en_DM -> en_001
219, 1017, // en_Dsrt -> root
227, 85, // en_ER -> en_001
233, 92, // en_FI -> en_150
239, 85, // en_FJ -> en_001
245, 85, // en_FK -> en_001
251, 85, // en_FM -> en_001
257, 85, // en_GB -> en_001
263, 85, // en_GD -> en_001
269, 85, // en_GG -> en_001
275, 85, // en_GH -> en_001
281, 85, // en_GI -> en_001
287, 85, // en_GM -> en_001
293, 85, // en_GY -> en_001
299, 85, // en_HK -> en_001
305, 85, // en_IE -> en_001
311, 85, // en_IL -> en_001
317, 85, // en_IM -> en_001
323, 85, // en_IN -> en_001
329, 85, // en_IO -> en_001
335, 85, // en_JE -> en_001
341, 85, // en_JM -> en_001
347, 85, // en_KE -> en_001
353, 85, // en_KI -> en_001
359, 85, // en_KN -> en_001
365, 85, // en_KY -> en_001
371, 85, // en_LC -> en_001
377, 85, // en_LR -> en_001
383, 85, // en_LS -> en_001
389, 85, // en_MG -> en_001
395, 85, // en_MO -> en_001
401, 85, // en_MS -> en_001
407, 85, // en_MT -> en_001
413, 85, // en_MU -> en_001
419, 85, // en_MV -> en_001
425, 85, // en_MW -> en_001
431, 85, // en_MY -> en_001
437, 85, // en_NA -> en_001
443, 85, // en_NF -> en_001
449, 85, // en_NG -> en_001
455, 92, // en_NL -> en_150
461, 85, // en_NR -> en_001
467, 85, // en_NU -> en_001
473, 85, // en_NZ -> en_001
479, 85, // en_PG -> en_001
485, 85, // en_PK -> en_001
491, 85, // en_PN -> en_001
497, 85, // en_PW -> en_001
503, 85, // en_RW -> en_001
509, 85, // en_SB -> en_001
515, 85, // en_SC -> en_001
521, 85, // en_SD -> en_001
527, 92, // en_SE -> en_150
533, 85, // en_SG -> en_001
539, 85, // en_SH -> en_001
545, 92, // en_SI -> en_150
551, 85, // en_SL -> en_001
557, 85, // en_SS -> en_001
563, 85, // en_SX -> en_001
569, 85, // en_SZ -> en_001
575, 1017, // en_Shaw -> root
583, 85, // en_TC -> en_001
589, 85, // en_TK -> en_001
595, 85, // en_TO -> en_001
601, 85, // en_TT -> en_001
607, 85, // en_TV -> en_001
613, 85, // en_TZ -> en_001
619, 85, // en_UG -> en_001
625, 85, // en_VC -> en_001
631, 85, // en_VG -> en_001
637, 85, // en_VU -> en_001
643, 85, // en_WS -> en_001
649, 85, // en_ZA -> en_001
655, 85, // en_ZM -> en_001
661, 85, // en_ZW -> en_001
674, 667, // es_AR -> es_419
680, 667, // es_BO -> es_419
686, 667, // es_BR -> es_419
692, 667, // es_BZ -> es_419
698, 667, // es_CL -> es_419
704, 667, // es_CO -> es_419
710, 667, // es_CR -> es_419
716, 667, // es_CU -> es_419
722, 667, // es_DO -> es_419
728, 667, // es_EC -> es_419
734, 667, // es_GT -> es_419
740, 667, // es_HN -> es_419
746, 667, // es_MX -> es_419
752, 667, // es_NI -> es_419
758, 667, // es_PA -> es_419
764, 667, // es_PE -> es_419
770, 667, // es_PR -> es_419
776, 667, // es_PY -> es_419
782, 667, // es_SV -> es_419
788, 667, // es_US -> es_419
794, 667, // es_UY -> es_419
800, 667, // es_VE -> es_419
806, 1017, // ff_Adlm -> root
814, 1017, // ff_Arab -> root
828, 1017, // ha_Arab -> root
836, 323, // hi_Latn -> en_IN
844, 822, // ht -> fr_HT
847, 1017, // iu_Latn -> root
855, 1017, // kk_Arab -> root
863, 1017, // ks_Deva -> root
871, 1017, // ku_Arab -> root
879, 1017, // ky_Arab -> root
887, 1017, // ky_Latn -> root
895, 1017, // ml_Arab -> root
903, 1017, // mn_Mong -> root
911, 1017, // mni_Mtei -> root
920, 1017, // ms_Arab -> root
928, 934, // nb -> no
931, 934, // nn -> no
937, 1017, // pa_Arab -> root
945, 999, // pt_AO -> pt_PT
951, 999, // pt_CH -> pt_PT
957, 999, // pt_CV -> pt_PT
963, 999, // pt_FR -> pt_PT
969, 999, // pt_GQ -> pt_PT
975, 999, // pt_GW -> pt_PT
981, 999, // pt_LU -> pt_PT
987, 999, // pt_MO -> pt_PT
993, 999, // pt_MZ -> pt_PT
1005, 999, // pt_ST -> pt_PT
1011, 999, // pt_TL -> pt_PT
1022, 1017, // sat_Deva -> root
1031, 1017, // sd_Deva -> root
1039, 1017, // sd_Khoj -> root
1047, 1017, // sd_Sind -> root
1055, 1017, // shi_Latn -> root
1064, 1017, // so_Arab -> root
1072, 1017, // sr_Latn -> root
1080, 1017, // sw_Arab -> root
1088, 1017, // tg_Arab -> root
1096, 1017, // ug_Cyrl -> root
1104, 1017, // uz_Arab -> root
1112, 1017, // uz_Cyrl -> root
1120, 1017, // vai_Latn -> root
1129, 1017, // wo_Arab -> root
1137, 1017, // yo_Arab -> root
1145, 1017, // yue_Hans -> root
1154, 1017, // zh_Hant -> root
1173, 1162, // zh_Hant_MO -> zh_Hant_HK
};
#endif // INCLUDED_FROM_URESBUND_CPP

Просмотреть файл

@ -60,7 +60,7 @@ LocaleMatcher::Result::Result(LocaleMatcher::Result &&src) U_NOEXCEPT :
if (desiredIsOwned) {
src.desiredLocale = nullptr;
src.desiredIndex = -1;
src.desiredIsOwned = FALSE;
src.desiredIsOwned = false;
}
}
@ -82,7 +82,7 @@ LocaleMatcher::Result &LocaleMatcher::Result::operator=(LocaleMatcher::Result &&
if (desiredIsOwned) {
src.desiredLocale = nullptr;
src.desiredIndex = -1;
src.desiredIsOwned = FALSE;
src.desiredIsOwned = false;
}
return *this;
}
@ -287,10 +287,10 @@ LocaleMatcher::Builder &LocaleMatcher::Builder::internalSetThresholdDistance(int
#endif
UBool LocaleMatcher::Builder::copyErrorTo(UErrorCode &outErrorCode) const {
if (U_FAILURE(outErrorCode)) { return TRUE; }
if (U_SUCCESS(errorCode_)) { return FALSE; }
if (U_FAILURE(outErrorCode)) { return true; }
if (U_SUCCESS(errorCode_)) { return false; }
outErrorCode = errorCode_;
return TRUE;
return true;
}
LocaleMatcher LocaleMatcher::Builder::build(UErrorCode &errorCode) const {
@ -632,30 +632,30 @@ const Locale *LocaleMatcher::getBestMatchForListString(
LocaleMatcher::Result LocaleMatcher::getBestMatchResult(
const Locale &desiredLocale, UErrorCode &errorCode) const {
if (U_FAILURE(errorCode)) {
return Result(nullptr, defaultLocale, -1, -1, FALSE);
return Result(nullptr, defaultLocale, -1, -1, false);
}
int32_t suppIndex = getBestSuppIndex(
getMaximalLsrOrUnd(likelySubtags, desiredLocale, errorCode),
nullptr, errorCode);
if (U_FAILURE(errorCode) || suppIndex < 0) {
return Result(nullptr, defaultLocale, -1, -1, FALSE);
return Result(nullptr, defaultLocale, -1, -1, false);
} else {
return Result(&desiredLocale, supportedLocales[suppIndex], 0, suppIndex, FALSE);
return Result(&desiredLocale, supportedLocales[suppIndex], 0, suppIndex, false);
}
}
LocaleMatcher::Result LocaleMatcher::getBestMatchResult(
Locale::Iterator &desiredLocales, UErrorCode &errorCode) const {
if (U_FAILURE(errorCode) || !desiredLocales.hasNext()) {
return Result(nullptr, defaultLocale, -1, -1, FALSE);
return Result(nullptr, defaultLocale, -1, -1, false);
}
LocaleLsrIterator lsrIter(likelySubtags, desiredLocales, ULOCMATCH_TEMPORARY_LOCALES);
int32_t suppIndex = getBestSuppIndex(lsrIter.next(errorCode), &lsrIter, errorCode);
if (U_FAILURE(errorCode) || suppIndex < 0) {
return Result(nullptr, defaultLocale, -1, -1, FALSE);
return Result(nullptr, defaultLocale, -1, -1, false);
} else {
return Result(lsrIter.orphanRemembered(), supportedLocales[suppIndex],
lsrIter.getBestDesiredIndex(), suppIndex, TRUE);
lsrIter.getBestDesiredIndex(), suppIndex, true);
}
}

Просмотреть файл

@ -234,7 +234,7 @@ void LocalePriorityList::sort(UErrorCode &errorCode) {
// The comparator forces a stable sort via the item index.
if (U_FAILURE(errorCode) || getLength() <= 1 || !hasWeights) { return; }
uprv_sortArray(list->array.getAlias(), listLength, sizeof(LocaleAndWeight),
compareLocaleAndWeight, nullptr, FALSE, &errorCode);
compareLocaleAndWeight, nullptr, false, &errorCode);
}
U_NAMESPACE_END

Просмотреть файл

@ -37,7 +37,7 @@ U_NAMESPACE_BEGIN
static icu::Locale* availableLocaleList = NULL;
static int32_t availableLocaleListCount;
static icu::UInitOnce gInitOnceLocale = U_INITONCE_INITIALIZER;
static icu::UInitOnce gInitOnceLocale {};
U_NAMESPACE_END
@ -54,7 +54,7 @@ static UBool U_CALLCONV locale_available_cleanup(void)
availableLocaleListCount = 0;
gInitOnceLocale.reset();
return TRUE;
return true;
}
U_CDECL_END
@ -102,7 +102,7 @@ namespace {
// Enough capacity for the two lists in the res_index.res file
const char** gAvailableLocaleNames[2] = {};
int32_t gAvailableLocaleCounts[2] = {};
icu::UInitOnce ginstalledLocalesInitOnce = U_INITONCE_INITIALIZER;
icu::UInitOnce ginstalledLocalesInitOnce {};
class AvailableLocalesSink : public ResourceSink {
public:
@ -203,7 +203,7 @@ static UBool U_CALLCONV uloc_cleanup(void) {
gAvailableLocaleCounts[i] = 0;
}
ginstalledLocalesInitOnce.reset();
return TRUE;
return true;
}
// Load Installed Locales. This function will be called exactly once

Просмотреть файл

@ -514,11 +514,11 @@ uloc_getDisplayName(const char *locale,
UChar formatCloseParen = 0x0029; // )
UChar formatReplaceCloseParen = 0x005D; // ]
UBool haveLang = TRUE; /* assume true, set false if we find we don't have
UBool haveLang = true; /* assume true, set false if we find we don't have
a lang component in the locale */
UBool haveRest = TRUE; /* assume true, set false if we find we don't have
UBool haveRest = true; /* assume true, set false if we find we don't have
any other component in the locale */
UBool retry = FALSE; /* set true if we need to retry, see below */
UBool retry = false; /* set true if we need to retry, see below */
int32_t langi = 0; /* index of the language substitution (0 or 1), virtually always 0 */
@ -625,7 +625,7 @@ uloc_getDisplayName(const char *locale,
}
for(int32_t subi=0,resti=0;subi<2;) { /* iterate through patterns 0 and 1*/
UBool subdone = FALSE; /* set true when ready to move to next substitution */
UBool subdone = false; /* set true when ready to move to next substitution */
/* prep p and cap for calls to get display components, pin cap to 0 since
they complain if cap is negative */
@ -643,10 +643,10 @@ uloc_getDisplayName(const char *locale,
length+=langLen;
haveLang=langLen>0;
}
subdone=TRUE;
subdone=true;
} else { /* {1} */
if(!haveRest) {
subdone=TRUE;
subdone=true;
} else {
int32_t len; /* length of component (plus other stuff) we just fetched */
switch(resti++) {
@ -667,7 +667,7 @@ uloc_getDisplayName(const char *locale,
const char* kw=uenum_next(kenum.getAlias(), &len, pErrorCode);
if (kw == NULL) {
len=0; /* mark that we didn't add a component */
subdone=TRUE;
subdone=true;
} else {
/* incorporating this behavior into the loop made it even more complex,
so just special case it here */
@ -772,7 +772,7 @@ uloc_getDisplayName(const char *locale,
/* would have fit, but didn't because of pattern prefix. */
sub0Pos=0; /* stops initial padding (and a second retry,
so we won't end up here again) */
retry=TRUE;
retry=true;
}
}
}

Просмотреть файл

@ -45,13 +45,13 @@ enum {
};
LocaleDistance *gLocaleDistance = nullptr;
UInitOnce gInitOnce = U_INITONCE_INITIALIZER;
UInitOnce gInitOnce {};
UBool U_CALLCONV cleanup() {
delete gLocaleDistance;
gLocaleDistance = nullptr;
gInitOnce.reset();
return TRUE;
return true;
}
} // namespace

Просмотреть файл

@ -403,7 +403,7 @@ struct LocaleDisplayNamesImpl::CapitalizationContextSink : public ResourceSink {
LocaleDisplayNamesImpl& parent;
CapitalizationContextSink(LocaleDisplayNamesImpl& _parent)
: hasCapitalizationUsage(FALSE), parent(_parent) {}
: hasCapitalizationUsage(false), parent(_parent) {}
virtual ~CapitalizationContextSink();
virtual void put(const char *key, ResourceValue &value, UBool /*noFallback*/,
@ -437,8 +437,8 @@ struct LocaleDisplayNamesImpl::CapitalizationContextSink : public ResourceSink {
int32_t titlecaseInt = (parent.capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU) ? intVector[0] : intVector[1];
if (titlecaseInt == 0) { continue; }
parent.fCapitalization[usageEnum] = TRUE;
hasCapitalizationUsage = TRUE;
parent.fCapitalization[usageEnum] = true;
hasCapitalizationUsage = true;
}
}
};
@ -490,7 +490,7 @@ LocaleDisplayNamesImpl::initialize(void) {
#if !UCONFIG_NO_BREAK_ITERATION
// Only get the context data if we need it! This is a const object so we know now...
// Also check whether we will need a break iterator (depends on the data)
UBool needBrkIter = FALSE;
UBool needBrkIter = false;
if (capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_STANDALONE) {
LocalUResourceBundlePointer resource(ures_open(NULL, locale.getName(), &status));
if (U_FAILURE(status)) { return; }
@ -593,8 +593,8 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", script, "_", country, (char *)0);
localeIdName(buffer, resultName, false);
if (!resultName.isBogus()) {
hasScript = FALSE;
hasCountry = FALSE;
hasScript = false;
hasCountry = false;
break;
}
}
@ -602,7 +602,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", script, (char *)0);
localeIdName(buffer, resultName, false);
if (!resultName.isBogus()) {
hasScript = FALSE;
hasScript = false;
break;
}
}
@ -610,11 +610,11 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", country, (char*)0);
localeIdName(buffer, resultName, false);
if (!resultName.isBogus()) {
hasCountry = FALSE;
hasCountry = false;
break;
}
}
} while (FALSE);
} while (false);
}
if (resultName.isBogus() || resultName.isEmpty()) {
localeIdName(lang, resultName, substitute == UDISPCTX_SUBSTITUTE);
@ -629,7 +629,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
UErrorCode status = U_ZERO_ERROR;
if (hasScript) {
UnicodeString script_str = scriptDisplayName(script, temp, TRUE);
UnicodeString script_str = scriptDisplayName(script, temp, true);
if (script_str.isBogus()) {
result.setToBogus();
return result;
@ -637,7 +637,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
resultRemainder.append(script_str);
}
if (hasCountry) {
UnicodeString region_str = regionDisplayName(country, temp, TRUE);
UnicodeString region_str = regionDisplayName(country, temp, true);
if (region_str.isBogus()) {
result.setToBogus();
return result;
@ -645,7 +645,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
appendWithSep(resultRemainder, region_str);
}
if (hasVariant) {
UnicodeString variant_str = variantDisplayName(variant, temp, TRUE);
UnicodeString variant_str = variantDisplayName(variant, temp, true);
if (variant_str.isBogus()) {
result.setToBogus();
return result;
@ -666,10 +666,10 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
if (U_FAILURE(status) || status == U_STRING_NOT_TERMINATED_WARNING) {
return result;
}
keyDisplayName(key, temp, TRUE);
keyDisplayName(key, temp, true);
temp.findAndReplace(formatOpenParen, formatReplaceOpenParen);
temp.findAndReplace(formatCloseParen, formatReplaceCloseParen);
keyValueDisplayName(key, value, temp2, TRUE);
keyValueDisplayName(key, value, temp2, true);
temp2.findAndReplace(formatOpenParen, formatReplaceOpenParen);
temp2.findAndReplace(formatCloseParen, formatReplaceCloseParen);
if (temp2 != UnicodeString(value, -1, US_INV)) {
@ -797,13 +797,13 @@ LocaleDisplayNamesImpl::scriptDisplayName(const char* script,
UnicodeString&
LocaleDisplayNamesImpl::scriptDisplayName(const char* script,
UnicodeString& result) const {
return scriptDisplayName(script, result, FALSE);
return scriptDisplayName(script, result, false);
}
UnicodeString&
LocaleDisplayNamesImpl::scriptDisplayName(UScriptCode scriptCode,
UnicodeString& result) const {
return scriptDisplayName(uscript_getName(scriptCode), result, FALSE);
return scriptDisplayName(uscript_getName(scriptCode), result, false);
}
UnicodeString&
@ -827,7 +827,7 @@ LocaleDisplayNamesImpl::regionDisplayName(const char* region,
UnicodeString&
LocaleDisplayNamesImpl::regionDisplayName(const char* region,
UnicodeString& result) const {
return regionDisplayName(region, result, FALSE);
return regionDisplayName(region, result, false);
}
@ -847,7 +847,7 @@ LocaleDisplayNamesImpl::variantDisplayName(const char* variant,
UnicodeString&
LocaleDisplayNamesImpl::variantDisplayName(const char* variant,
UnicodeString& result) const {
return variantDisplayName(variant, result, FALSE);
return variantDisplayName(variant, result, false);
}
UnicodeString&
@ -866,7 +866,7 @@ LocaleDisplayNamesImpl::keyDisplayName(const char* key,
UnicodeString&
LocaleDisplayNamesImpl::keyDisplayName(const char* key,
UnicodeString& result) const {
return keyDisplayName(key, result, FALSE);
return keyDisplayName(key, result, false);
}
UnicodeString&
@ -908,7 +908,7 @@ UnicodeString&
LocaleDisplayNamesImpl::keyValueDisplayName(const char* key,
const char* value,
UnicodeString& result) const {
return keyValueDisplayName(key, value, result, FALSE);
return keyValueDisplayName(key, value, result, false);
}
////////////////////////////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -64,7 +64,7 @@ U_CDECL_END
U_NAMESPACE_BEGIN
static Locale *gLocaleCache = NULL;
static UInitOnce gLocaleCacheInitOnce = U_INITONCE_INITIALIZER;
static UInitOnce gLocaleCacheInitOnce {};
// gDefaultLocaleMutex protects all access to gDefaultLocalesHashT and gDefaultLocale.
static UMutex gDefaultLocaleMutex;
@ -128,7 +128,7 @@ static UBool U_CALLCONV locale_cleanup(void)
gDefaultLocalesHashT = NULL;
}
gDefaultLocale = NULL;
return TRUE;
return true;
}
@ -171,7 +171,7 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) {
// Synchronize this entire function.
Mutex lock(&gDefaultLocaleMutex);
UBool canonicalize = FALSE;
UBool canonicalize = false;
// If given a NULL string for the locale id, grab the default
// name from the system.
@ -179,7 +179,7 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) {
// the current ICU default locale.)
if (id == NULL) {
id = uprv_getDefaultLocaleID(); // This function not thread safe? TODO: verify.
canonicalize = TRUE; // always canonicalize host ID
canonicalize = true; // always canonicalize host ID
}
CharString localeNameBuf;
@ -212,7 +212,7 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) {
status = U_MEMORY_ALLOCATION_ERROR;
return gDefaultLocale;
}
newDefault->init(localeNameBuf.data(), FALSE);
newDefault->init(localeNameBuf.data(), false);
uhash_put(gDefaultLocalesHashT, (char*) newDefault->getName(), newDefault, &status);
if (U_FAILURE(status)) {
return gDefaultLocale;
@ -269,7 +269,7 @@ Locale::~Locale()
Locale::Locale()
: UObject(), fullName(fullNameBuffer), baseName(NULL)
{
init(NULL, FALSE);
init(NULL, false);
}
/*
@ -292,7 +292,7 @@ Locale::Locale( const char * newLanguage,
{
if( (newLanguage==NULL) && (newCountry == NULL) && (newVariant == NULL) )
{
init(NULL, FALSE); /* shortcut */
init(NULL, false); /* shortcut */
}
else
{
@ -397,7 +397,7 @@ Locale::Locale( const char * newLanguage,
}
// Parse it, because for example 'language' might really be a complete
// string.
init(togo.data(), FALSE);
init(togo.data(), false);
}
}
@ -491,7 +491,7 @@ Locale::operator==( const Locale& other) const
namespace {
UInitOnce gKnownCanonicalizedInitOnce = U_INITONCE_INITIALIZER;
UInitOnce gKnownCanonicalizedInitOnce {};
UHashtable *gKnownCanonicalized = nullptr;
static const char* const KNOWN_CANONICALIZED[] = {
@ -521,7 +521,7 @@ static const char* const KNOWN_CANONICALIZED[] = {
static UBool U_CALLCONV cleanupKnownCanonicalized() {
gKnownCanonicalizedInitOnce.reset();
if (gKnownCanonicalized) { uhash_close(gKnownCanonicalized); }
return TRUE;
return true;
}
static void U_CALLCONV loadKnownCanonicalized(UErrorCode &status) {
@ -682,14 +682,14 @@ private:
const AliasData* AliasData::gSingleton = nullptr;
UInitOnce AliasData::gInitOnce = U_INITONCE_INITIALIZER;
UInitOnce AliasData::gInitOnce {};
UBool U_CALLCONV
AliasData::cleanup()
{
gInitOnce.reset();
delete gSingleton;
return TRUE;
return true;
}
void
@ -1817,7 +1817,7 @@ ulocimp_isCanonicalizedLocaleForTest(const char* localeName)
/*This function initializes a Locale from a C locale ID*/
Locale& Locale::init(const char* localeID, UBool canonicalize)
{
fIsBogus = FALSE;
fIsBogus = false;
/* Free our current storage */
if ((baseName != fullName) && (baseName != fullNameBuffer)) {
uprv_free(baseName);
@ -2021,7 +2021,7 @@ Locale::setToBogus() {
*language = 0;
*script = 0;
*country = 0;
fIsBogus = TRUE;
fIsBogus = true;
variantBegin = 0;
}
@ -2071,7 +2071,7 @@ Locale::addLikelySubtags(UErrorCode& status) {
return;
}
init(maximizedLocaleID.data(), /*canonicalize=*/FALSE);
init(maximizedLocaleID.data(), /*canonicalize=*/false);
if (isBogus()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@ -2093,7 +2093,7 @@ Locale::minimizeSubtags(UErrorCode& status) {
return;
}
init(minimizedLocaleID.data(), /*canonicalize=*/FALSE);
init(minimizedLocaleID.data(), /*canonicalize=*/false);
if (isBogus()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@ -2112,7 +2112,7 @@ Locale::canonicalize(UErrorCode& status) {
if (U_FAILURE(status)) {
return;
}
init(uncanonicalized.data(), /*canonicalize=*/TRUE);
init(uncanonicalized.data(), /*canonicalize=*/true);
if (isBogus()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@ -2159,7 +2159,7 @@ Locale::forLanguageTag(StringPiece tag, UErrorCode& status)
return result;
}
result.init(localeID.data(), /*canonicalize=*/FALSE);
result.init(localeID.data(), /*canonicalize=*/false);
if (result.isBogus()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@ -2178,7 +2178,7 @@ Locale::toLanguageTag(ByteSink& sink, UErrorCode& status) const
return;
}
ulocimp_toLanguageTag(fullName, sink, /*strict=*/FALSE, &status);
ulocimp_toLanguageTag(fullName, sink, /*strict=*/false, &status);
}
Locale U_EXPORT2
@ -2186,7 +2186,7 @@ Locale::createFromName (const char *name)
{
if (name) {
Locale l("");
l.init(name, FALSE);
l.init(name, false);
return l;
}
else {
@ -2197,7 +2197,7 @@ Locale::createFromName (const char *name)
Locale U_EXPORT2
Locale::createCanonical(const char* name) {
Locale loc("");
loc.init(name, TRUE);
loc.init(name, true);
return loc;
}
@ -2240,7 +2240,7 @@ const char* const* U_EXPORT2 Locale::getISOLanguages()
// Set the locale's data based on a posix id.
void Locale::setFromPOSIXID(const char *posixID)
{
init(posixID, TRUE);
init(posixID, true);
}
const Locale & U_EXPORT2
@ -2530,7 +2530,7 @@ Locale::createKeywords(UErrorCode &status) const
if(assignment > variantStart) {
CharString keywords;
CharStringByteSink sink(&keywords);
ulocimp_getKeywords(variantStart+1, '@', sink, FALSE, &status);
ulocimp_getKeywords(variantStart+1, '@', sink, false, &status);
if (U_SUCCESS(status) && !keywords.isEmpty()) {
result = new KeywordEnumeration(keywords.data(), keywords.length(), 0, status);
if (!result) {
@ -2559,7 +2559,7 @@ Locale::createUnicodeKeywords(UErrorCode &status) const
if(assignment > variantStart) {
CharString keywords;
CharStringByteSink sink(&keywords);
ulocimp_getKeywords(variantStart+1, '@', sink, FALSE, &status);
ulocimp_getKeywords(variantStart+1, '@', sink, false, &status);
if (U_SUCCESS(status) && !keywords.isEmpty()) {
result = new UnicodeKeywordEnumeration(keywords.data(), keywords.length(), 0, status);
if (!result) {

Просмотреть файл

@ -201,7 +201,7 @@ createTagStringWithAlternates(
**/
char tagBuffer[ULOC_FULLNAME_CAPACITY];
int32_t tagLength = 0;
UBool regionAppended = FALSE;
UBool regionAppended = false;
if (langLength > 0) {
appendTag(
@ -209,7 +209,7 @@ createTagStringWithAlternates(
langLength,
tagBuffer,
&tagLength,
/*withSeparator=*/FALSE);
/*withSeparator=*/false);
}
else if (alternateTags == NULL) {
/*
@ -246,7 +246,7 @@ createTagStringWithAlternates(
alternateLangLength,
tagBuffer,
&tagLength,
/*withSeparator=*/FALSE);
/*withSeparator=*/false);
}
}
@ -256,7 +256,7 @@ createTagStringWithAlternates(
scriptLength,
tagBuffer,
&tagLength,
/*withSeparator=*/TRUE);
/*withSeparator=*/true);
}
else if (alternateTags != NULL) {
/*
@ -281,7 +281,7 @@ createTagStringWithAlternates(
alternateScriptLength,
tagBuffer,
&tagLength,
/*withSeparator=*/TRUE);
/*withSeparator=*/true);
}
}
@ -291,9 +291,9 @@ createTagStringWithAlternates(
regionLength,
tagBuffer,
&tagLength,
/*withSeparator=*/TRUE);
/*withSeparator=*/true);
regionAppended = TRUE;
regionAppended = true;
}
else if (alternateTags != NULL) {
/*
@ -317,9 +317,9 @@ createTagStringWithAlternates(
alternateRegionLength,
tagBuffer,
&tagLength,
/*withSeparator=*/TRUE);
/*withSeparator=*/true);
regionAppended = TRUE;
regionAppended = true;
}
}
@ -622,7 +622,7 @@ createLikelySubtagsString(
likelySubtags,
sink,
err);
return TRUE;
return true;
}
}
@ -678,7 +678,7 @@ createLikelySubtagsString(
likelySubtags,
sink,
err);
return TRUE;
return true;
}
}
@ -734,7 +734,7 @@ createLikelySubtagsString(
likelySubtags,
sink,
err);
return TRUE;
return true;
}
}
@ -789,11 +789,11 @@ createLikelySubtagsString(
likelySubtags,
sink,
err);
return TRUE;
return true;
}
}
return FALSE;
return false;
error:
@ -801,7 +801,7 @@ error:
*err = U_ILLEGAL_ARGUMENT_ERROR;
}
return FALSE;
return false;
}
#define CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength) UPRV_BLOCK_MACRO_BEGIN { \
@ -836,7 +836,7 @@ _uloc_addLikelySubtags(const char* localeID,
const char* trailing = "";
int32_t trailingLength = 0;
int32_t trailingIndex = 0;
UBool success = FALSE;
UBool success = false;
if(U_FAILURE(*err)) {
goto error;
@ -901,7 +901,7 @@ error:
if (!U_FAILURE(*err)) {
*err = U_ILLEGAL_ARGUMENT_ERROR;
}
return FALSE;
return false;
}
// Add likely subtags to the sink
@ -925,7 +925,7 @@ _uloc_minimizeSubtags(const char* localeID,
const char* trailing = "";
int32_t trailingLength = 0;
int32_t trailingIndex = 0;
UBool successGetMax = FALSE;
UBool successGetMax = false;
if(U_FAILURE(*err)) {
goto error;
@ -1248,7 +1248,7 @@ _ulocimp_addLikelySubtags(const char* localeID,
if (U_SUCCESS(*status)) {
return _uloc_addLikelySubtags(localeBuffer.getBuffer(), sink, status);
} else {
return FALSE;
return false;
}
}
@ -1320,14 +1320,14 @@ uloc_isRightToLeft(const char *locale) {
char lang[8];
int32_t langLength = uloc_getLanguage(locale, lang, UPRV_LENGTHOF(lang), &errorCode);
if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING) {
return FALSE;
return false;
}
if (langLength > 0) {
const char* langPtr = uprv_strstr(LANG_DIR_STRING, lang);
if (langPtr != NULL) {
switch (langPtr[langLength]) {
case '-': return FALSE;
case '+': return TRUE;
case '-': return false;
case '+': return true;
default: break; // partial match of a longer code
}
}
@ -1340,12 +1340,12 @@ uloc_isRightToLeft(const char *locale) {
ulocimp_addLikelySubtags(locale, sink, &errorCode);
}
if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING) {
return FALSE;
return false;
}
scriptLength = uloc_getScript(likely.data(), script, UPRV_LENGTHOF(script), &errorCode);
if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING ||
scriptLength == 0) {
return FALSE;
return false;
}
}
UScriptCode scriptCode = (UScriptCode)u_getPropertyValueEnum(UCHAR_SCRIPT, script);
@ -1392,7 +1392,7 @@ ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion,
if (U_FAILURE(*status)) {
rgLen = 0;
} else if (rgLen == 0 && inferRegion) {
// no unicode_region_subtag but inferRegion TRUE, try likely subtags
// no unicode_region_subtag but inferRegion true, try likely subtags
rgStatus = U_ZERO_ERROR;
icu::CharString locBuf;
{

Просмотреть файл

@ -233,7 +233,7 @@ private:
return false;
}
for (int i = 0; i < length; ++i) {
stringArray.getValue(i, value); // returns TRUE because i < length
stringArray.getValue(i, value); // returns true because i < length
rawIndexes[i] = strings.add(value.getUnicodeString(errorCode), errorCode);
if (U_FAILURE(errorCode)) { return false; }
}
@ -245,13 +245,13 @@ private:
namespace {
XLikelySubtags *gLikelySubtags = nullptr;
UInitOnce gInitOnce = U_INITONCE_INITIALIZER;
UInitOnce gInitOnce {};
UBool U_CALLCONV cleanup() {
delete gLikelySubtags;
gLikelySubtags = nullptr;
gInitOnce.reset();
return TRUE;
return true;
}
} // namespace

Просмотреть файл

@ -1053,7 +1053,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
{
uint16_t langID;
uint32_t localeIndex;
UBool bLookup = TRUE;
UBool bLookup = true;
const char *pPosixID = NULL;
#if U_PLATFORM_HAS_WIN32_API && UCONFIG_USE_WINDOWS_LCID_MAPPING_API
@ -1074,7 +1074,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
if (tmpLen > 1) {
int32_t i = 0;
// Only need to look up in table if have _, eg for de-de_phoneb type alternate sort.
bLookup = FALSE;
bLookup = false;
for (i = 0; i < UPRV_LENGTHOF(locName); i++)
{
locName[i] = (char)(windowsLocaleName[i]);
@ -1088,7 +1088,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
// TODO: Should these be mapped from _phoneb to @collation=phonebook, etc.?
locName[i] = '\0';
tmpLen = i;
bLookup = TRUE;
bLookup = true;
break;
}
else if (windowsLocaleName[i] == L'-')
@ -1201,7 +1201,7 @@ uprv_convertToLCIDPlatform(const char* localeID, UErrorCode* status)
char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {};
// this will change it from de_DE@collation=phonebook to de-DE-u-co-phonebk form
(void)uloc_toLanguageTag(mylocaleID, asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), FALSE, status);
(void)uloc_toLanguageTag(mylocaleID, asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, status);
if (U_SUCCESS(*status))
{

Просмотреть файл

@ -21,7 +21,7 @@
#include "umutex.h"
// see LocaleUtility::getAvailableLocaleNames
static icu::UInitOnce LocaleUtilityInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce LocaleUtilityInitOnce {};
static icu::Hashtable * LocaleUtility_cache = NULL;
#define UNDERSCORE_CHAR ((UChar)0x005f)
@ -41,7 +41,7 @@ static UBool U_CALLCONV service_cleanup(void) {
delete LocaleUtility_cache;
LocaleUtility_cache = NULL;
}
return TRUE;
return true;
}

Просмотреть файл

@ -55,7 +55,7 @@ public:
UnicodeString &result);
private:
MessageImpl(); // no constructor: all static methods
MessageImpl() = delete; // no constructor: all static methods
};
U_NAMESPACE_END

Просмотреть файл

@ -97,9 +97,9 @@ public:
UBool ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode);
UBool equals(const MessagePatternList<T, stackCapacity> &other, int32_t length) const {
for(int32_t i=0; i<length; ++i) {
if(a[i]!=other.a[i]) { return FALSE; }
if(a[i]!=other.a[i]) { return false; }
}
return TRUE;
return true;
}
MaybeStackArray<T, stackCapacity> a;
@ -124,13 +124,13 @@ template<typename T, int32_t stackCapacity>
UBool
MessagePatternList<T, stackCapacity>::ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
if(a.getCapacity()>oldLength || a.resize(2*oldLength, oldLength)!=NULL) {
return TRUE;
return true;
}
errorCode=U_MEMORY_ALLOCATION_ERROR;
return FALSE;
return false;
}
// MessagePatternList specializations -------------------------------------- ***
@ -147,7 +147,7 @@ MessagePattern::MessagePattern(UErrorCode &errorCode)
: aposMode(UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE),
partsList(NULL), parts(NULL), partsLength(0),
numericValuesList(NULL), numericValues(NULL), numericValuesLength(0),
hasArgNames(FALSE), hasArgNumbers(FALSE), needsAutoQuoting(FALSE) {
hasArgNames(false), hasArgNumbers(false), needsAutoQuoting(false) {
init(errorCode);
}
@ -155,7 +155,7 @@ MessagePattern::MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &e
: aposMode(mode),
partsList(NULL), parts(NULL), partsLength(0),
numericValuesList(NULL), numericValues(NULL), numericValuesLength(0),
hasArgNames(FALSE), hasArgNumbers(FALSE), needsAutoQuoting(FALSE) {
hasArgNames(false), hasArgNumbers(false), needsAutoQuoting(false) {
init(errorCode);
}
@ -163,7 +163,7 @@ MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseE
: aposMode(UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE),
partsList(NULL), parts(NULL), partsLength(0),
numericValuesList(NULL), numericValues(NULL), numericValuesLength(0),
hasArgNames(FALSE), hasArgNumbers(FALSE), needsAutoQuoting(FALSE) {
hasArgNames(false), hasArgNumbers(false), needsAutoQuoting(false) {
if(init(errorCode)) {
parse(pattern, parseError, errorCode);
}
@ -172,15 +172,15 @@ MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseE
UBool
MessagePattern::init(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
partsList=new MessagePatternPartsList();
if(partsList==NULL) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return FALSE;
return false;
}
parts=partsList->a.getAlias();
return TRUE;
return true;
}
MessagePattern::MessagePattern(const MessagePattern &other)
@ -215,7 +215,7 @@ MessagePattern::operator=(const MessagePattern &other) {
UBool
MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
parts=NULL;
partsLength=0;
@ -225,14 +225,14 @@ MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode)
partsList=new MessagePatternPartsList();
if(partsList==NULL) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return FALSE;
return false;
}
parts=partsList->a.getAlias();
}
if(other.partsLength>0) {
partsList->copyFrom(*other.partsList, other.partsLength, errorCode);
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
parts=partsList->a.getAlias();
partsLength=other.partsLength;
@ -242,19 +242,19 @@ MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode)
numericValuesList=new MessagePatternDoubleList();
if(numericValuesList==NULL) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return FALSE;
return false;
}
numericValues=numericValuesList->a.getAlias();
}
numericValuesList->copyFrom(
*other.numericValuesList, other.numericValuesLength, errorCode);
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
numericValues=numericValuesList->a.getAlias();
numericValuesLength=other.numericValuesLength;
}
return TRUE;
return true;
}
MessagePattern::~MessagePattern() {
@ -303,8 +303,8 @@ void
MessagePattern::clear() {
// Mostly the same as preParse().
msg.remove();
hasArgNames=hasArgNumbers=FALSE;
needsAutoQuoting=FALSE;
hasArgNames=hasArgNumbers=false;
needsAutoQuoting=false;
partsLength=0;
numericValuesLength=0;
}
@ -414,8 +414,8 @@ MessagePattern::preParse(const UnicodeString &pattern, UParseError *parseError,
parseError->postContext[0]=0;
}
msg=pattern;
hasArgNames=hasArgNumbers=FALSE;
needsAutoQuoting=FALSE;
hasArgNames=hasArgNumbers=false;
needsAutoQuoting=false;
partsLength=0;
numericValuesLength=0;
}
@ -458,7 +458,7 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength,
// Add a Part for auto-quoting.
addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0,
u_apos, errorCode); // value=char to be inserted
needsAutoQuoting=TRUE;
needsAutoQuoting=true;
} else {
c=msg.charAt(index);
if(c==u_apos) {
@ -491,7 +491,7 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength,
// Add a Part for auto-quoting.
addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0,
u_apos, errorCode); // value=char to be inserted
needsAutoQuoting=TRUE;
needsAutoQuoting=true;
break;
}
}
@ -500,7 +500,7 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength,
// Add a Part for auto-quoting.
addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0,
u_apos, errorCode); // value=char to be inserted
needsAutoQuoting=TRUE;
needsAutoQuoting=true;
}
}
} else if(UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(parentType) && c==u_pound) {
@ -560,7 +560,7 @@ MessagePattern::parseArg(int32_t index, int32_t argStartLength, int32_t nestingL
errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
return 0;
}
hasArgNumbers=TRUE;
hasArgNumbers=true;
addPart(UMSGPAT_PART_TYPE_ARG_NUMBER, nameIndex, length, number, errorCode);
} else if(number==UMSGPAT_ARG_NAME_NOT_NUMBER) {
int32_t length=index-nameIndex;
@ -569,7 +569,7 @@ MessagePattern::parseArg(int32_t index, int32_t argStartLength, int32_t nestingL
errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
return 0;
}
hasArgNames=TRUE;
hasArgNames=true;
addPart(UMSGPAT_PART_TYPE_ARG_NAME, nameIndex, length, 0, errorCode);
} else { // number<-1 (ARG_NAME_NOT_VALID)
setParseError(parseError, nameIndex); // Bad argument syntax.
@ -727,7 +727,7 @@ MessagePattern::parseChoiceStyle(int32_t index, int32_t nestingLevel,
errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
return 0;
}
parseDouble(numberIndex, index, TRUE, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
parseDouble(numberIndex, index, true, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
if(U_FAILURE(errorCode)) {
return 0;
}
@ -774,8 +774,8 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
return 0;
}
int32_t start=index;
UBool isEmpty=TRUE;
UBool hasOther=FALSE;
UBool isEmpty=true;
UBool hasOther=false;
for(;;) {
// First, collect the selector looking for a small set of terminators.
// It would be a little faster to consider the syntax of each possible
@ -811,7 +811,7 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
return 0;
}
addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, selectorIndex, length, 0, errorCode);
parseDouble(selectorIndex+1, index, FALSE,
parseDouble(selectorIndex+1, index, false,
parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
} else {
index=skipIdentifier(index);
@ -845,12 +845,12 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
return 0;
}
parseDouble(valueIndex, index, FALSE,
parseDouble(valueIndex, index, false,
parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
if(U_FAILURE(errorCode)) {
return 0;
}
isEmpty=FALSE;
isEmpty=false;
continue; // no message fragment after the offset
} else {
// normal selector word
@ -861,7 +861,7 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
}
addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, selectorIndex, length, 0, errorCode);
if(0==msg.compare(selectorIndex, length, kOther, 0, 5)) {
hasOther=TRUE;
hasOther=true;
}
}
}
@ -880,7 +880,7 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
if(U_FAILURE(errorCode)) {
return 0;
}
isEmpty=FALSE;
isEmpty=false;
}
}
@ -901,11 +901,11 @@ MessagePattern::parseArgNumber(const UnicodeString &s, int32_t start, int32_t li
return 0;
} else {
number=0;
badNumber=TRUE; // leading zero
badNumber=true; // leading zero
}
} else if(0x31<=c && c<=0x39) {
number=c-0x30;
badNumber=FALSE;
badNumber=false;
} else {
return UMSGPAT_ARG_NAME_NOT_NUMBER;
}
@ -913,7 +913,7 @@ MessagePattern::parseArgNumber(const UnicodeString &s, int32_t start, int32_t li
c=s.charAt(start++);
if(0x30<=c && c<=0x39) {
if(number>=INT32_MAX/10) {
badNumber=TRUE; // overflow
badNumber=true; // overflow
}
number=number*10+(c-0x30);
} else {

Просмотреть файл

@ -10,14 +10,14 @@
#ifdef INCLUDED_FROM_NORMALIZER2_CPP
static const UVersionInfo norm2_nfc_data_formatVersion={4,0,0,0};
static const UVersionInfo norm2_nfc_data_dataVersion={0xe,0,0,0};
static const UVersionInfo norm2_nfc_data_dataVersion={0xf,0,0,0};
static const int32_t norm2_nfc_data_indexes[Normalizer2Impl::IX_COUNT]={
0x50,0x4c54,0x88bc,0x89bc,0x89bc,0x89bc,0x89bc,0x89bc,0xc0,0x300,0xae2,0x29e0,0x3c66,0xfc00,0x1288,0x3b9c,
0x50,0x4cb8,0x8920,0x8a20,0x8a20,0x8a20,0x8a20,0x8a20,0xc0,0x300,0xae2,0x29e0,0x3c66,0xfc00,0x1288,0x3b9c,
0x3c34,0x3c66,0x300,0
};
static const uint16_t norm2_nfc_data_trieIndex[1748]={
static const uint16_t norm2_nfc_data_trieIndex[1788]={
0,0x40,0x7b,0xbb,0xfb,0x13a,0x17a,0x1b2,0x1f2,0x226,0x254,0x226,0x294,0x2d4,0x313,0x353,
0x393,0x3d2,0x40f,0x44e,0x226,0x226,0x488,0x4c8,0x4f8,0x530,0x226,0x570,0x59f,0x5de,0x226,0x5f3,
0x631,0x65f,0x687,0x6bd,0x6fd,0x73a,0x75a,0x799,0x7d8,0x815,0x834,0x871,0x75a,0x8aa,0x8d8,0x917,
@ -82,14 +82,14 @@ static const uint16_t norm2_nfc_data_trieIndex[1748]={
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x1880,0x18c0,0x1900,0x1940,0x1980,0x19c0,0x1a00,0x1a40,0x1a63,0x1aa3,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ac3,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x657,0x666,0x67e,0x69d,0x6b2,0x6b2,0x6b2,0x6b6,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x67e,0x68e,0x6a6,0x6c5,0x6da,0x6da,0x6da,0x6de,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc0b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x54f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x40c,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1af6,0x226,0x226,0x1b06,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0xdf7,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1b16,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1607,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1607,0x226,0x226,0x226,0x226,0x66b,0x226,0x226,0x226,
0x226,0x1b20,0x54f,0x226,0x226,0x1b30,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x81c,0x226,0x226,
0x1b40,0x226,0x1b50,0x1b5d,0x1b69,0x226,0x226,0x226,0x226,0x414,0x226,0x1b74,0x1b84,0x226,0x226,0x226,
0x811,0x226,0x226,0x226,0x226,0x1b94,0x226,0x226,0x226,0x1b9f,0x226,0x226,0x226,0x226,0x226,0x226,
@ -104,33 +104,35 @@ static const uint16_t norm2_nfc_data_trieIndex[1748]={
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x9eb,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc05,0x226,0x226,0x226,
0x226,0x81b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x1c3d,0x226,0x226,0x226,0xf2c,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0xc08,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x1c3d,0x226,0x226,0x226,0xf2c,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x1c4d,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c4f,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c4d,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x1c4f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c5e,0x1c6e,0x1c7c,0x1c89,0x226,
0x1c95,0x1ca3,0x1cb3,0x226,0x226,0x226,0x226,0xd1b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x1c5e,0x1c6e,0x1c7c,0x1c89,0x226,0x1c95,0x1ca3,0x1cb3,0x226,0x226,
0x226,0x226,0xd1b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cc3,0x1ccb,
0x1cd9,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0xf2c,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x7c9,0x226,
0x226,0x226,0x4fc,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x1ce9,0x226,0x226,0x226,0x226,0x226,0x226,0x1cf5,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d05,0x1d15,0x1d25,0x1d35,0x1d45,0x1d55,0x1d65,0x1d75,0x1d85,
0x1d95,0x1da5,0x1db5,0x1dc5,0x1dd5,0x1de5,0x1df5,0x1e05,0x1e15,0x1e25,0x1e35,0x1e45,0x1e55,0x1e65,0x1e75,0x1e85,
0x1e95,0x1ea5,0x1eb5,0x1ec5,0x1ed5,0x1ee5,0x1ef5,0x1f05,0x1f15,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x1cc3,0x1ccb,0x1cd9,0x226,0x226,0x226,0x226,0x226,0x4f9,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0xf2c,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x7c9,0x226,0x226,0x226,0x4fc,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ce4,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cf4,0x226,0x226,0x226,0x226,
0x226,0x226,0x1d00,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d10,0x1d20,
0x1d30,0x1d40,0x1d50,0x1d60,0x1d70,0x1d80,0x1d90,0x1da0,0x1db0,0x1dc0,0x1dd0,0x1de0,0x1df0,0x1e00,0x1e10,0x1e20,
0x1e30,0x1e40,0x1e50,0x1e60,0x1e70,0x1e80,0x1e90,0x1ea0,0x1eb0,0x1ec0,0x1ed0,0x1ee0,0x1ef0,0x1f00,0x1f10,0x1f20,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x408,0x428,0xc4,0xc4,0xc4,0x448,0x457,0x46d,0x489,
0x4a6,0x4c2,0x4df,0x4fc,0x51b,0x538,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x552,0xc4,0x566,0xc4,0xc4,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x408,0x428,
0xc4,0xc4,0xc4,0x448,0x457,0x46d,0x489,0x4a6,0x4c2,0x4df,0x4fc,0x51b,0x538,0x552,0xc4,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x586,0xc4,0xc4,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0x591,0x5ae,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x5ce,0x5e4,0xc4,
0xc4,0x5f7,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
0xc4,0xc4,0xc4,0x567,0xc4,0x57b,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
0xc4,0xc4,0x617,0x637
0xc4,0xc4,0xc4,0xc4,0x59b,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x5a6,0x5c3,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0x5e3,0x5f9,0x60b,0xc4,0x61e,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x63e,0x65e
};
static const uint16_t norm2_nfc_data_trieData[7974]={
static const uint16_t norm2_nfc_data_trieData[7984]={
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@ -518,7 +520,7 @@ static const uint16_t norm2_nfc_data_trieData[7974]={
1,1,1,1,1,0x3c66,1,0x3c66,0x3c66,0x3c66,0x3c66,0x3c66,0x3c66,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x3c66,
0x3c66,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,0x3c66,1,1,1,1,0x3c66,1,1,1,0x3c66,1,0x3c66,
1,1,1,1,0x3c66,1,1,1,1,0x3c66,1,1,1,0x3c66,0x3c66,0x3c66,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@ -593,49 +595,49 @@ static const uint16_t norm2_nfc_data_trieData[7974]={
0x3304,0x331c,0x3334,0x334c,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,
0xffcc,0xffcc,0xffcc,0xffcc,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,1,0xffcc,
0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,
1,1,1,1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xfe0e,
1,1,1,1,1,0x335b,0x335f,0x3363,0x3367,0x336d,0x2f4d,0x3371,0x3375,0x3379,0x337d,0x2f51,
0x3381,0x3385,0x3389,0x2f55,0x338f,0x3393,0x3397,0x339b,0x33a1,0x33a5,0x33a9,0x33ad,0x33b3,0x33b7,0x33bb,0x33bf,
0x303f,0x33c3,0x33c9,0x33cd,0x33d1,0x33d5,0x33d9,0x33dd,0x33e1,0x33e5,0x3053,0x2f59,0x2f5d,0x3057,0x33e9,0x33ed,
0x2c59,0x33f1,0x2f61,0x33f5,0x33f9,0x33fd,0x3401,0x3401,0x3401,0x3405,0x340b,0x340f,0x3413,0x3417,0x341d,0x3421,
0x3425,0x3429,0x342d,0x3431,0x3435,0x3439,0x343d,0x3441,0x3445,0x3449,0x344d,0x344d,0x305f,0x3451,0x3455,0x3459,
0x345d,0x2f69,0x3461,0x3465,0x3469,0x2ebd,0x346d,0x3471,0x3475,0x3479,0x347d,0x3481,0x3485,0x3489,0x348d,0x3493,
0x3497,0x349b,0x349f,0x34a3,0x34a7,0x34ab,0x34b1,0x34b7,0x34bb,0x34bf,0x34c3,0x34c7,0x34cb,0x34cf,0x34d3,0x34d7,
0x34d7,0x34db,0x34e1,0x34e5,0x2c49,0x34e9,0x34ed,0x34f3,0x34f7,0x34fb,0x34ff,0x3503,0x3507,0x2f7d,0x350b,0x350f,
0x3513,0x3519,0x351d,0x3523,0x3527,0x352b,0x352f,0x3533,0x3537,0x353b,0x353f,0x3543,0x3547,0x354b,0x354f,0x3555,
0x3559,0x355d,0x3561,0x2b71,0x3565,0x356b,0x356f,0x356f,0x3575,0x3579,0x3579,0x357d,0x3581,0x3587,0x358d,0x3591,
0x3595,0x3599,0x359d,0x35a1,0x35a5,0x35a9,0x35ad,0x35b1,0x2f81,0x35b5,0x35bb,0x35bf,0x35c3,0x308f,0x35c3,0x35c7,
0x2f89,0x35cb,0x35cf,0x35d3,0x35d7,0x2f8d,0x2b05,0x35db,0x35df,0x35e3,0x35e7,0x35eb,0x35ef,0x35f3,0x35f9,0x35fd,
0x3601,0x3605,0x3609,0x360d,0x3613,0x3617,0x361b,0x361f,0x3623,0x3627,0x362b,0x362f,0x3633,0x2f91,0x3637,0x363b,
0x3641,0x3645,0x3649,0x364d,0x2f99,0x3651,0x3655,0x3659,0x365d,0x3661,0x3665,0x3669,0x366d,0x2b75,0x30af,0x3671,
0x3675,0x3679,0x367d,0x3683,0x3687,0x368b,0x368f,0x2f9d,0x3693,0x3699,0x369d,0x36a1,0x3161,0x36a5,0x36a9,0x36ad,
0x36b1,0x36b5,0x36bb,0x36bf,0x36c3,0x36c7,0x36cd,0x36d1,0x36d5,0x36d9,0x2c8d,0x36dd,0x36e1,0x36e7,0x36ed,0x36f3,
0x36f7,0x36fd,0x3701,0x3705,0x3709,0x370d,0x2fa1,0x2de9,0x3711,0x3715,0x3719,0x371d,0x3723,0x3727,0x372b,0x372f,
0x30bf,0x3733,0x3737,0x373d,0x3741,0x3745,0x374b,0x3751,0x3755,0x30c3,0x3759,0x375d,0x3761,0x3765,0x3769,0x376d,
0x3771,0x3777,0x377b,0x3781,0x3785,0x378b,0x30cb,0x378f,0x3793,0x3799,0x379d,0x37a1,0x37a7,0x37ad,0x37b1,0x37b5,
0x37b9,0x37bd,0x37bd,0x37c1,0x37c5,0x30d3,0x37c9,0x37cd,0x37d1,0x37d5,0x37d9,0x37df,0x37e3,0x2c55,0x37e9,0x37ef,
0x37f3,0x37f9,0x37ff,0x3805,0x3809,0x30eb,0x380d,0x3813,0x3819,0x381f,0x3825,0x3829,0x3829,0x30ef,0x3169,0x382d,
0x3831,0x3835,0x3839,0x383f,0x2bbd,0x30f7,0x3843,0x3847,0x2fcd,0x384d,0x3853,0x2f15,0x3859,0x385d,0x2fdd,0x3861,
0x3865,0x3869,0x386f,0x386f,0x3875,0x3879,0x387d,0x3883,0x3887,0x388b,0x388f,0x3895,0x3899,0x389d,0x38a1,0x38a5,
0x38a9,0x38af,0x38b3,0x38b7,0x38bb,0x38bf,0x38c3,0x38c7,0x38cd,0x38d3,0x38d7,0x38dd,0x38e1,0x38e7,0x38eb,0x2ff5,
0x38ef,0x38f5,0x38fb,0x38ff,0x3905,0x3909,0x390f,0x3913,0x3917,0x391b,0x391f,0x3923,0x3927,0x392d,0x3933,0x3939,
0x3575,0x393f,0x3943,0x3947,0x394b,0x394f,0x3953,0x3957,0x395b,0x395f,0x3963,0x3967,0x396b,0x2c9d,0x3971,0x3975,
0x3979,0x397d,0x3981,0x3985,0x3001,0x3989,0x398d,0x3991,0x3995,0x3999,0x399f,0x39a5,0x39ab,0x39af,0x39b3,0x39b7,
0x39bb,0x39c1,0x39c5,0x39cb,0x39cf,0x39d3,0x39d9,0x39df,0x39e3,0x2ba9,0x39e7,0x39eb,0x39ef,0x39f3,0x39f7,0x39fb,
0x3113,0x39ff,0x3a03,0x3a07,0x3a0b,0x3a0f,0x3a13,0x3a17,0x3a1b,0x3a1f,0x3a23,0x3a29,0x3a2d,0x3a31,0x3a35,0x3a39,
0x3a3d,0x3a43,0x3a49,0x3a4d,0x3a51,0x3127,0x312b,0x3a55,0x3a59,0x3a5f,0x3a63,0x3a67,0x3a6b,0x3a6f,0x3a75,0x3a7b,
0x3a7f,0x3a83,0x3a87,0x3a8d,0x312f,0x3a91,0x3a97,0x3a9d,0x3aa1,0x3aa5,0x3aa9,0x3aaf,0x3ab3,0x3ab7,0x3abb,0x3abf,
0x3ac3,0x3ac7,0x3acb,0x3ad1,0x3ad5,0x3ad9,0x3add,0x3ae3,0x3ae7,0x3aeb,0x3aef,0x3af3,0x3af9,0x3aff,0x3b03,0x3b07,
0x3b0b,0x3b11,0x3b15,0x3147,0x3147,0x3b1b,0x3b1f,0x3b25,0x3b29,0x3b2d,0x3b31,0x3b35,0x3b39,0x3b3d,0x3b41,0x314b,
0x3b47,0x3b4b,0x3b4f,0x3b53,0x3b57,0x3b5b,0x3b61,0x3b65,0x3b6b,0x3b71,0x3b77,0x3b7b,0x3b7f,0x3b83,0x3b87,0x3b8b,
0x3b8f,0x3b93,0x3b97,1,1,1
0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,1,
0xffd0,0xffd0,0xffb8,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,1,1,1,1,1,
1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xfe0e,1,1,1,1,1,
0x335b,0x335f,0x3363,0x3367,0x336d,0x2f4d,0x3371,0x3375,0x3379,0x337d,0x2f51,0x3381,0x3385,0x3389,0x2f55,0x338f,
0x3393,0x3397,0x339b,0x33a1,0x33a5,0x33a9,0x33ad,0x33b3,0x33b7,0x33bb,0x33bf,0x303f,0x33c3,0x33c9,0x33cd,0x33d1,
0x33d5,0x33d9,0x33dd,0x33e1,0x33e5,0x3053,0x2f59,0x2f5d,0x3057,0x33e9,0x33ed,0x2c59,0x33f1,0x2f61,0x33f5,0x33f9,
0x33fd,0x3401,0x3401,0x3401,0x3405,0x340b,0x340f,0x3413,0x3417,0x341d,0x3421,0x3425,0x3429,0x342d,0x3431,0x3435,
0x3439,0x343d,0x3441,0x3445,0x3449,0x344d,0x344d,0x305f,0x3451,0x3455,0x3459,0x345d,0x2f69,0x3461,0x3465,0x3469,
0x2ebd,0x346d,0x3471,0x3475,0x3479,0x347d,0x3481,0x3485,0x3489,0x348d,0x3493,0x3497,0x349b,0x349f,0x34a3,0x34a7,
0x34ab,0x34b1,0x34b7,0x34bb,0x34bf,0x34c3,0x34c7,0x34cb,0x34cf,0x34d3,0x34d7,0x34d7,0x34db,0x34e1,0x34e5,0x2c49,
0x34e9,0x34ed,0x34f3,0x34f7,0x34fb,0x34ff,0x3503,0x3507,0x2f7d,0x350b,0x350f,0x3513,0x3519,0x351d,0x3523,0x3527,
0x352b,0x352f,0x3533,0x3537,0x353b,0x353f,0x3543,0x3547,0x354b,0x354f,0x3555,0x3559,0x355d,0x3561,0x2b71,0x3565,
0x356b,0x356f,0x356f,0x3575,0x3579,0x3579,0x357d,0x3581,0x3587,0x358d,0x3591,0x3595,0x3599,0x359d,0x35a1,0x35a5,
0x35a9,0x35ad,0x35b1,0x2f81,0x35b5,0x35bb,0x35bf,0x35c3,0x308f,0x35c3,0x35c7,0x2f89,0x35cb,0x35cf,0x35d3,0x35d7,
0x2f8d,0x2b05,0x35db,0x35df,0x35e3,0x35e7,0x35eb,0x35ef,0x35f3,0x35f9,0x35fd,0x3601,0x3605,0x3609,0x360d,0x3613,
0x3617,0x361b,0x361f,0x3623,0x3627,0x362b,0x362f,0x3633,0x2f91,0x3637,0x363b,0x3641,0x3645,0x3649,0x364d,0x2f99,
0x3651,0x3655,0x3659,0x365d,0x3661,0x3665,0x3669,0x366d,0x2b75,0x30af,0x3671,0x3675,0x3679,0x367d,0x3683,0x3687,
0x368b,0x368f,0x2f9d,0x3693,0x3699,0x369d,0x36a1,0x3161,0x36a5,0x36a9,0x36ad,0x36b1,0x36b5,0x36bb,0x36bf,0x36c3,
0x36c7,0x36cd,0x36d1,0x36d5,0x36d9,0x2c8d,0x36dd,0x36e1,0x36e7,0x36ed,0x36f3,0x36f7,0x36fd,0x3701,0x3705,0x3709,
0x370d,0x2fa1,0x2de9,0x3711,0x3715,0x3719,0x371d,0x3723,0x3727,0x372b,0x372f,0x30bf,0x3733,0x3737,0x373d,0x3741,
0x3745,0x374b,0x3751,0x3755,0x30c3,0x3759,0x375d,0x3761,0x3765,0x3769,0x376d,0x3771,0x3777,0x377b,0x3781,0x3785,
0x378b,0x30cb,0x378f,0x3793,0x3799,0x379d,0x37a1,0x37a7,0x37ad,0x37b1,0x37b5,0x37b9,0x37bd,0x37bd,0x37c1,0x37c5,
0x30d3,0x37c9,0x37cd,0x37d1,0x37d5,0x37d9,0x37df,0x37e3,0x2c55,0x37e9,0x37ef,0x37f3,0x37f9,0x37ff,0x3805,0x3809,
0x30eb,0x380d,0x3813,0x3819,0x381f,0x3825,0x3829,0x3829,0x30ef,0x3169,0x382d,0x3831,0x3835,0x3839,0x383f,0x2bbd,
0x30f7,0x3843,0x3847,0x2fcd,0x384d,0x3853,0x2f15,0x3859,0x385d,0x2fdd,0x3861,0x3865,0x3869,0x386f,0x386f,0x3875,
0x3879,0x387d,0x3883,0x3887,0x388b,0x388f,0x3895,0x3899,0x389d,0x38a1,0x38a5,0x38a9,0x38af,0x38b3,0x38b7,0x38bb,
0x38bf,0x38c3,0x38c7,0x38cd,0x38d3,0x38d7,0x38dd,0x38e1,0x38e7,0x38eb,0x2ff5,0x38ef,0x38f5,0x38fb,0x38ff,0x3905,
0x3909,0x390f,0x3913,0x3917,0x391b,0x391f,0x3923,0x3927,0x392d,0x3933,0x3939,0x3575,0x393f,0x3943,0x3947,0x394b,
0x394f,0x3953,0x3957,0x395b,0x395f,0x3963,0x3967,0x396b,0x2c9d,0x3971,0x3975,0x3979,0x397d,0x3981,0x3985,0x3001,
0x3989,0x398d,0x3991,0x3995,0x3999,0x399f,0x39a5,0x39ab,0x39af,0x39b3,0x39b7,0x39bb,0x39c1,0x39c5,0x39cb,0x39cf,
0x39d3,0x39d9,0x39df,0x39e3,0x2ba9,0x39e7,0x39eb,0x39ef,0x39f3,0x39f7,0x39fb,0x3113,0x39ff,0x3a03,0x3a07,0x3a0b,
0x3a0f,0x3a13,0x3a17,0x3a1b,0x3a1f,0x3a23,0x3a29,0x3a2d,0x3a31,0x3a35,0x3a39,0x3a3d,0x3a43,0x3a49,0x3a4d,0x3a51,
0x3127,0x312b,0x3a55,0x3a59,0x3a5f,0x3a63,0x3a67,0x3a6b,0x3a6f,0x3a75,0x3a7b,0x3a7f,0x3a83,0x3a87,0x3a8d,0x312f,
0x3a91,0x3a97,0x3a9d,0x3aa1,0x3aa5,0x3aa9,0x3aaf,0x3ab3,0x3ab7,0x3abb,0x3abf,0x3ac3,0x3ac7,0x3acb,0x3ad1,0x3ad5,
0x3ad9,0x3add,0x3ae3,0x3ae7,0x3aeb,0x3aef,0x3af3,0x3af9,0x3aff,0x3b03,0x3b07,0x3b0b,0x3b11,0x3b15,0x3147,0x3147,
0x3b1b,0x3b1f,0x3b25,0x3b29,0x3b2d,0x3b31,0x3b35,0x3b39,0x3b3d,0x3b41,0x314b,0x3b47,0x3b4b,0x3b4f,0x3b53,0x3b57,
0x3b5b,0x3b61,0x3b65,0x3b6b,0x3b71,0x3b77,0x3b7b,0x3b7f,0x3b83,0x3b87,0x3b8b,0x3b8f,0x3b93,0x3b97,1,1
};
static const UCPTrie norm2_nfc_data_trie={
norm2_nfc_data_trieIndex,
{ norm2_nfc_data_trieData },
1748, 7974,
1788, 7984,
0x2fc00, 0x30,
0, 0,
0, 0,

Просмотреть файл

@ -62,7 +62,7 @@ Normalizer2::normalizeUTF8(uint32_t /*options*/, StringPiece src, ByteSink &sink
UBool
Normalizer2::getRawDecomposition(UChar32, UnicodeString &) const {
return FALSE;
return false;
}
UChar32
@ -142,7 +142,7 @@ class NoopNormalizer2 : public Normalizer2 {
}
virtual UBool
getDecomposition(UChar32, UnicodeString &) const U_OVERRIDE {
return FALSE;
return false;
}
// No need to U_OVERRIDE the default getRawDecomposition().
virtual UBool
@ -161,9 +161,9 @@ class NoopNormalizer2 : public Normalizer2 {
spanQuickCheckYes(const UnicodeString &s, UErrorCode &) const U_OVERRIDE {
return s.length();
}
virtual UBool hasBoundaryBefore(UChar32) const U_OVERRIDE { return TRUE; }
virtual UBool hasBoundaryAfter(UChar32) const U_OVERRIDE { return TRUE; }
virtual UBool isInert(UChar32) const U_OVERRIDE { return TRUE; }
virtual UBool hasBoundaryBefore(UChar32) const U_OVERRIDE { return true; }
virtual UBool hasBoundaryAfter(UChar32) const U_OVERRIDE { return true; }
virtual UBool isInert(UChar32) const U_OVERRIDE { return true; }
};
NoopNormalizer2::~NoopNormalizer2() {}
@ -183,7 +183,7 @@ static UBool U_CALLCONV uprv_normalizer2_cleanup();
U_CDECL_END
static Normalizer2 *noopSingleton;
static icu::UInitOnce noopInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce noopInitOnce {};
static void U_CALLCONV initNoopSingleton(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
@ -245,7 +245,7 @@ Norm2AllModes::createNFCInstance(UErrorCode &errorCode) {
static Norm2AllModes *nfcSingleton;
static icu::UInitOnce nfcInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce nfcInitOnce {};
static void U_CALLCONV initNFCSingleton(UErrorCode &errorCode) {
nfcSingleton=Norm2AllModes::createNFCInstance(errorCode);
@ -299,7 +299,7 @@ static UBool U_CALLCONV uprv_normalizer2_cleanup() {
nfcSingleton = NULL;
nfcInitOnce.reset();
#endif
return TRUE;
return true;
}
U_CDECL_END
@ -423,7 +423,7 @@ unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2,
return normalizeSecondAndAppend(norm2,
first, firstLength, firstCapacity,
second, secondLength,
TRUE, pErrorCode);
true, pErrorCode);
}
U_CAPI int32_t U_EXPORT2
@ -434,7 +434,7 @@ unorm2_append(const UNormalizer2 *norm2,
return normalizeSecondAndAppend(norm2,
first, firstLength, firstCapacity,
second, secondLength,
FALSE, pErrorCode);
false, pErrorCode);
}
U_CAPI int32_t U_EXPORT2

Просмотреть файл

@ -185,7 +185,7 @@ UBool ReorderingBuffer::init(int32_t destCapacity, UErrorCode &errorCode) {
if(start==NULL) {
// getBuffer() already did str.setToBogus()
errorCode=U_MEMORY_ALLOCATION_ERROR;
return FALSE;
return false;
}
limit=start+length;
remainingCapacity=str.getCapacity()-length;
@ -201,7 +201,7 @@ UBool ReorderingBuffer::init(int32_t destCapacity, UErrorCode &errorCode) {
}
reorderStart=codePointLimit;
}
return TRUE;
return true;
}
UBool ReorderingBuffer::equals(const UChar *otherStart, const UChar *otherLimit) const {
@ -217,7 +217,7 @@ UBool ReorderingBuffer::equals(const uint8_t *otherStart, const uint8_t *otherLi
int32_t otherLength = (int32_t)(otherLimit - otherStart);
// For equal strings, UTF-8 is at least as long as UTF-16, and at most three times as long.
if (otherLength < length || (otherLength / 3) > length) {
return FALSE;
return false;
}
// Compare valid strings from between normalization boundaries.
// (Invalid sequences are normalization-inert.)
@ -225,21 +225,21 @@ UBool ReorderingBuffer::equals(const uint8_t *otherStart, const uint8_t *otherLi
if (i >= length) {
return j >= otherLength;
} else if (j >= otherLength) {
return FALSE;
return false;
}
// Not at the end of either string yet.
UChar32 c, other;
U16_NEXT_UNSAFE(start, i, c);
U8_NEXT_UNSAFE(otherStart, j, other);
if (c != other) {
return FALSE;
return false;
}
}
}
UBool ReorderingBuffer::appendSupplementary(UChar32 c, uint8_t cc, UErrorCode &errorCode) {
if(remainingCapacity<2 && !resize(2, errorCode)) {
return FALSE;
return false;
}
if(lastCC<=cc || cc==0) {
limit[0]=U16_LEAD(c);
@ -253,17 +253,17 @@ UBool ReorderingBuffer::appendSupplementary(UChar32 c, uint8_t cc, UErrorCode &e
insert(c, cc);
}
remainingCapacity-=2;
return TRUE;
return true;
}
UBool ReorderingBuffer::append(const UChar *s, int32_t length, UBool isNFD,
uint8_t leadCC, uint8_t trailCC,
UErrorCode &errorCode) {
if(length==0) {
return TRUE;
return true;
}
if(remainingCapacity<length && !resize(length, errorCode)) {
return FALSE;
return false;
}
remainingCapacity-=length;
if(lastCC<=leadCC || leadCC==0) {
@ -294,13 +294,13 @@ UBool ReorderingBuffer::append(const UChar *s, int32_t length, UBool isNFD,
append(c, leadCC, errorCode);
}
}
return TRUE;
return true;
}
UBool ReorderingBuffer::appendZeroCC(UChar32 c, UErrorCode &errorCode) {
int32_t cpLength=U16_LENGTH(c);
if(remainingCapacity<cpLength && !resize(cpLength, errorCode)) {
return FALSE;
return false;
}
remainingCapacity-=cpLength;
if(cpLength==1) {
@ -312,23 +312,23 @@ UBool ReorderingBuffer::appendZeroCC(UChar32 c, UErrorCode &errorCode) {
}
lastCC=0;
reorderStart=limit;
return TRUE;
return true;
}
UBool ReorderingBuffer::appendZeroCC(const UChar *s, const UChar *sLimit, UErrorCode &errorCode) {
if(s==sLimit) {
return TRUE;
return true;
}
int32_t length=(int32_t)(sLimit-s);
if(remainingCapacity<length && !resize(length, errorCode)) {
return FALSE;
return false;
}
u_memcpy(limit, s, length);
limit+=length;
remainingCapacity-=length;
lastCC=0;
reorderStart=limit;
return TRUE;
return true;
}
void ReorderingBuffer::remove() {
@ -365,12 +365,12 @@ UBool ReorderingBuffer::resize(int32_t appendLength, UErrorCode &errorCode) {
if(start==NULL) {
// getBuffer() already did str.setToBogus()
errorCode=U_MEMORY_ALLOCATION_ERROR;
return FALSE;
return false;
}
reorderStart=start+reorderStartIndex;
limit=start+length;
remainingCapacity=str.getCapacity()-length;
return TRUE;
return true;
}
void ReorderingBuffer::skipPrevious() {
@ -728,7 +728,7 @@ UBool Normalizer2Impl::decompose(UChar32 c, uint16_t norm16,
} else {
leadCC=0;
}
return buffer.append((const UChar *)mapping+1, length, TRUE, leadCC, trailCC, errorCode);
return buffer.append((const UChar *)mapping+1, length, true, leadCC, trailCC, errorCode);
}
// Dual functionality:
@ -820,11 +820,11 @@ Normalizer2Impl::decomposeUTF8(uint32_t options,
if (U_FAILURE(errorCode)) {
break;
}
decomposeShort(prevBoundary, src, STOP_AT_LIMIT, FALSE /* onlyContiguous */,
decomposeShort(prevBoundary, src, STOP_AT_LIMIT, false /* onlyContiguous */,
buffer, errorCode);
// Decompose until the next boundary.
if (buffer.getLastCC() > 1) {
src = decomposeShort(src, limit, STOP_AT_DECOMP_BOUNDARY, FALSE /* onlyContiguous */,
src = decomposeShort(src, limit, STOP_AT_DECOMP_BOUNDARY, false /* onlyContiguous */,
buffer, errorCode);
}
if (U_FAILURE(errorCode)) {
@ -931,7 +931,7 @@ Normalizer2Impl::decomposeShort(const uint8_t *src, const uint8_t *limit,
if (leadCC == 0 && stopAt == STOP_AT_DECOMP_BOUNDARY) {
return prevSrc;
}
if (!buffer.append((const char16_t *)mapping+1, length, TRUE, leadCC, trailCC, errorCode)) {
if (!buffer.append((const char16_t *)mapping+1, length, true, leadCC, trailCC, errorCode)) {
return nullptr;
}
}
@ -1052,7 +1052,7 @@ void Normalizer2Impl::decomposeAndAppend(const UChar *src, const UChar *limit,
limit=u_strchr(p, 0);
}
if (buffer.append(src, (int32_t)(p - src), FALSE, firstCC, prevCC, errorCode)) {
if (buffer.append(src, (int32_t)(p - src), false, firstCC, prevCC, errorCode)) {
buffer.appendZeroCC(p, limit, errorCode);
}
}
@ -1064,7 +1064,7 @@ UBool Normalizer2Impl::hasDecompBoundaryBefore(UChar32 c) const {
UBool Normalizer2Impl::norm16HasDecompBoundaryBefore(uint16_t norm16) const {
if (norm16 < minNoNoCompNoMaybeCC) {
return TRUE;
return true;
}
if (norm16 >= limitNoNo) {
return norm16 <= MIN_NORMAL_MAYBE_YES || norm16 == JAMO_VT;
@ -1072,23 +1072,23 @@ UBool Normalizer2Impl::norm16HasDecompBoundaryBefore(uint16_t norm16) const {
// c decomposes, get everything from the variable-length extra data
const uint16_t *mapping=getMapping(norm16);
uint16_t firstUnit=*mapping;
// TRUE if leadCC==0 (hasFCDBoundaryBefore())
// true if leadCC==0 (hasFCDBoundaryBefore())
return (firstUnit&MAPPING_HAS_CCC_LCCC_WORD)==0 || (*(mapping-1)&0xff00)==0;
}
UBool Normalizer2Impl::hasDecompBoundaryAfter(UChar32 c) const {
if (c < minDecompNoCP) {
return TRUE;
return true;
}
if (c <= 0xffff && !singleLeadMightHaveNonZeroFCD16(c)) {
return TRUE;
return true;
}
return norm16HasDecompBoundaryAfter(getNorm16(c));
}
UBool Normalizer2Impl::norm16HasDecompBoundaryAfter(uint16_t norm16) const {
if(norm16 <= minYesNo || isHangulLVT(norm16)) {
return TRUE;
return true;
}
if (norm16 >= limitNoNo) {
if (isMaybeOrNonZeroCC(norm16)) {
@ -1103,13 +1103,13 @@ UBool Normalizer2Impl::norm16HasDecompBoundaryAfter(uint16_t norm16) const {
// decomp after-boundary: same as hasFCDBoundaryAfter(),
// fcd16<=1 || trailCC==0
if(firstUnit>0x1ff) {
return FALSE; // trailCC>1
return false; // trailCC>1
}
if(firstUnit<=0xff) {
return TRUE; // trailCC==0
return true; // trailCC==0
}
// if(trailCC==1) test leadCC==0, same as checking for before-boundary
// TRUE if leadCC==0 (hasFCDBoundaryBefore())
// true if leadCC==0 (hasFCDBoundaryBefore())
return (firstUnit&MAPPING_HAS_CCC_LCCC_WORD)==0 || (*(mapping-1)&0xff00)==0;
}
@ -1235,7 +1235,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
// and are only initialized now to avoid compiler warnings.
compositionsList=NULL; // used as indicator for whether we have a forward-combining starter
starter=NULL;
starterIsSupplementary=FALSE;
starterIsSupplementary=false;
prevCC=0;
for(;;) {
@ -1301,7 +1301,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
*starter=(UChar)composite;
// The composite is shorter than the starter,
// move the intermediate characters forward one.
starterIsSupplementary=FALSE;
starterIsSupplementary=false;
q=starter+1;
r=q+1;
while(r<pRemove) {
@ -1312,7 +1312,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
} else if(U_IS_SUPPLEMENTARY(composite)) {
// The composite is longer than the starter,
// move the intermediate characters back one.
starterIsSupplementary=TRUE;
starterIsSupplementary=true;
++starter; // temporarily increment for the loop boundary
q=pRemove;
r=++pRemove;
@ -1366,10 +1366,10 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
if((compositionsList=getCompositionsListForDecompYes(norm16))!=NULL) {
// It may combine with something, prepare for it.
if(U_IS_BMP(c)) {
starterIsSupplementary=FALSE;
starterIsSupplementary=false;
starter=p-1;
} else {
starterIsSupplementary=TRUE;
starterIsSupplementary=true;
starter=p-2;
}
}
@ -1447,7 +1447,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
doCompose ? &buffer : NULL,
errorCode);
if(U_FAILURE(errorCode)) {
return FALSE;
return false;
}
limit=u_strchr(src, 0);
if (prevBoundary != src) {
@ -1471,7 +1471,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
if (prevBoundary != limit && doCompose) {
buffer.appendZeroCC(prevBoundary, limit, errorCode);
}
return TRUE;
return true;
}
if( (c=*src)<minNoMaybeCP ||
isCompYesAndZeroCC(norm16=UCPTRIE_FAST_BMP_GET(normTrie, UCPTRIE_16, c))
@ -1503,7 +1503,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
// Medium-fast path: Handle cases that do not require full decomposition and recomposition.
if (!isMaybeOrNonZeroCC(norm16)) { // minNoNo <= norm16 < minMaybeYes
if (!doCompose) {
return FALSE;
return false;
}
// Fast path for mapping a character that is immediately surrounded by boundaries.
// In this case, we need not decompose around the current character.
@ -1559,7 +1559,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
UChar l = (UChar)(prev-Hangul::JAMO_L_BASE);
if(l<Hangul::JAMO_L_COUNT) {
if (!doCompose) {
return FALSE;
return false;
}
int32_t t;
if (src != limit &&
@ -1599,7 +1599,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
// The current character is a Jamo Trailing consonant,
// compose with previous Hangul LV that does not contain a Jamo T.
if (!doCompose) {
return FALSE;
return false;
}
UChar32 syllable = prev + c - Hangul::JAMO_T_BASE;
--prevSrc; // Replace the Hangul LV as well.
@ -1622,7 +1622,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
if (onlyContiguous /* FCC */ && getPreviousTrailCC(prevBoundary, prevSrc) > cc) {
// Fails FCD test, need to decompose and contiguously recompose.
if (!doCompose) {
return FALSE;
return false;
}
} else {
// If !onlyContiguous (not FCC), then we ignore the tccc of
@ -1634,7 +1634,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
if (doCompose) {
buffer.appendZeroCC(prevBoundary, limit, errorCode);
}
return TRUE;
return true;
}
uint8_t prevCC = cc;
nextSrc = src;
@ -1643,7 +1643,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
cc = getCCFromNormalYesOrMaybe(n16);
if (prevCC > cc) {
if (!doCompose) {
return FALSE;
return false;
}
break;
}
@ -1678,28 +1678,28 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
}
int32_t recomposeStartIndex=buffer.length();
// We know there is not a boundary here.
decomposeShort(prevSrc, src, FALSE /* !stopAtCompBoundary */, onlyContiguous,
decomposeShort(prevSrc, src, false /* !stopAtCompBoundary */, onlyContiguous,
buffer, errorCode);
// Decompose until the next boundary.
src = decomposeShort(src, limit, TRUE /* stopAtCompBoundary */, onlyContiguous,
src = decomposeShort(src, limit, true /* stopAtCompBoundary */, onlyContiguous,
buffer, errorCode);
if (U_FAILURE(errorCode)) {
break;
}
if ((src - prevSrc) > INT32_MAX) { // guard before buffer.equals()
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
return TRUE;
return true;
}
recompose(buffer, recomposeStartIndex, onlyContiguous);
if(!doCompose) {
if(!buffer.equals(prevSrc, src)) {
return FALSE;
return false;
}
buffer.remove();
}
prevBoundary=src;
}
return TRUE;
return true;
}
// Very similar to compose(): Make the same changes in both places if relevant.
@ -1846,7 +1846,7 @@ void Normalizer2Impl::composeAndAppend(const UChar *src, const UChar *limit,
middle.append(src, (int32_t)(firstStarterInSrc-src));
const UChar *middleStart=middle.getBuffer();
compose(middleStart, middleStart+middle.length(), onlyContiguous,
TRUE, buffer, errorCode);
true, buffer, errorCode);
if(U_FAILURE(errorCode)) {
return;
}
@ -1854,7 +1854,7 @@ void Normalizer2Impl::composeAndAppend(const UChar *src, const UChar *limit,
}
}
if(doCompose) {
compose(src, limit, onlyContiguous, TRUE, buffer, errorCode);
compose(src, limit, onlyContiguous, true, buffer, errorCode);
} else {
if(limit==NULL) { // appendZeroCC() needs limit!=NULL
limit=u_strchr(src, 0);
@ -1883,7 +1883,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
ByteSinkUtil::appendUnchanged(prevBoundary, limit,
*sink, options, edits, errorCode);
}
return TRUE;
return true;
}
if (*src < minNoMaybeLead) {
++src;
@ -1904,7 +1904,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
// Medium-fast path: Handle cases that do not require full decomposition and recomposition.
if (!isMaybeOrNonZeroCC(norm16)) { // minNoNo <= norm16 < minMaybeYes
if (sink == nullptr) {
return FALSE;
return false;
}
// Fast path for mapping a character that is immediately surrounded by boundaries.
// In this case, we need not decompose around the current character.
@ -1972,7 +1972,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
UChar32 l = prev - Hangul::JAMO_L_BASE;
if ((uint32_t)l < Hangul::JAMO_L_COUNT) {
if (sink == nullptr) {
return FALSE;
return false;
}
int32_t t = getJamoTMinusBase(src, limit);
if (t >= 0) {
@ -2008,7 +2008,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
// The current character is a Jamo Trailing consonant,
// compose with previous Hangul LV that does not contain a Jamo T.
if (sink == nullptr) {
return FALSE;
return false;
}
UChar32 syllable = prev + getJamoTMinusBase(prevSrc, src);
prevSrc -= 3; // Replace the Hangul LV as well.
@ -2031,7 +2031,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
if (onlyContiguous /* FCC */ && getPreviousTrailCC(prevBoundary, prevSrc) > cc) {
// Fails FCD test, need to decompose and contiguously recompose.
if (sink == nullptr) {
return FALSE;
return false;
}
} else {
// If !onlyContiguous (not FCC), then we ignore the tccc of
@ -2044,7 +2044,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
ByteSinkUtil::appendUnchanged(prevBoundary, limit,
*sink, options, edits, errorCode);
}
return TRUE;
return true;
}
uint8_t prevCC = cc;
nextSrc = src;
@ -2053,7 +2053,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
cc = getCCFromNormalYesOrMaybe(n16);
if (prevCC > cc) {
if (sink == nullptr) {
return FALSE;
return false;
}
break;
}
@ -2098,12 +2098,12 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
}
if ((src - prevSrc) > INT32_MAX) { // guard before buffer.equals()
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
return TRUE;
return true;
}
recompose(buffer, 0, onlyContiguous);
if (!buffer.equals(prevSrc, src)) {
if (sink == nullptr) {
return FALSE;
return false;
}
if (prevBoundary != prevSrc &&
!ByteSinkUtil::appendUnchanged(prevBoundary, prevSrc,
@ -2117,12 +2117,12 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
prevBoundary = src;
}
}
return TRUE;
return true;
}
UBool Normalizer2Impl::hasCompBoundaryBefore(const UChar *src, const UChar *limit) const {
if (src == limit || *src < minCompNoMaybeCP) {
return TRUE;
return true;
}
UChar32 c;
uint16_t norm16;
@ -2132,7 +2132,7 @@ UBool Normalizer2Impl::hasCompBoundaryBefore(const UChar *src, const UChar *limi
UBool Normalizer2Impl::hasCompBoundaryBefore(const uint8_t *src, const uint8_t *limit) const {
if (src == limit) {
return TRUE;
return true;
}
uint16_t norm16;
UCPTRIE_FAST_U8_NEXT(normTrie, UCPTRIE_16, src, limit, norm16);
@ -2142,7 +2142,7 @@ UBool Normalizer2Impl::hasCompBoundaryBefore(const uint8_t *src, const uint8_t *
UBool Normalizer2Impl::hasCompBoundaryAfter(const UChar *start, const UChar *p,
UBool onlyContiguous) const {
if (start == p) {
return TRUE;
return true;
}
UChar32 c;
uint16_t norm16;
@ -2153,7 +2153,7 @@ UBool Normalizer2Impl::hasCompBoundaryAfter(const UChar *start, const UChar *p,
UBool Normalizer2Impl::hasCompBoundaryAfter(const uint8_t *start, const uint8_t *p,
UBool onlyContiguous) const {
if (start == p) {
return TRUE;
return true;
}
uint16_t norm16;
UCPTRIE_FAST_U8_PREV(normTrie, UCPTRIE_16, start, p, norm16);
@ -2399,7 +2399,7 @@ Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit,
* The source text does not fulfill the conditions for FCD.
* Decompose and reorder a limited piece of the text.
*/
decomposeShort(prevBoundary, src, FALSE, FALSE, *buffer, errorCode);
decomposeShort(prevBoundary, src, false, false, *buffer, errorCode);
if (U_FAILURE(errorCode)) {
break;
}
@ -2665,7 +2665,7 @@ UBool Normalizer2Impl::isCanonSegmentStarter(UChar32 c) const {
UBool Normalizer2Impl::getCanonStartSet(UChar32 c, UnicodeSet &set) const {
int32_t canonValue=getCanonValue(c)&~CANON_NOT_SEGMENT_STARTER;
if(canonValue==0) {
return FALSE;
return false;
}
set.clear();
int32_t value=canonValue&CANON_VALUE_MASK;
@ -2684,7 +2684,7 @@ UBool Normalizer2Impl::getCanonStartSet(UChar32 c, UnicodeSet &set) const {
addComposites(getCompositionsList(norm16), set);
}
}
return TRUE;
return true;
}
U_NAMESPACE_END

Просмотреть файл

@ -131,7 +131,7 @@ public:
}
}
private:
Hangul(); // no instantiation
Hangul() = delete; // no instantiation
};
class Normalizer2Impl;
@ -730,7 +730,7 @@ private:
const uint16_t *extraData; // mappings and/or compositions for yesYes, yesNo & noNo characters
const uint8_t *smallFCD; // [0x100] one bit per 32 BMP code points, set if any FCD!=0
UInitOnce fCanonIterDataInitOnce = U_INITONCE_INITIALIZER;
UInitOnce fCanonIterDataInitOnce {};
CanonIterData *fCanonIterData;
};
@ -759,7 +759,7 @@ public:
// Must be used only when it is known that norm2 is a Normalizer2WithImpl instance.
static const Normalizer2Impl *getImpl(const Normalizer2 *norm2);
private:
Normalizer2Factory(); // No instantiation.
Normalizer2Factory() = delete; // No instantiation.
};
U_NAMESPACE_END

Просмотреть файл

@ -205,7 +205,7 @@ Normalizer::isNormalized(const UnicodeString& source,
return n2->isNormalized(source, status);
}
} else {
return FALSE;
return false;
}
}
@ -483,7 +483,7 @@ Normalizer::nextNormalize() {
currentIndex=nextIndex;
text->setIndex(nextIndex);
if(!text->hasNext()) {
return FALSE;
return false;
}
// Skip at least one character so we make progress.
UnicodeString segment(text->next32PostInc());
@ -507,7 +507,7 @@ Normalizer::previousNormalize() {
nextIndex=currentIndex;
text->setIndex(currentIndex);
if(!text->hasPrevious()) {
return FALSE;
return false;
}
UnicodeString segment;
while(text->hasPrevious()) {

Просмотреть файл

@ -118,49 +118,49 @@ static const uint32_t syntaxOrWhiteSpace2000[]={
UBool
PatternProps::isSyntax(UChar32 c) {
if(c<0) {
return FALSE;
return false;
} else if(c<=0xff) {
return (UBool)(latin1[c]>>1)&1;
} else if(c<0x2010) {
return FALSE;
return false;
} else if(c<=0x3030) {
uint32_t bits=syntax2000[index2000[(c-0x2000)>>5]];
return (UBool)((bits>>(c&0x1f))&1);
} else if(0xfd3e<=c && c<=0xfe46) {
return c<=0xfd3f || 0xfe45<=c;
} else {
return FALSE;
return false;
}
}
UBool
PatternProps::isSyntaxOrWhiteSpace(UChar32 c) {
if(c<0) {
return FALSE;
return false;
} else if(c<=0xff) {
return (UBool)(latin1[c]&1);
} else if(c<0x200e) {
return FALSE;
return false;
} else if(c<=0x3030) {
uint32_t bits=syntaxOrWhiteSpace2000[index2000[(c-0x2000)>>5]];
return (UBool)((bits>>(c&0x1f))&1);
} else if(0xfd3e<=c && c<=0xfe46) {
return c<=0xfd3f || 0xfe45<=c;
} else {
return FALSE;
return false;
}
}
UBool
PatternProps::isWhiteSpace(UChar32 c) {
if(c<0) {
return FALSE;
return false;
} else if(c<=0xff) {
return (UBool)(latin1[c]>>2)&1;
} else if(0x200e<=c && c<=0x2029) {
return c<=0x200f || 0x2028<=c;
} else {
return FALSE;
return false;
}
}
@ -207,15 +207,15 @@ PatternProps::trimWhiteSpace(const UChar *s, int32_t &length) {
UBool
PatternProps::isIdentifier(const UChar *s, int32_t length) {
if(length<=0) {
return FALSE;
return false;
}
const UChar *limit=s+length;
do {
if(isSyntaxOrWhiteSpace(*s++)) {
return FALSE;
return false;
}
} while(s<limit);
return TRUE;
return true;
}
const UChar *

Просмотреть файл

@ -90,7 +90,7 @@ public:
static const UChar *skipIdentifier(const UChar *s, int32_t length);
private:
PatternProps(); // no constructor: all static methods
PatternProps() = delete; // no constructor: all static methods
};
U_NAMESPACE_END

Просмотреть файл

@ -218,7 +218,7 @@ const char *PropNameData::getName(const char *nameGroup, int32_t nameIndex) {
UBool PropNameData::containsName(BytesTrie &trie, const char *name) {
if(name==NULL) {
return FALSE;
return false;
}
UStringTrieResult result=USTRINGTRIE_NO_VALUE;
char c;
@ -229,7 +229,7 @@ UBool PropNameData::containsName(BytesTrie &trie, const char *name) {
continue;
}
if(!USTRINGTRIE_HAS_NEXT(result)) {
return FALSE;
return false;
}
result=trie.next((uint8_t)c);
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -351,7 +351,7 @@ upvec_compact(UPropsVectors *pv, UPVecCompactHandler *handler, void *context, UE
}
/* Set the flag now: Sorting and compacting destroys the builder data structure. */
pv->isCompacted=TRUE;
pv->isCompacted=true;
rows=pv->rows;
columns=pv->columns;
@ -360,7 +360,7 @@ upvec_compact(UPropsVectors *pv, UPVecCompactHandler *handler, void *context, UE
/* sort the properties vectors to find unique vector values */
uprv_sortArray(pv->v, rows, columns*4,
upvec_compareRows, pv, FALSE, pErrorCode);
upvec_compareRows, pv, false, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
return;
}
@ -503,7 +503,7 @@ upvec_compactToUTrie2Handler(void *context,
(void)columns;
UPVecToUTrie2Context *toUTrie2=(UPVecToUTrie2Context *)context;
if(start<UPVEC_FIRST_SPECIAL_CP) {
utrie2_setRange32(toUTrie2->trie, start, end, (uint32_t)rowIndex, TRUE, pErrorCode);
utrie2_setRange32(toUTrie2->trie, start, end, (uint32_t)rowIndex, true, pErrorCode);
} else {
switch(start) {
case UPVEC_INITIAL_VALUE_CP:

Просмотреть файл

@ -573,7 +573,7 @@ u_strFromPunycode(const UChar *src, int32_t srcLength,
/* Case of last character determines uppercase flag: */
caseFlags[codeUnitIndex]=IS_BASIC_UPPERCASE(src[in-1]);
if(cpLength==2) {
caseFlags[codeUnitIndex+1]=FALSE;
caseFlags[codeUnitIndex+1]=false;
}
}
}

Просмотреть файл

@ -244,7 +244,7 @@ u_signBit(double d) {
*/
UDate fakeClock_t0 = 0; /** Time to start the clock from **/
UDate fakeClock_dt = 0; /** Offset (fake time - real time) **/
UBool fakeClock_set = FALSE; /** True if fake clock has spun up **/
UBool fakeClock_set = false; /** True if fake clock has spun up **/
static UDate getUTCtime_real() {
struct timeval posixTime;
@ -269,7 +269,7 @@ static UDate getUTCtime_fake() {
fprintf(stderr,"U_DEBUG_FAKETIME was set at compile time, but U_FAKETIME_START was not set.\n"
"Set U_FAKETIME_START to the number of milliseconds since 1/1/1970 to set the ICU clock.\n");
}
fakeClock_set = TRUE;
fakeClock_set = true;
}
umtx_unlock(&fakeClockMutex);
@ -905,7 +905,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
int32_t sizeFileRead;
int32_t sizeFileToRead;
char bufferFile[MAX_READ_SIZE];
UBool result = TRUE;
UBool result = true;
if (tzInfo->defaultTZFilePtr == NULL) {
tzInfo->defaultTZFilePtr = fopen(defaultTZFileName, "r");
@ -925,7 +925,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
sizeFileLeft = sizeFile;
if (sizeFile != tzInfo->defaultTZFileSize) {
result = FALSE;
result = false;
} else {
/* Store the data from the files in separate buffers and
* compare each byte to determine equality.
@ -942,7 +942,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
sizeFileRead = fread(bufferFile, 1, sizeFileToRead, file);
if (memcmp(tzInfo->defaultTZBuffer + tzInfo->defaultTZPosition, bufferFile, sizeFileRead) != 0) {
result = FALSE;
result = false;
break;
}
sizeFileLeft -= sizeFileRead;
@ -950,7 +950,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
}
}
} else {
result = FALSE;
result = false;
}
if (file != NULL) {
@ -1189,7 +1189,7 @@ uprv_tzname(int n)
tzInfo->defaultTZBuffer = NULL;
tzInfo->defaultTZFileSize = 0;
tzInfo->defaultTZFilePtr = NULL;
tzInfo->defaultTZstatus = FALSE;
tzInfo->defaultTZstatus = false;
tzInfo->defaultTZPosition = 0;
gTimeZoneBufferPtr = searchForTZFile(TZZONEINFO, tzInfo);
@ -1260,10 +1260,10 @@ uprv_tzname(int n)
/* Get and set the ICU data directory --------------------------------------- */
static icu::UInitOnce gDataDirInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gDataDirInitOnce {};
static char *gDataDirectory = NULL;
UInitOnce gTimeZoneFilesInitOnce = U_INITONCE_INITIALIZER;
UInitOnce gTimeZoneFilesInitOnce {};
static CharString *gTimeZoneFilesDirectory = NULL;
#if U_POSIX_LOCALE || U_PLATFORM_USES_ONLY_WIN32_API
@ -1295,7 +1295,7 @@ static UBool U_CALLCONV putil_cleanup(void)
gCorrectedPOSIXLocaleHeapAllocated = false;
}
#endif
return TRUE;
return true;
}
/*
@ -1344,16 +1344,16 @@ U_CAPI UBool U_EXPORT2
uprv_pathIsAbsolute(const char *path)
{
if(!path || !*path) {
return FALSE;
return false;
}
if(*path == U_FILE_SEP_CHAR) {
return TRUE;
return true;
}
#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)
if(*path == U_FILE_ALT_SEP_CHAR) {
return TRUE;
return true;
}
#endif
@ -1361,11 +1361,11 @@ uprv_pathIsAbsolute(const char *path)
if( (((path[0] >= 'A') && (path[0] <= 'Z')) ||
((path[0] >= 'a') && (path[0] <= 'z'))) &&
path[1] == ':' ) {
return TRUE;
return true;
}
#endif
return FALSE;
return false;
}
/* Backup setting of ICU_DATA_DIR_PREFIX_ENV_VAR
@ -1402,12 +1402,12 @@ static BOOL U_CALLCONV getIcuDataDirectoryUnderWindowsDirectory(char* directoryB
if ((windowsPathUtf8Len + UPRV_LENGTHOF(ICU_DATA_DIR_WINDOWS)) < bufferLength) {
uprv_strcpy(directoryBuffer, windowsPathUtf8);
uprv_strcat(directoryBuffer, ICU_DATA_DIR_WINDOWS);
return TRUE;
return true;
}
}
}
return FALSE;
return false;
}
#endif

Просмотреть файл

@ -39,7 +39,7 @@
#include "uvectr32.h"
#ifdef RBBI_DEBUG
static UBool gTrace = FALSE;
static UBool gTrace = false;
#endif
U_NAMESPACE_BEGIN
@ -267,7 +267,7 @@ RuleBasedBreakIterator::operator=(const RuleBasedBreakIterator& that) {
}
// TODO: clone fLanguageBreakEngines from "that"
UErrorCode status = U_ZERO_ERROR;
utext_clone(&fText, &that.fText, FALSE, TRUE, &status);
utext_clone(&fText, &that.fText, false, true, &status);
if (fCharIter != &fSCharIter) {
delete fCharIter;
@ -354,13 +354,13 @@ void RuleBasedBreakIterator::init(UErrorCode &status) {
}
#ifdef RBBI_DEBUG
static UBool debugInitDone = FALSE;
if (debugInitDone == FALSE) {
static UBool debugInitDone = false;
if (debugInitDone == false) {
char *debugEnv = getenv("U_RBBIDEBUG");
if (debugEnv && uprv_strstr(debugEnv, "trace")) {
gTrace = TRUE;
gTrace = true;
}
debugInitDone = TRUE;
debugInitDone = true;
}
#endif
}
@ -439,7 +439,7 @@ void RuleBasedBreakIterator::setText(UText *ut, UErrorCode &status) {
}
fBreakCache->reset();
fDictionaryCache->reset();
utext_clone(&fText, ut, FALSE, TRUE, &status);
utext_clone(&fText, ut, false, true, &status);
// Set up a dummy CharacterIterator to be returned if anyone
// calls getText(). With input from UText, there is no reasonable
@ -460,7 +460,7 @@ void RuleBasedBreakIterator::setText(UText *ut, UErrorCode &status) {
UText *RuleBasedBreakIterator::getUText(UText *fillIn, UErrorCode &status) const {
UText *result = utext_clone(fillIn, &fText, FALSE, TRUE, &status);
UText *result = utext_clone(fillIn, &fText, false, true, &status);
return result;
}
@ -548,7 +548,7 @@ RuleBasedBreakIterator &RuleBasedBreakIterator::refreshInputText(UText *input, U
}
int64_t pos = utext_getNativeIndex(&fText);
// Shallow read-only clone of the new UText into the existing input UText
utext_clone(&fText, input, FALSE, TRUE, &status);
utext_clone(&fText, input, false, true, &status);
if (U_FAILURE(status)) {
return *this;
}
@ -696,7 +696,7 @@ UBool RuleBasedBreakIterator::isBoundary(int32_t offset) {
// out-of-range indexes are never boundary positions
if (offset < 0) {
first(); // For side effects on current position, tag values.
return FALSE;
return false;
}
// Adjust offset to be on a code point boundary and not beyond the end of the text.
@ -713,9 +713,9 @@ UBool RuleBasedBreakIterator::isBoundary(int32_t offset) {
}
if (result && adjustedOffset < offset && utext_char32At(&fText, offset) == U_SENTINEL) {
// Original offset is beyond the end of the text. Return FALSE, it's not a boundary,
// Original offset is beyond the end of the text. Return false, it's not a boundary,
// but the iteration position remains set to the end of the text, which is a boundary.
return FALSE;
return false;
}
if (!result) {
// Not on a boundary. isBoundary() must leave iterator on the following boundary.
@ -838,7 +838,7 @@ int32_t RuleBasedBreakIterator::handleNext() {
result = initialPosition;
c = UTEXT_NEXT32(&fText);
if (c==U_SENTINEL) {
fDone = TRUE;
fDone = true;
return UBRK_DONE;
}
@ -1153,8 +1153,8 @@ U_NAMESPACE_END
static icu::UStack *gLanguageBreakFactories = nullptr;
static const icu::UnicodeString *gEmptyString = nullptr;
static icu::UInitOnce gLanguageBreakFactoriesInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gRBBIInitOnce = U_INITONCE_INITIALIZER;
static icu::UInitOnce gLanguageBreakFactoriesInitOnce {};
static icu::UInitOnce gRBBIInitOnce {};
/**
* Release all static memory held by breakiterator.
@ -1167,7 +1167,7 @@ UBool U_CALLCONV rbbi_cleanup(void) {
gEmptyString = nullptr;
gLanguageBreakFactoriesInitOnce.reset();
gRBBIInitOnce.reset();
return TRUE;
return true;
}
U_CDECL_END

Просмотреть файл

@ -45,7 +45,7 @@ void RuleBasedBreakIterator::DictionaryCache::reset() {
UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_t *result, int32_t *statusIndex) {
if (fromPos >= fLimit || fromPos < fStart) {
fPositionInCache = -1;
return FALSE;
return false;
}
// Sequential iteration, move from previous boundary to the following
@ -55,13 +55,13 @@ UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_
++fPositionInCache;
if (fPositionInCache >= fBreaks.size()) {
fPositionInCache = -1;
return FALSE;
return false;
}
r = fBreaks.elementAti(fPositionInCache);
U_ASSERT(r > fromPos);
*result = r;
*statusIndex = fOtherRuleStatusIndex;
return TRUE;
return true;
}
// Random indexing. Linear search for the boundary following the given position.
@ -71,7 +71,7 @@ UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_
if (r > fromPos) {
*result = r;
*statusIndex = fOtherRuleStatusIndex;
return TRUE;
return true;
}
}
UPRV_UNREACHABLE_EXIT;
@ -81,7 +81,7 @@ UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_
UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_t *result, int32_t *statusIndex) {
if (fromPos <= fStart || fromPos > fLimit) {
fPositionInCache = -1;
return FALSE;
return false;
}
if (fromPos == fLimit) {
@ -98,12 +98,12 @@ UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_
U_ASSERT(r < fromPos);
*result = r;
*statusIndex = ( r== fStart) ? fFirstRuleStatusIndex : fOtherRuleStatusIndex;
return TRUE;
return true;
}
if (fPositionInCache == 0) {
fPositionInCache = -1;
return FALSE;
return false;
}
for (fPositionInCache = fBreaks.size()-1; fPositionInCache >= 0; --fPositionInCache) {
@ -111,7 +111,7 @@ UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_
if (r < fromPos) {
*result = r;
*statusIndex = ( r == fStart) ? fFirstRuleStatusIndex : fOtherRuleStatusIndex;
return TRUE;
return true;
}
}
UPRV_UNREACHABLE_EXIT;
@ -227,7 +227,7 @@ void RuleBasedBreakIterator::BreakCache::reset(int32_t pos, int32_t ruleStatus)
int32_t RuleBasedBreakIterator::BreakCache::current() {
fBI->fPosition = fTextIdx;
fBI->fRuleStatusIndex = fStatuses[fBufIdx];
fBI->fDone = FALSE;
fBI->fDone = false;
return fTextIdx;
}
@ -302,18 +302,18 @@ void RuleBasedBreakIterator::BreakCache::previous(UErrorCode &status) {
UBool RuleBasedBreakIterator::BreakCache::seek(int32_t pos) {
if (pos < fBoundaries[fStartBufIdx] || pos > fBoundaries[fEndBufIdx]) {
return FALSE;
return false;
}
if (pos == fBoundaries[fStartBufIdx]) {
// Common case: seek(0), from BreakIterator::first()
fBufIdx = fStartBufIdx;
fTextIdx = fBoundaries[fBufIdx];
return TRUE;
return true;
}
if (pos == fBoundaries[fEndBufIdx]) {
fBufIdx = fEndBufIdx;
fTextIdx = fBoundaries[fBufIdx];
return TRUE;
return true;
}
int32_t min = fStartBufIdx;
@ -331,51 +331,97 @@ UBool RuleBasedBreakIterator::BreakCache::seek(int32_t pos) {
fBufIdx = modChunkSize(max - 1);
fTextIdx = fBoundaries[fBufIdx];
U_ASSERT(fTextIdx <= pos);
return TRUE;
return true;
}
UBool RuleBasedBreakIterator::BreakCache::populateNear(int32_t position, UErrorCode &status) {
if (U_FAILURE(status)) {
return FALSE;
return false;
}
U_ASSERT(position < fBoundaries[fStartBufIdx] || position > fBoundaries[fEndBufIdx]);
// Find a boundary somewhere in the vicinity of the requested position.
// Depending on the safe rules and the text data, it could be either before, at, or after
// the requested position.
// Add boundaries to the cache near the specified position.
// The given position need not be a boundary itself.
// The input position must be within the range of the text, and
// on a code point boundary.
// If the requested position is a break boundary, leave the iteration
// position on it.
// If the requested position is not a boundary, leave the iteration
// position on the preceding boundary and include both the
// preceding and following boundaries in the cache.
// Additional boundaries, either preceding or following, may be added
// to the cache as a side effect.
// If the requested position is not near already cached positions, clear the existing cache,
// find a near-by boundary and begin new cache contents there.
if ((position < fBoundaries[fStartBufIdx] - 15) || position > (fBoundaries[fEndBufIdx] + 15)) {
int32_t aBoundary = 0;
int32_t ruleStatusIndex = 0;
if (position > 20) {
int32_t backupPos = fBI->handleSafePrevious(position);
// Threshold for a text position to be considered near to existing cache contents.
// TODO: See issue ICU-22024 "perf tuning of Cache needed."
// This value is subject to change. See the ticket for more details.
static constexpr int32_t CACHE_NEAR = 15;
if (backupPos > 0) {
// Advance to the boundary following the backup position.
// There is a complication: the safe reverse rules identify pairs of code points
// that are safe. If advancing from the safe point moves forwards by less than
// two code points, we need to advance one more time to ensure that the boundary
// is good, including a correct rules status value.
//
fBI->fPosition = backupPos;
aBoundary = fBI->handleNext();
if (aBoundary <= backupPos + 4) {
// +4 is a quick test for possibly having advanced only one codepoint.
// Four being the length of the longest potential code point, a supplementary in UTF-8
utext_setNativeIndex(&fBI->fText, aBoundary);
if (backupPos == utext_getPreviousNativeIndex(&fBI->fText)) {
// The initial handleNext() only advanced by a single code point. Go again.
aBoundary = fBI->handleNext(); // Safe rules identify safe pairs.
}
int32_t aBoundary = -1;
int32_t ruleStatusIndex = 0;
bool retainCache = false;
if ((position > fBoundaries[fStartBufIdx] - CACHE_NEAR) && position < (fBoundaries[fEndBufIdx] + CACHE_NEAR)) {
// Requested position is near the existing cache. Retain it.
retainCache = true;
} else if (position <= CACHE_NEAR) {
// Requested position is near the start of the text. Fill cache from start, skipping
// the need to find a safe point.
retainCache = false;
aBoundary = 0;
} else {
// Requested position is not near the existing cache.
// Find a safe point to refill the cache from.
int32_t backupPos = fBI->handleSafePrevious(position);
if (fBoundaries[fEndBufIdx] < position && fBoundaries[fEndBufIdx] >= (backupPos - CACHE_NEAR)) {
// The requested position is beyond the end of the existing cache, but the
// reverse rules produced a position near or before the cached region.
// Retain the existing cache, and fill from the end of it.
retainCache = true;
} else if (backupPos < CACHE_NEAR) {
// The safe reverse rules moved us to near the start of text.
// Take that (index 0) as the backup boundary, avoiding the complication
// (in the following block) of moving forward from the safe point to a known boundary.
//
// Retain the cache if it begins not too far from the requested position.
aBoundary = 0;
retainCache = (fBoundaries[fStartBufIdx] <= (position + CACHE_NEAR));
} else {
// The safe reverse rules produced a position that is neither near the existing
// cache, nor near the start of text.
// Advance to the boundary following.
// There is a complication: the safe reverse rules identify pairs of code points
// that are safe. If advancing from the safe point moves forwards by less than
// two code points, we need to advance one more time to ensure that the boundary
// is good, including a correct rules status value.
retainCache = false;
fBI->fPosition = backupPos;
aBoundary = fBI->handleNext();
if (aBoundary != UBRK_DONE && aBoundary <= backupPos + 4) {
// +4 is a quick test for possibly having advanced only one codepoint.
// Four being the length of the longest potential code point, a supplementary in UTF-8
utext_setNativeIndex(&fBI->fText, aBoundary);
if (backupPos == utext_getPreviousNativeIndex(&fBI->fText)) {
// The initial handleNext() only advanced by a single code point. Go again.
aBoundary = fBI->handleNext(); // Safe rules identify safe pairs.
}
ruleStatusIndex = fBI->fRuleStatusIndex;
}
if (aBoundary == UBRK_DONE) {
// Note (Andy Heninger): I don't think this condition can occur, but it's hard
// to prove that it can't. We ran off the end of the string looking a boundary
// following a safe point; choose the end of the string as that boundary.
aBoundary = utext_nativeLength(&fBI->fText);
}
ruleStatusIndex = fBI->fRuleStatusIndex;
}
}
if (!retainCache) {
U_ASSERT(aBoundary != -1);
reset(aBoundary, ruleStatusIndex); // Reset cache to hold aBoundary as a single starting point.
}
@ -430,13 +476,13 @@ UBool RuleBasedBreakIterator::BreakCache::populateFollowing() {
if (fBI->fDictionaryCache->following(fromPosition, &pos, &ruleStatusIdx)) {
addFollowing(pos, ruleStatusIdx, UpdateCachePosition);
return TRUE;
return true;
}
fBI->fPosition = fromPosition;
pos = fBI->handleNext();
if (pos == UBRK_DONE) {
return FALSE;
return false;
}
ruleStatusIdx = fBI->fRuleStatusIndex;
@ -446,7 +492,7 @@ UBool RuleBasedBreakIterator::BreakCache::populateFollowing() {
fBI->fDictionaryCache->populateDictionary(fromPosition, pos, fromRuleStatusIdx, ruleStatusIdx);
if (fBI->fDictionaryCache->following(fromPosition, &pos, &ruleStatusIdx)) {
addFollowing(pos, ruleStatusIdx, UpdateCachePosition);
return TRUE;
return true;
// TODO: may want to move a sizable chunk of dictionary cache to break cache at this point.
// But be careful with interactions with populateNear().
}
@ -469,18 +515,18 @@ UBool RuleBasedBreakIterator::BreakCache::populateFollowing() {
addFollowing(pos, fBI->fRuleStatusIndex, RetainCachePosition);
}
return TRUE;
return true;
}
UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status) {
if (U_FAILURE(status)) {
return FALSE;
return false;
}
int32_t fromPosition = fBoundaries[fStartBufIdx];
if (fromPosition == 0) {
return FALSE;
return false;
}
int32_t position = 0;
@ -488,7 +534,7 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status)
if (fBI->fDictionaryCache->preceding(fromPosition, &position, &positionStatusIdx)) {
addPreceding(position, positionStatusIdx, UpdateCachePosition);
return TRUE;
return true;
}
int32_t backupPosition = fromPosition;
@ -542,7 +588,7 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status)
break;
}
UBool segmentHandledByDictionary = FALSE;
UBool segmentHandledByDictionary = false;
if (fBI->fDictionaryCharCount != 0) {
// Segment from the rules includes dictionary characters.
// Subdivide it, with subdivided results going into the dictionary cache.
@ -569,12 +615,12 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status)
} while (position < fromPosition);
// Move boundaries from the side buffer to the main circular buffer.
UBool success = FALSE;
UBool success = false;
if (!fSideBuffer.isEmpty()) {
positionStatusIdx = fSideBuffer.popi();
position = fSideBuffer.popi();
addPreceding(position, positionStatusIdx, UpdateCachePosition);
success = TRUE;
success = true;
}
while (!fSideBuffer.isEmpty()) {

Просмотреть файл

@ -111,9 +111,9 @@ line_loop: while (<>) {
#
# do the 'n' flag
#
$state_flag[$num_states] = $javaOutput? "false" : "FALSE";
$state_flag[$num_states] = "false";
if ($fields[0] eq "n") {
$state_flag[$num_states] = $javaOutput? "true": "TRUE";
$state_flag[$num_states] = "true";
shift @fields;
}
@ -403,7 +403,7 @@ else
# emit the state transition table
#
print "static const struct RBBIRuleTableEl gRuleParseStateTable[] = {\n";
print " {doNOP, 0, 0, 0, TRUE}\n"; # State 0 is a dummy. Real states start with index = 1.
print " {doNOP, 0, 0, 0, true}\n"; # State 0 is a dummy. Real states start with index = 1.
for ($state=1; $state < $num_states; $state++) {
print " , {$state_func_name[$state],";
if ($state_literal_chars[$state] ne "") {

Просмотреть файл

@ -38,7 +38,7 @@ RBBIDataWrapper::RBBIDataWrapper(const RBBIDataHeader *data, UErrorCode &status)
RBBIDataWrapper::RBBIDataWrapper(const RBBIDataHeader *data, enum EDontAdopt, UErrorCode &status) {
init0();
init(data, status);
fDontFreeData = TRUE;
fDontFreeData = true;
}
RBBIDataWrapper::RBBIDataWrapper(UDataMemory* udm, UErrorCode &status) {
@ -86,7 +86,7 @@ void RBBIDataWrapper::init0() {
fTrie = NULL;
fUDataMem = NULL;
fRefCount = 0;
fDontFreeData = TRUE;
fDontFreeData = true;
}
void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) {
@ -102,7 +102,7 @@ void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) {
// that is no longer supported. At that time fFormatVersion was
// an int32_t field, rather than an array of 4 bytes.
fDontFreeData = FALSE;
fDontFreeData = false;
if (data->fFTableLen != 0) {
fForwardTable = (RBBIStateTable *)((char *)data + fHeader->fFTable);
}

Просмотреть файл

@ -58,10 +58,10 @@ RBBINode::RBBINode(NodeType t) : UMemory() {
fInputSet = NULL;
fFirstPos = 0;
fLastPos = 0;
fNullable = FALSE;
fLookAheadEnd = FALSE;
fRuleRoot = FALSE;
fChainIn = FALSE;
fNullable = false;
fLookAheadEnd = false;
fRuleRoot = false;
fChainIn = false;
fVal = 0;
fPrecedence = precZero;
@ -92,7 +92,7 @@ RBBINode::RBBINode(const RBBINode &other) : UMemory(other) {
fLastPos = other.fLastPos;
fNullable = other.fNullable;
fVal = other.fVal;
fRuleRoot = FALSE;
fRuleRoot = false;
fChainIn = other.fChainIn;
UErrorCode status = U_ZERO_ERROR;
fFirstPosSet = new UVector(status); // TODO - get a real status from somewhere
@ -355,11 +355,11 @@ void RBBINode::printTree(const RBBINode *node, UBool printHeading) {
// Unconditionally dump children of all other node types.
if (node->fType != varRef) {
if (node->fLeftChild != NULL) {
printTree(node->fLeftChild, FALSE);
printTree(node->fLeftChild, false);
}
if (node->fRightChild != NULL) {
printTree(node->fRightChild, FALSE);
printTree(node->fRightChild, false);
}
}
}

Просмотреть файл

@ -65,9 +65,9 @@ RBBIRuleBuilder::RBBIRuleBuilder(const UnicodeString &rules,
fDefaultTree = &fForwardTree;
fForwardTable = NULL;
fRuleStatusVals = NULL;
fChainRules = FALSE;
fLBCMNoChain = FALSE;
fLookAheadHardBreak = FALSE;
fChainRules = false;
fLBCMNoChain = false;
fLookAheadHardBreak = false;
fUSetNodes = NULL;
fRuleStatusVals = NULL;
fScanner = NULL;

Просмотреть файл

@ -54,8 +54,8 @@ public: // of these structs for each ent
~RBBISymbolTableEntry();
private:
RBBISymbolTableEntry(const RBBISymbolTableEntry &other); // forbid copying of this class
RBBISymbolTableEntry &operator=(const RBBISymbolTableEntry &other); // forbid copying of this class
RBBISymbolTableEntry(const RBBISymbolTableEntry &other) = delete; // forbid copying of this class
RBBISymbolTableEntry &operator=(const RBBISymbolTableEntry &other) = delete; // forbid copying of this class
};
@ -177,8 +177,8 @@ public:
RBBIDataHeader *flattenData(); // Create the flattened (runtime format)
// data tables..
private:
RBBIRuleBuilder(const RBBIRuleBuilder &other); // forbid copying of this class
RBBIRuleBuilder &operator=(const RBBIRuleBuilder &other); // forbid copying of this class
RBBIRuleBuilder(const RBBIRuleBuilder &other) = delete; // forbid copying of this class
RBBIRuleBuilder &operator=(const RBBIRuleBuilder &other) = delete; // forbid copying of this class
};

Просмотреть файл

@ -79,110 +79,110 @@ struct RBBIRuleTableEl {
};
static const struct RBBIRuleTableEl gRuleParseStateTable[] = {
{doNOP, 0, 0, 0, TRUE}
, {doExprStart, 254, 29, 9, FALSE} // 1 start
, {doNOP, 132, 1,0, TRUE} // 2
, {doNoChain, 94 /* ^ */, 12, 9, TRUE} // 3
, {doExprStart, 36 /* $ */, 88, 98, FALSE} // 4
, {doNOP, 33 /* ! */, 19,0, TRUE} // 5
, {doNOP, 59 /* ; */, 1,0, TRUE} // 6
, {doNOP, 252, 0,0, FALSE} // 7
, {doExprStart, 255, 29, 9, FALSE} // 8
, {doEndOfRule, 59 /* ; */, 1,0, TRUE} // 9 break-rule-end
, {doNOP, 132, 9,0, TRUE} // 10
, {doRuleError, 255, 103,0, FALSE} // 11
, {doExprStart, 254, 29,0, FALSE} // 12 start-after-caret
, {doNOP, 132, 12,0, TRUE} // 13
, {doRuleError, 94 /* ^ */, 103,0, FALSE} // 14
, {doExprStart, 36 /* $ */, 88, 37, FALSE} // 15
, {doRuleError, 59 /* ; */, 103,0, FALSE} // 16
, {doRuleError, 252, 103,0, FALSE} // 17
, {doExprStart, 255, 29,0, FALSE} // 18
, {doNOP, 33 /* ! */, 21,0, TRUE} // 19 rev-option
, {doReverseDir, 255, 28, 9, FALSE} // 20
, {doOptionStart, 130, 23,0, TRUE} // 21 option-scan1
, {doRuleError, 255, 103,0, FALSE} // 22
, {doNOP, 129, 23,0, TRUE} // 23 option-scan2
, {doOptionEnd, 255, 25,0, FALSE} // 24
, {doNOP, 59 /* ; */, 1,0, TRUE} // 25 option-scan3
, {doNOP, 132, 25,0, TRUE} // 26
, {doRuleError, 255, 103,0, FALSE} // 27
, {doExprStart, 255, 29, 9, FALSE} // 28 reverse-rule
, {doRuleChar, 254, 38,0, TRUE} // 29 term
, {doNOP, 132, 29,0, TRUE} // 30
, {doRuleChar, 131, 38,0, TRUE} // 31
, {doNOP, 91 /* [ */, 94, 38, FALSE} // 32
, {doLParen, 40 /* ( */, 29, 38, TRUE} // 33
, {doNOP, 36 /* $ */, 88, 37, FALSE} // 34
, {doDotAny, 46 /* . */, 38,0, TRUE} // 35
, {doRuleError, 255, 103,0, FALSE} // 36
, {doCheckVarDef, 255, 38,0, FALSE} // 37 term-var-ref
, {doNOP, 132, 38,0, TRUE} // 38 expr-mod
, {doUnaryOpStar, 42 /* * */, 43,0, TRUE} // 39
, {doUnaryOpPlus, 43 /* + */, 43,0, TRUE} // 40
, {doUnaryOpQuestion, 63 /* ? */, 43,0, TRUE} // 41
, {doNOP, 255, 43,0, FALSE} // 42
, {doExprCatOperator, 254, 29,0, FALSE} // 43 expr-cont
, {doNOP, 132, 43,0, TRUE} // 44
, {doExprCatOperator, 131, 29,0, FALSE} // 45
, {doExprCatOperator, 91 /* [ */, 29,0, FALSE} // 46
, {doExprCatOperator, 40 /* ( */, 29,0, FALSE} // 47
, {doExprCatOperator, 36 /* $ */, 29,0, FALSE} // 48
, {doExprCatOperator, 46 /* . */, 29,0, FALSE} // 49
, {doExprCatOperator, 47 /* / */, 55,0, FALSE} // 50
, {doExprCatOperator, 123 /* { */, 67,0, TRUE} // 51
, {doExprOrOperator, 124 /* | */, 29,0, TRUE} // 52
, {doExprRParen, 41 /* ) */, 255,0, TRUE} // 53
, {doExprFinished, 255, 255,0, FALSE} // 54
, {doSlash, 47 /* / */, 57,0, TRUE} // 55 look-ahead
, {doNOP, 255, 103,0, FALSE} // 56
, {doExprCatOperator, 254, 29,0, FALSE} // 57 expr-cont-no-slash
, {doNOP, 132, 43,0, TRUE} // 58
, {doExprCatOperator, 131, 29,0, FALSE} // 59
, {doExprCatOperator, 91 /* [ */, 29,0, FALSE} // 60
, {doExprCatOperator, 40 /* ( */, 29,0, FALSE} // 61
, {doExprCatOperator, 36 /* $ */, 29,0, FALSE} // 62
, {doExprCatOperator, 46 /* . */, 29,0, FALSE} // 63
, {doExprOrOperator, 124 /* | */, 29,0, TRUE} // 64
, {doExprRParen, 41 /* ) */, 255,0, TRUE} // 65
, {doExprFinished, 255, 255,0, FALSE} // 66
, {doNOP, 132, 67,0, TRUE} // 67 tag-open
, {doStartTagValue, 128, 70,0, FALSE} // 68
, {doTagExpectedError, 255, 103,0, FALSE} // 69
, {doNOP, 132, 74,0, TRUE} // 70 tag-value
, {doNOP, 125 /* } */, 74,0, FALSE} // 71
, {doTagDigit, 128, 70,0, TRUE} // 72
, {doTagExpectedError, 255, 103,0, FALSE} // 73
, {doNOP, 132, 74,0, TRUE} // 74 tag-close
, {doTagValue, 125 /* } */, 77,0, TRUE} // 75
, {doTagExpectedError, 255, 103,0, FALSE} // 76
, {doExprCatOperator, 254, 29,0, FALSE} // 77 expr-cont-no-tag
, {doNOP, 132, 77,0, TRUE} // 78
, {doExprCatOperator, 131, 29,0, FALSE} // 79
, {doExprCatOperator, 91 /* [ */, 29,0, FALSE} // 80
, {doExprCatOperator, 40 /* ( */, 29,0, FALSE} // 81
, {doExprCatOperator, 36 /* $ */, 29,0, FALSE} // 82
, {doExprCatOperator, 46 /* . */, 29,0, FALSE} // 83
, {doExprCatOperator, 47 /* / */, 55,0, FALSE} // 84
, {doExprOrOperator, 124 /* | */, 29,0, TRUE} // 85
, {doExprRParen, 41 /* ) */, 255,0, TRUE} // 86
, {doExprFinished, 255, 255,0, FALSE} // 87
, {doStartVariableName, 36 /* $ */, 90,0, TRUE} // 88 scan-var-name
, {doNOP, 255, 103,0, FALSE} // 89
, {doNOP, 130, 92,0, TRUE} // 90 scan-var-start
, {doVariableNameExpectedErr, 255, 103,0, FALSE} // 91
, {doNOP, 129, 92,0, TRUE} // 92 scan-var-body
, {doEndVariableName, 255, 255,0, FALSE} // 93
, {doScanUnicodeSet, 91 /* [ */, 255,0, TRUE} // 94 scan-unicode-set
, {doScanUnicodeSet, 112 /* p */, 255,0, TRUE} // 95
, {doScanUnicodeSet, 80 /* P */, 255,0, TRUE} // 96
, {doNOP, 255, 103,0, FALSE} // 97
, {doNOP, 132, 98,0, TRUE} // 98 assign-or-rule
, {doStartAssign, 61 /* = */, 29, 101, TRUE} // 99
, {doNOP, 255, 37, 9, FALSE} // 100
, {doEndAssign, 59 /* ; */, 1,0, TRUE} // 101 assign-end
, {doRuleErrorAssignExpr, 255, 103,0, FALSE} // 102
, {doExit, 255, 103,0, TRUE} // 103 errorDeath
{doNOP, 0, 0, 0, true}
, {doExprStart, 254, 29, 9, false} // 1 start
, {doNOP, 132, 1,0, true} // 2
, {doNoChain, 94 /* ^ */, 12, 9, true} // 3
, {doExprStart, 36 /* $ */, 88, 98, false} // 4
, {doNOP, 33 /* ! */, 19,0, true} // 5
, {doNOP, 59 /* ; */, 1,0, true} // 6
, {doNOP, 252, 0,0, false} // 7
, {doExprStart, 255, 29, 9, false} // 8
, {doEndOfRule, 59 /* ; */, 1,0, true} // 9 break-rule-end
, {doNOP, 132, 9,0, true} // 10
, {doRuleError, 255, 103,0, false} // 11
, {doExprStart, 254, 29,0, false} // 12 start-after-caret
, {doNOP, 132, 12,0, true} // 13
, {doRuleError, 94 /* ^ */, 103,0, false} // 14
, {doExprStart, 36 /* $ */, 88, 37, false} // 15
, {doRuleError, 59 /* ; */, 103,0, false} // 16
, {doRuleError, 252, 103,0, false} // 17
, {doExprStart, 255, 29,0, false} // 18
, {doNOP, 33 /* ! */, 21,0, true} // 19 rev-option
, {doReverseDir, 255, 28, 9, false} // 20
, {doOptionStart, 130, 23,0, true} // 21 option-scan1
, {doRuleError, 255, 103,0, false} // 22
, {doNOP, 129, 23,0, true} // 23 option-scan2
, {doOptionEnd, 255, 25,0, false} // 24
, {doNOP, 59 /* ; */, 1,0, true} // 25 option-scan3
, {doNOP, 132, 25,0, true} // 26
, {doRuleError, 255, 103,0, false} // 27
, {doExprStart, 255, 29, 9, false} // 28 reverse-rule
, {doRuleChar, 254, 38,0, true} // 29 term
, {doNOP, 132, 29,0, true} // 30
, {doRuleChar, 131, 38,0, true} // 31
, {doNOP, 91 /* [ */, 94, 38, false} // 32
, {doLParen, 40 /* ( */, 29, 38, true} // 33
, {doNOP, 36 /* $ */, 88, 37, false} // 34
, {doDotAny, 46 /* . */, 38,0, true} // 35
, {doRuleError, 255, 103,0, false} // 36
, {doCheckVarDef, 255, 38,0, false} // 37 term-var-ref
, {doNOP, 132, 38,0, true} // 38 expr-mod
, {doUnaryOpStar, 42 /* * */, 43,0, true} // 39
, {doUnaryOpPlus, 43 /* + */, 43,0, true} // 40
, {doUnaryOpQuestion, 63 /* ? */, 43,0, true} // 41
, {doNOP, 255, 43,0, false} // 42
, {doExprCatOperator, 254, 29,0, false} // 43 expr-cont
, {doNOP, 132, 43,0, true} // 44
, {doExprCatOperator, 131, 29,0, false} // 45
, {doExprCatOperator, 91 /* [ */, 29,0, false} // 46
, {doExprCatOperator, 40 /* ( */, 29,0, false} // 47
, {doExprCatOperator, 36 /* $ */, 29,0, false} // 48
, {doExprCatOperator, 46 /* . */, 29,0, false} // 49
, {doExprCatOperator, 47 /* / */, 55,0, false} // 50
, {doExprCatOperator, 123 /* { */, 67,0, true} // 51
, {doExprOrOperator, 124 /* | */, 29,0, true} // 52
, {doExprRParen, 41 /* ) */, 255,0, true} // 53
, {doExprFinished, 255, 255,0, false} // 54
, {doSlash, 47 /* / */, 57,0, true} // 55 look-ahead
, {doNOP, 255, 103,0, false} // 56
, {doExprCatOperator, 254, 29,0, false} // 57 expr-cont-no-slash
, {doNOP, 132, 43,0, true} // 58
, {doExprCatOperator, 131, 29,0, false} // 59
, {doExprCatOperator, 91 /* [ */, 29,0, false} // 60
, {doExprCatOperator, 40 /* ( */, 29,0, false} // 61
, {doExprCatOperator, 36 /* $ */, 29,0, false} // 62
, {doExprCatOperator, 46 /* . */, 29,0, false} // 63
, {doExprOrOperator, 124 /* | */, 29,0, true} // 64
, {doExprRParen, 41 /* ) */, 255,0, true} // 65
, {doExprFinished, 255, 255,0, false} // 66
, {doNOP, 132, 67,0, true} // 67 tag-open
, {doStartTagValue, 128, 70,0, false} // 68
, {doTagExpectedError, 255, 103,0, false} // 69
, {doNOP, 132, 74,0, true} // 70 tag-value
, {doNOP, 125 /* } */, 74,0, false} // 71
, {doTagDigit, 128, 70,0, true} // 72
, {doTagExpectedError, 255, 103,0, false} // 73
, {doNOP, 132, 74,0, true} // 74 tag-close
, {doTagValue, 125 /* } */, 77,0, true} // 75
, {doTagExpectedError, 255, 103,0, false} // 76
, {doExprCatOperator, 254, 29,0, false} // 77 expr-cont-no-tag
, {doNOP, 132, 77,0, true} // 78
, {doExprCatOperator, 131, 29,0, false} // 79
, {doExprCatOperator, 91 /* [ */, 29,0, false} // 80
, {doExprCatOperator, 40 /* ( */, 29,0, false} // 81
, {doExprCatOperator, 36 /* $ */, 29,0, false} // 82
, {doExprCatOperator, 46 /* . */, 29,0, false} // 83
, {doExprCatOperator, 47 /* / */, 55,0, false} // 84
, {doExprOrOperator, 124 /* | */, 29,0, true} // 85
, {doExprRParen, 41 /* ) */, 255,0, true} // 86
, {doExprFinished, 255, 255,0, false} // 87
, {doStartVariableName, 36 /* $ */, 90,0, true} // 88 scan-var-name
, {doNOP, 255, 103,0, false} // 89
, {doNOP, 130, 92,0, true} // 90 scan-var-start
, {doVariableNameExpectedErr, 255, 103,0, false} // 91
, {doNOP, 129, 92,0, true} // 92 scan-var-body
, {doEndVariableName, 255, 255,0, false} // 93
, {doScanUnicodeSet, 91 /* [ */, 255,0, true} // 94 scan-unicode-set
, {doScanUnicodeSet, 112 /* p */, 255,0, true} // 95
, {doScanUnicodeSet, 80 /* P */, 255,0, true} // 96
, {doNOP, 255, 103,0, false} // 97
, {doNOP, 132, 98,0, true} // 98 assign-or-rule
, {doStartAssign, 61 /* = */, 29, 101, true} // 99
, {doNOP, 255, 37, 9, false} // 100
, {doEndAssign, 59 /* ; */, 1,0, true} // 101 assign-end
, {doRuleErrorAssignExpr, 255, 103,0, false} // 102
, {doExit, 255, 103,0, true} // 103 errorDeath
};
#ifdef RBBI_DEBUG
static const char * const RBBIRuleStateNames[] = { 0,

Просмотреть файл

@ -92,7 +92,7 @@ RBBIRuleScanner::RBBIRuleScanner(RBBIRuleBuilder *rb)
fRB = rb;
fScanIndex = 0;
fNextIndex = 0;
fQuoteMode = FALSE;
fQuoteMode = false;
fLineNum = 1;
fCharNum = 0;
fLastChar = 0;
@ -103,9 +103,9 @@ RBBIRuleScanner::RBBIRuleScanner(RBBIRuleBuilder *rb)
fNodeStack[0] = NULL;
fNodeStackPtr = 0;
fReverseRule = FALSE;
fLookAheadRule = FALSE;
fNoChainInRule = FALSE;
fReverseRule = false;
fLookAheadRule = false;
fNoChainInRule = false;
fSymbolTable = NULL;
fSetTable = NULL;
@ -201,7 +201,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
{
RBBINode *n = NULL;
UBool returnVal = TRUE;
UBool returnVal = true;
switch (action) {
@ -213,7 +213,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doNoChain:
// Scanned a '^' while on the rule start state.
fNoChainInRule = TRUE;
fNoChainInRule = true;
break;
@ -345,7 +345,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
catNode->fRightChild = endNode;
fNodeStack[fNodeStackPtr] = catNode;
endNode->fVal = fRuleNum;
endNode->fLookAheadEnd = TRUE;
endNode->fLookAheadEnd = true;
thisRule = catNode;
// TODO: Disable chaining out of look-ahead (hard break) rules.
@ -354,13 +354,13 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
}
// Mark this node as being the root of a rule.
thisRule->fRuleRoot = TRUE;
thisRule->fRuleRoot = true;
// Flag if chaining into this rule is wanted.
//
if (fRB->fChainRules && // If rule chaining is enabled globally via !!chain
!fNoChainInRule) { // and no '^' chain-in inhibit was on this rule
thisRule->fChainIn = TRUE;
thisRule->fChainIn = true;
}
@ -398,9 +398,9 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
// Just move its parse tree from the stack to *destRules.
*destRules = fNodeStack[fNodeStackPtr];
}
fReverseRule = FALSE; // in preparation for the next rule.
fLookAheadRule = FALSE;
fNoChainInRule = FALSE;
fReverseRule = false; // in preparation for the next rule.
fLookAheadRule = false;
fNoChainInRule = false;
fNodeStackPtr = 0;
}
break;
@ -408,7 +408,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doRuleError:
error(U_BRK_RULE_SYNTAX);
returnVal = FALSE;
returnVal = false;
break;
@ -484,7 +484,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
if (U_FAILURE(*fRB->fStatus)) {
break;
}
findSetFor(UnicodeString(TRUE, kAny, 3), n);
findSetFor(UnicodeString(true, kAny, 3), n);
n->fFirstPos = fScanIndex;
n->fLastPos = fNextIndex;
fRB->fRules.extractBetween(n->fFirstPos, n->fLastPos, n->fText);
@ -501,7 +501,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
n->fFirstPos = fScanIndex;
n->fLastPos = fNextIndex;
fRB->fRules.extractBetween(n->fFirstPos, n->fLastPos, n->fText);
fLookAheadRule = TRUE;
fLookAheadRule = true;
break;
@ -534,7 +534,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doTagExpectedError:
error(U_BRK_MALFORMED_RULE_TAG);
returnVal = FALSE;
returnVal = false;
break;
case doOptionStart:
@ -546,9 +546,9 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
{
UnicodeString opt(fRB->fRules, fOptionStart, fScanIndex-fOptionStart);
if (opt == UNICODE_STRING("chain", 5)) {
fRB->fChainRules = TRUE;
fRB->fChainRules = true;
} else if (opt == UNICODE_STRING("LBCMNoChain", 11)) {
fRB->fLBCMNoChain = TRUE;
fRB->fLBCMNoChain = true;
} else if (opt == UNICODE_STRING("forward", 7)) {
fRB->fDefaultTree = &fRB->fForwardTree;
} else if (opt == UNICODE_STRING("reverse", 7)) {
@ -558,7 +558,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
} else if (opt == UNICODE_STRING("safe_reverse", 12)) {
fRB->fDefaultTree = &fRB->fSafeRevTree;
} else if (opt == UNICODE_STRING("lookAheadHardBreak", 18)) {
fRB->fLookAheadHardBreak = TRUE;
fRB->fLookAheadHardBreak = true;
} else if (opt == UNICODE_STRING("quoted_literals_only", 20)) {
fRuleSets[kRuleSet_rule_char-128].clear();
} else if (opt == UNICODE_STRING("unquoted_literals", 17)) {
@ -570,7 +570,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
break;
case doReverseDir:
fReverseRule = TRUE;
fReverseRule = true;
break;
case doStartVariableName:
@ -600,7 +600,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
n = fNodeStack[fNodeStackPtr];
if (n->fLeftChild == NULL) {
error(U_BRK_UNDEFINED_VARIABLE);
returnVal = FALSE;
returnVal = false;
}
break;
@ -609,11 +609,11 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doRuleErrorAssignExpr:
error(U_BRK_ASSIGN_ERROR);
returnVal = FALSE;
returnVal = false;
break;
case doExit:
returnVal = FALSE;
returnVal = false;
break;
case doScanUnicodeSet:
@ -622,7 +622,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
default:
error(U_BRK_INTERNAL_ERROR);
returnVal = FALSE;
returnVal = false;
break;
}
return returnVal && U_SUCCESS(*fRB->fStatus);
@ -872,7 +872,7 @@ UChar32 RBBIRuleScanner::nextCharLL() {
fCharNum=0;
if (fQuoteMode) {
error(U_BRK_NEW_LINE_IN_QUOTED_STRING);
fQuoteMode = FALSE;
fQuoteMode = false;
}
}
else {
@ -901,7 +901,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) {
fScanIndex = fNextIndex;
c.fChar = nextCharLL();
c.fEscaped = FALSE;
c.fEscaped = false;
//
// check for '' sequence.
@ -910,7 +910,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) {
if (c.fChar == chApos) {
if (fRB->fRules.char32At(fNextIndex) == chApos) {
c.fChar = nextCharLL(); // get nextChar officially so character counts
c.fEscaped = TRUE; // stay correct.
c.fEscaped = true; // stay correct.
}
else
{
@ -918,18 +918,18 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) {
// Toggle quoting mode.
// Return either '(' or ')', because quotes cause a grouping of the quoted text.
fQuoteMode = !fQuoteMode;
if (fQuoteMode == TRUE) {
if (fQuoteMode) {
c.fChar = chLParen;
} else {
c.fChar = chRParen;
}
c.fEscaped = FALSE; // The paren that we return is not escaped.
c.fEscaped = false; // The paren that we return is not escaped.
return;
}
}
if (fQuoteMode) {
c.fEscaped = TRUE;
c.fEscaped = true;
}
else
{
@ -963,7 +963,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) {
// Use UnicodeString::unescapeAt() to handle them.
//
if (c.fChar == chBackSlash) {
c.fEscaped = TRUE;
c.fEscaped = true;
int32_t startX = fNextIndex;
c.fChar = fRB->fRules.unescapeAt(fNextIndex);
if (fNextIndex == startX) {
@ -1032,7 +1032,7 @@ void RBBIRuleScanner::parse() {
#ifdef RBBI_DEBUG
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "scan")) { RBBIDebugPrintf("."); fflush(stdout);}
#endif
if (tableEl->fCharClass < 127 && fC.fEscaped == FALSE && tableEl->fCharClass == fC.fChar) {
if (tableEl->fCharClass < 127 && fC.fEscaped == false && tableEl->fCharClass == fC.fChar) {
// Table row specified an individual character, not a set, and
// the input character is not escaped, and
// the input character matched it.
@ -1057,7 +1057,7 @@ void RBBIRuleScanner::parse() {
}
if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && // Table specs a char class &&
fC.fEscaped == FALSE && // char is not escaped &&
fC.fEscaped == false && // char is not escaped &&
fC.fChar != (UChar32)-1) { // char is not EOF
U_ASSERT((tableEl->fCharClass-128) < UPRV_LENGTHOF(fRuleSets));
if (fRuleSets[tableEl->fCharClass-128].contains(fC.fChar)) {
@ -1076,7 +1076,7 @@ void RBBIRuleScanner::parse() {
// We've found the row of the state table that matches the current input
// character from the rules string.
// Perform any action specified by this row in the state table.
if (doParseActions((int32_t)tableEl->fAction) == FALSE) {
if (doParseActions((int32_t)tableEl->fAction) == false) {
// Break out of the state machine loop if the
// the action signalled some kind of error, or
// the action was to exit, occurs on normal end-of-rules-input.
@ -1133,13 +1133,13 @@ void RBBIRuleScanner::parse() {
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "symbols")) {fSymbolTable->rbbiSymtablePrint();}
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "ptree")) {
RBBIDebugPrintf("Completed Forward Rules Parse Tree...\n");
RBBINode::printTree(fRB->fForwardTree, TRUE);
RBBINode::printTree(fRB->fForwardTree, true);
RBBIDebugPrintf("\nCompleted Reverse Rules Parse Tree...\n");
RBBINode::printTree(fRB->fReverseTree, TRUE);
RBBINode::printTree(fRB->fReverseTree, true);
RBBIDebugPrintf("\nCompleted Safe Point Forward Rules Parse Tree...\n");
RBBINode::printTree(fRB->fSafeFwdTree, TRUE);
RBBINode::printTree(fRB->fSafeFwdTree, true);
RBBIDebugPrintf("\nCompleted Safe Point Reverse Rules Parse Tree...\n");
RBBINode::printTree(fRB->fSafeRevTree, TRUE);
RBBINode::printTree(fRB->fSafeRevTree, true);
}
#endif
}
@ -1154,7 +1154,7 @@ void RBBIRuleScanner::parse() {
void RBBIRuleScanner::printNodeStack(const char *title) {
int i;
RBBIDebugPrintf("%s. Dumping node stack...\n", title);
for (i=fNodeStackPtr; i>0; i--) {RBBINode::printTree(fNodeStack[i], TRUE);}
for (i=fNodeStackPtr; i>0; i--) {RBBINode::printTree(fNodeStack[i], true);}
}
#endif

Просмотреть файл

@ -158,8 +158,8 @@ private:
UnicodeSet *gRuleSet_name_char;
UnicodeSet *gRuleSet_name_start_char;
RBBIRuleScanner(const RBBIRuleScanner &other); // forbid copying of this class
RBBIRuleScanner &operator=(const RBBIRuleScanner &other); // forbid copying of this class
RBBIRuleScanner(const RBBIRuleScanner &other) = delete; // forbid copying of this class
RBBIRuleScanner &operator=(const RBBIRuleScanner &other) = delete; // forbid copying of this class
};
U_NAMESPACE_END

Просмотреть файл

@ -261,7 +261,7 @@ void RBBISetBuilder::buildRanges() {
}
if (inputSet->contains(bofString)) {
addValToSet(usetNode, 2);
fSawBOF = TRUE;
fSawBOF = true;
}
}
@ -569,7 +569,7 @@ void RBBISetBuilder::printSets() {
RBBI_DEBUG_printUnicodeString(usetNode->fText);
RBBIDebugPrintf("\n");
if (usetNode->fLeftChild != NULL) {
RBBINode::printTree(usetNode->fLeftChild, TRUE);
RBBINode::printTree(usetNode->fLeftChild, true);
}
}
RBBIDebugPrintf("\n");

Просмотреть файл

@ -134,8 +134,8 @@ private:
UBool fSawBOF;
RBBISetBuilder(const RBBISetBuilder &other); // forbid copying of this class
RBBISetBuilder &operator=(const RBBISetBuilder &other); // forbid copying of this class
RBBISetBuilder(const RBBISetBuilder &other) = delete; // forbid copying of this class
RBBISetBuilder &operator=(const RBBISetBuilder &other) = delete; // forbid copying of this class
};

Просмотреть файл

@ -254,8 +254,8 @@ void RBBISymbolTable::rbbiSymtablePrint() const {
}
RBBISymbolTableEntry *s = (RBBISymbolTableEntry *)e->value.pointer;
RBBIDebugPrintf("%s\n", CStr(s->key)());
RBBINode::printTree(s->val, TRUE);
RBBINode::printTree(s->val->fLeftChild, FALSE);
RBBINode::printTree(s->val, true);
RBBINode::printTree(s->val->fLeftChild, false);
RBBIDebugPrintf("\n");
}
}

Просмотреть файл

@ -85,7 +85,7 @@ void RBBITableBuilder::buildForwardTable() {
#ifdef RBBI_DEBUG
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "ftree")) {
RBBIDebugPuts("\nParse tree after flattening variable references.");
RBBINode::printTree(fTree, TRUE);
RBBINode::printTree(fTree, true);
}
#endif
@ -143,7 +143,7 @@ void RBBITableBuilder::buildForwardTable() {
#ifdef RBBI_DEBUG
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "stree")) {
RBBIDebugPuts("\nParse tree after flattening Unicode Set references.");
RBBINode::printTree(fTree, TRUE);
RBBINode::printTree(fTree, true);
}
#endif
@ -209,14 +209,14 @@ void RBBITableBuilder::calcNullable(RBBINode *n) {
if (n->fType == RBBINode::setRef ||
n->fType == RBBINode::endMark ) {
// These are non-empty leaf node types.
n->fNullable = FALSE;
n->fNullable = false;
return;
}
if (n->fType == RBBINode::lookAhead || n->fType == RBBINode::tag) {
// Lookahead marker node. It's a leaf, so no recursion on children.
// It's nullable because it does not match any literal text from the input stream.
n->fNullable = TRUE;
n->fNullable = true;
return;
}
@ -234,10 +234,10 @@ void RBBITableBuilder::calcNullable(RBBINode *n) {
n->fNullable = n->fLeftChild->fNullable && n->fRightChild->fNullable;
}
else if (n->fType == RBBINode::opStar || n->fType == RBBINode::opQuestion) {
n->fNullable = TRUE;
n->fNullable = true;
}
else {
n->fNullable = FALSE;
n->fNullable = false;
}
}
@ -618,7 +618,7 @@ void RBBITableBuilder::buildStateTable() {
for (tx=1; tx<fDStates->size(); tx++) {
RBBIStateDescriptor *temp;
temp = (RBBIStateDescriptor *)fDStates->elementAt(tx);
if (temp->fMarked == FALSE) {
if (temp->fMarked == false) {
T = temp;
break;
}
@ -628,7 +628,7 @@ void RBBITableBuilder::buildStateTable() {
}
// mark T;
T->fMarked = TRUE;
T->fMarked = true;
// for each input symbol a do begin
int32_t a;
@ -655,7 +655,7 @@ void RBBITableBuilder::buildStateTable() {
// if U is not empty and not in DStates then
int32_t ux = 0;
UBool UinDstates = FALSE;
UBool UinDstates = false;
if (U != NULL) {
U_ASSERT(U->size() > 0);
int ix;
@ -666,7 +666,7 @@ void RBBITableBuilder::buildStateTable() {
delete U;
U = temp2->fPositions;
ux = ix;
UinDstates = TRUE;
UinDstates = true;
break;
}
}
@ -1131,7 +1131,7 @@ void RBBITableBuilder::printPosSets(RBBINode *n) {
printf("\n");
RBBINode::printNodeHeader();
RBBINode::printNode(n);
RBBIDebugPrintf(" Nullable: %s\n", n->fNullable?"TRUE":"FALSE");
RBBIDebugPrintf(" Nullable: %s\n", n->fNullable?"true":"false");
RBBIDebugPrintf(" firstpos: ");
printSet(n->fFirstPosSet);
@ -1773,7 +1773,7 @@ void RBBITableBuilder::printRuleStatusTable() {
//-----------------------------------------------------------------------------
RBBIStateDescriptor::RBBIStateDescriptor(int lastInputSymbol, UErrorCode *fStatus) {
fMarked = FALSE;
fMarked = false;
fAccepting = 0;
fLookAhead = 0;
fTagsIdx = 0;

Просмотреть файл

@ -219,8 +219,8 @@ public:
~RBBIStateDescriptor();
private:
RBBIStateDescriptor(const RBBIStateDescriptor &other); // forbid copying of this class
RBBIStateDescriptor &operator=(const RBBIStateDescriptor &other); // forbid copying of this class
RBBIStateDescriptor(const RBBIStateDescriptor &other) = delete; // forbid copying of this class
RBBIStateDescriptor &operator=(const RBBIStateDescriptor &other) = delete; // forbid copying of this class
};

Просмотреть файл

@ -254,7 +254,7 @@ ResourceBundle::clone() const {
UnicodeString ResourceBundle::getString(UErrorCode& status) const {
int32_t len = 0;
const UChar *r = ures_getString(fResource, &len, &status);
return UnicodeString(TRUE, r, len);
return UnicodeString(true, r, len);
}
const uint8_t *ResourceBundle::getBinary(int32_t& len, UErrorCode& status) const {
@ -312,13 +312,13 @@ ResourceBundle ResourceBundle::getNext(UErrorCode& status) {
UnicodeString ResourceBundle::getNextString(UErrorCode& status) {
int32_t len = 0;
const UChar* r = ures_getNextString(fResource, &len, 0, &status);
return UnicodeString(TRUE, r, len);
return UnicodeString(true, r, len);
}
UnicodeString ResourceBundle::getNextString(const char ** key, UErrorCode& status) {
int32_t len = 0;
const UChar* r = ures_getNextString(fResource, &len, key, &status);
return UnicodeString(TRUE, r, len);
return UnicodeString(true, r, len);
}
ResourceBundle ResourceBundle::get(int32_t indexR, UErrorCode& status) const {
@ -336,7 +336,7 @@ ResourceBundle ResourceBundle::get(int32_t indexR, UErrorCode& status) const {
UnicodeString ResourceBundle::getStringEx(int32_t indexS, UErrorCode& status) const {
int32_t len = 0;
const UChar* r = ures_getStringByIndex(fResource, indexS, &len, &status);
return UnicodeString(TRUE, r, len);
return UnicodeString(true, r, len);
}
ResourceBundle ResourceBundle::get(const char* key, UErrorCode& status) const {
@ -364,7 +364,7 @@ ResourceBundle ResourceBundle::getWithFallback(const char* key, UErrorCode& stat
UnicodeString ResourceBundle::getStringEx(const char* key, UErrorCode& status) const {
int32_t len = 0;
const UChar* r = ures_getStringByKey(fResource, key, &len, &status);
return UnicodeString(TRUE, r, len);
return UnicodeString(true, r, len);
}
const char*

Просмотреть файл

@ -286,8 +286,8 @@ public:
UErrorCode &errorCode) = 0;
private:
ResourceSink(const ResourceSink &); // no copy constructor
ResourceSink &operator=(const ResourceSink &); // no assignment operator
ResourceSink(const ResourceSink &) = delete; // no copy constructor
ResourceSink &operator=(const ResourceSink &) = delete; // no assignment operator
};
U_NAMESPACE_END

Просмотреть файл

@ -39,7 +39,7 @@ UChar32 RuleCharacterIterator::next(int32_t options, UBool& isEscaped, UErrorCod
if (U_FAILURE(ec)) return DONE;
UChar32 c = DONE;
isEscaped = FALSE;
isEscaped = false;
for (;;) {
c = _current();
@ -75,7 +75,7 @@ UChar32 RuleCharacterIterator::next(int32_t options, UBool& isEscaped, UErrorCod
int32_t offset = 0;
c = lookahead(tempEscape, MAX_U_NOTATION_LEN).unescapeAt(offset);
jumpahead(offset);
isEscaped = TRUE;
isEscaped = true;
if (c < 0) {
ec = U_MALFORMED_UNICODE_ESCAPE;
return DONE;

Просмотреть файл

@ -66,28 +66,28 @@ public:
/**
* Value returned when there are no more characters to iterate.
*/
enum { DONE = -1 };
static constexpr int32_t DONE = -1;
/**
* Bitmask option to enable parsing of variable names. If (options &
* PARSE_VARIABLES) != 0, then an embedded variable will be expanded to
* its value. Variables are parsed using the SymbolTable API.
*/
enum { PARSE_VARIABLES = 1 };
static constexpr int32_t PARSE_VARIABLES = 1;
/**
* Bitmask option to enable parsing of escape sequences. If (options &
* PARSE_ESCAPES) != 0, then an embedded escape sequence will be expanded
* to its value. Escapes are parsed using Utility.unescapeAt().
*/
enum { PARSE_ESCAPES = 2 };
static constexpr int32_t PARSE_ESCAPES = 2;
/**
* Bitmask option to enable skipping of whitespace. If (options &
* SKIP_WHITESPACE) != 0, then Pattern_White_Space characters will be silently
* skipped, as if they were not present in the input.
*/
enum { SKIP_WHITESPACE = 4 };
static constexpr int32_t SKIP_WHITESPACE = 4;
/**
* Constructs an iterator over the given text, starting at the given

Просмотреть файл

@ -64,7 +64,7 @@ ICUServiceKey::currentDescriptor(UnicodeString& result) const
UBool
ICUServiceKey::fallback()
{
return FALSE;
return false;
}
UBool
@ -249,7 +249,7 @@ public:
}
/**
* Return TRUE if there is at least one reference to this and the
* Return true if there is at least one reference to this and the
* resource has not been released.
*/
UBool isShared() const {
@ -454,11 +454,11 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer
UnicodeString currentDescriptor;
LocalPointer<UVector> cacheDescriptorList;
UBool putInCache = FALSE;
UBool putInCache = false;
int32_t startIndex = 0;
int32_t limit = factories->size();
UBool cacheResult = TRUE;
UBool cacheResult = true;
if (factory != NULL) {
for (int32_t i = 0; i < limit; ++i) {
@ -472,7 +472,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer
status = U_ILLEGAL_ARGUMENT_ERROR;
return NULL;
}
cacheResult = FALSE;
cacheResult = false;
}
do {
@ -486,7 +486,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer
// first test of cache failed, so we'll have to update
// the cache if we eventually succeed-- that is, if we're
// going to update the cache at all.
putInCache = TRUE;
putInCache = true;
int32_t index = startIndex;
while (index < limit) {
@ -796,7 +796,7 @@ ICUService::getDisplayNames(UVector& result,
URegistryKey
ICUService::registerInstance(UObject* objToAdopt, const UnicodeString& id, UErrorCode& status)
{
return registerInstance(objToAdopt, id, TRUE, status);
return registerInstance(objToAdopt, id, true, status);
}
URegistryKey
@ -864,13 +864,13 @@ UBool
ICUService::unregister(URegistryKey rkey, UErrorCode& status)
{
ICUServiceFactory *factory = (ICUServiceFactory*)rkey;
UBool result = FALSE;
UBool result = false;
if (factory != NULL && factories != NULL) {
Mutex mutex(&lock);
if (factories->removeElement(factory)) {
clearCaches();
result = TRUE;
result = true;
} else {
status = U_ILLEGAL_ARGUMENT_ERROR;
delete factory;

Просмотреть файл

@ -126,24 +126,24 @@ LocaleKey::fallback() {
int x = _currentID.lastIndexOf(UNDERSCORE_CHAR);
if (x != -1) {
_currentID.remove(x); // truncate current or fallback, whichever we're pointing to
return TRUE;
return true;
}
if (!_fallbackID.isBogus()) {
_currentID = _fallbackID;
_fallbackID.setToBogus();
return TRUE;
return true;
}
if (_currentID.length() > 0) {
_currentID.remove(0); // completely truncate
return TRUE;
return true;
}
_currentID.setToBogus();
}
return FALSE;
return false;
}
UBool

Просмотреть файл

@ -65,7 +65,7 @@ LocaleKeyFactory::handlesKey(const ICUServiceKey& key, UErrorCode& status) const
key.currentID(id);
return supported->get(id) != NULL;
}
return FALSE;
return false;
}
void

Просмотреть файл

@ -215,11 +215,11 @@ public:
UBool upToDate(UErrorCode& status) const {
if (U_SUCCESS(status)) {
if (_timestamp == _service->getTimestamp()) {
return TRUE;
return true;
}
status = U_ENUM_OUT_OF_SYNC_ERROR;
}
return FALSE;
return false;
}
virtual int32_t count(UErrorCode& status) const override {

Просмотреть файл

@ -38,8 +38,8 @@ public:
virtual ~UnifiedCacheBase();
private:
UnifiedCacheBase(const UnifiedCacheBase &);
UnifiedCacheBase &operator=(const UnifiedCacheBase &);
UnifiedCacheBase(const UnifiedCacheBase &) = delete;
UnifiedCacheBase &operator=(const UnifiedCacheBase &) = delete;
};
/**

Просмотреть файл

@ -65,7 +65,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments(
int32_t min, int32_t max,
UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) {
return FALSE;
return false;
}
// Parse consistent with MessagePattern, but
// - support only simple numbered arguments
@ -76,7 +76,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments(
compiledPattern.setTo((UChar)0);
int32_t textLength = 0;
int32_t maxArg = -1;
UBool inQuote = FALSE;
UBool inQuote = false;
for (int32_t i = 0; i < patternLength;) {
UChar c = patternBuffer[i++];
if (c == APOS) {
@ -85,12 +85,12 @@ UBool SimpleFormatter::applyPatternMinMaxArguments(
++i;
} else if (inQuote) {
// skip the quote-ending apostrophe
inQuote = FALSE;
inQuote = false;
continue;
} else if (c == OPEN_BRACE || c == CLOSE_BRACE) {
// Skip the quote-starting apostrophe, find the end of the quoted literal text.
++i;
inQuote = TRUE;
inQuote = true;
} else {
// The apostrophe is part of literal text.
c = APOS;
@ -123,7 +123,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments(
}
if (argNumber < 0 || c != CLOSE_BRACE) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return FALSE;
return false;
}
}
if (argNumber > maxArg) {
@ -149,10 +149,10 @@ UBool SimpleFormatter::applyPatternMinMaxArguments(
int32_t argCount = maxArg + 1;
if (argCount < min || max < argCount) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return FALSE;
return false;
}
compiledPattern.setCharAt(0, (UChar)argCount);
return TRUE;
return true;
}
UnicodeString& SimpleFormatter::format(
@ -192,7 +192,7 @@ UnicodeString& SimpleFormatter::formatAndAppend(
return appendTo;
}
return format(compiledPattern.getBuffer(), compiledPattern.length(), values,
appendTo, NULL, TRUE,
appendTo, NULL, true,
offsets, offsetsLength, errorCode);
}
@ -241,7 +241,7 @@ UnicodeString &SimpleFormatter::formatAndReplace(
result.remove();
}
return format(cp, cpLength, values,
result, &resultCopy, FALSE,
result, &resultCopy, false,
offsets, offsetsLength, errorCode);
}

Просмотреть файл

@ -31,7 +31,7 @@ alignas(UnicodeSet)
char gEmptyUnicodeSet[sizeof(UnicodeSet)];
// Whether the gEmptyUnicodeSet is initialized and ready to use.
UBool gEmptyUnicodeSetInitialized = FALSE;
UBool gEmptyUnicodeSetInitialized = false;
inline UnicodeSet* getImpl(Key key) {
UnicodeSet* candidate = gUnicodeSets[key];
@ -118,7 +118,7 @@ class ParseDataSink : public ResourceSink {
} else {
// Unknown class of parse lenients
// TODO(ICU-20428): Make ICU automatically accept new classes?
U_ASSERT(FALSE);
U_ASSERT(false);
}
if (U_FAILURE(status)) { return; }
}
@ -129,19 +129,19 @@ class ParseDataSink : public ResourceSink {
};
icu::UInitOnce gNumberParseUniSetsInitOnce = U_INITONCE_INITIALIZER;
icu::UInitOnce gNumberParseUniSetsInitOnce {};
UBool U_CALLCONV cleanupNumberParseUniSets() {
if (gEmptyUnicodeSetInitialized) {
reinterpret_cast<UnicodeSet*>(gEmptyUnicodeSet)->~UnicodeSet();
gEmptyUnicodeSetInitialized = FALSE;
gEmptyUnicodeSetInitialized = false;
}
for (int32_t i = 0; i < UNISETS_KEY_COUNT; i++) {
delete gUnicodeSets[i];
gUnicodeSets[i] = nullptr;
}
gNumberParseUniSetsInitOnce.reset();
return TRUE;
return true;
}
void U_CALLCONV initNumberParseUniSets(UErrorCode& status) {
@ -150,7 +150,7 @@ void U_CALLCONV initNumberParseUniSets(UErrorCode& status) {
// Initialize the empty instance for well-defined fallback behavior
new(gEmptyUnicodeSet) UnicodeSet();
reinterpret_cast<UnicodeSet*>(gEmptyUnicodeSet)->freeze();
gEmptyUnicodeSetInitialized = TRUE;
gEmptyUnicodeSetInitialized = true;
// These sets were decided after discussion with icu-design@. See tickets #13084 and #13309.
// Zs+TAB is "horizontal whitespace" according to UTS #18 (blank property).

Просмотреть файл

@ -85,16 +85,16 @@ StringTrieBuilder::build(UStringTrieBuildOption buildOption, int32_t elementsLen
// have a common prefix of length unitIndex.
int32_t
StringTrieBuilder::writeNode(int32_t start, int32_t limit, int32_t unitIndex) {
UBool hasValue=FALSE;
UBool hasValue=false;
int32_t value=0;
int32_t type;
if(unitIndex==getElementStringLength(start)) {
// An intermediate or final value.
value=getElementValue(start++);
if(start==limit) {
return writeValueAndFinal(value, TRUE); // final-value node
return writeValueAndFinal(value, true); // final-value node
}
hasValue=TRUE;
hasValue=true;
}
// Now all [start..limit[ strings are longer than unitIndex.
int32_t minUnit=getElementUnit(start, unitIndex);
@ -209,7 +209,7 @@ StringTrieBuilder::makeNode(int32_t start, int32_t limit, int32_t unitIndex, UEr
if(U_FAILURE(errorCode)) {
return NULL;
}
UBool hasValue=FALSE;
UBool hasValue=false;
int32_t value=0;
if(unitIndex==getElementStringLength(start)) {
// An intermediate or final value.
@ -217,7 +217,7 @@ StringTrieBuilder::makeNode(int32_t start, int32_t limit, int32_t unitIndex, UEr
if(start==limit) {
return registerFinalValue(value, errorCode);
}
hasValue=TRUE;
hasValue=true;
}
Node *node;
// Now all [start..limit[ strings are longer than unitIndex.
@ -410,7 +410,7 @@ StringTrieBuilder::FinalValueNode::operator==(const Node &other) const {
void
StringTrieBuilder::FinalValueNode::write(StringTrieBuilder &builder) {
offset=builder.writeValueAndFinal(value, TRUE);
offset=builder.writeValueAndFinal(value, true);
}
bool
@ -448,7 +448,7 @@ StringTrieBuilder::IntermediateValueNode::markRightEdgesFirst(int32_t edgeNumber
void
StringTrieBuilder::IntermediateValueNode::write(StringTrieBuilder &builder) {
next->write(builder);
offset=builder.writeValueAndFinal(value, FALSE);
offset=builder.writeValueAndFinal(value, false);
}
bool
@ -526,7 +526,7 @@ StringTrieBuilder::ListBranchNode::write(StringTrieBuilder &builder) {
// not jump for it at all.
unitNumber=length-1;
if(rightEdge==NULL) {
builder.writeValueAndFinal(values[unitNumber], TRUE);
builder.writeValueAndFinal(values[unitNumber], true);
} else {
rightEdge->write(builder);
}
@ -538,12 +538,12 @@ StringTrieBuilder::ListBranchNode::write(StringTrieBuilder &builder) {
if(equal[unitNumber]==NULL) {
// Write the final value for the one string ending with this unit.
value=values[unitNumber];
isFinal=TRUE;
isFinal=true;
} else {
// Write the delta to the start position of the sub-node.
U_ASSERT(equal[unitNumber]->getOffset()>0);
value=offset-equal[unitNumber]->getOffset();
isFinal=FALSE;
isFinal=false;
}
builder.writeValueAndFinal(value, isFinal);
offset=builder.write(units[unitNumber]);

Просмотреть файл

@ -75,7 +75,7 @@ U_CAPI int32_t U_EXPORT2
uprv_stableBinarySearch(char *array, int32_t limit, void *item, int32_t itemSize,
UComparator *cmp, const void *context) {
int32_t start=0;
UBool found=FALSE;
UBool found=false;
/* Binary search until we get down to a tiny sub-array. */
while((limit-start)>=MIN_QSORT) {
@ -90,10 +90,10 @@ uprv_stableBinarySearch(char *array, int32_t limit, void *item, int32_t itemSize
* However, if there are many equal items, then it should be
* faster to continue with the binary search.
* It seems likely that we either have all unique items
* (where found will never become TRUE in the insertion sort)
* (where found will never become true in the insertion sort)
* or potentially many duplicates.
*/
found=TRUE;
found=true;
start=i+1;
} else if(diff<0) {
limit=i;
@ -106,7 +106,7 @@ uprv_stableBinarySearch(char *array, int32_t limit, void *item, int32_t itemSize
while(start<limit) {
int32_t diff=cmp(context, item, array+start*itemSize);
if(diff==0) {
found=TRUE;
found=true;
} else if(diff<0) {
break;
}

Просмотреть файл

@ -149,7 +149,7 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode)
return NULL;
}
/* reset the object, all pointers NULL, all flags FALSE, all sizes 0 */
/* reset the object, all pointers NULL, all flags false, all sizes 0 */
uprv_memset(pBiDi, 0, sizeof(UBiDi));
/* allocate memory for arrays as requested */
@ -160,7 +160,7 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode)
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
}
} else {
pBiDi->mayAllocateText=TRUE;
pBiDi->mayAllocateText=true;
}
if(maxRunCount>0) {
@ -171,7 +171,7 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode)
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
}
} else {
pBiDi->mayAllocateRuns=TRUE;
pBiDi->mayAllocateRuns=true;
}
if(U_SUCCESS(*pErrorCode)) {
@ -184,7 +184,7 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode)
/*
* We are allowed to allocate memory if memory==NULL or
* mayAllocate==TRUE for each array that we need.
* mayAllocate==true for each array that we need.
* We also try to grow memory as needed if we
* allocate it.
*
@ -203,18 +203,18 @@ ubidi_getMemory(BidiMemoryForAllocation *bidiMem, int32_t *pSize, UBool mayAlloc
/* we need to allocate memory */
if(mayAllocate && (*pMemory=uprv_malloc(sizeNeeded))!=NULL) {
*pSize=sizeNeeded;
return TRUE;
return true;
} else {
return FALSE;
return false;
}
} else {
if(sizeNeeded<=*pSize) {
/* there is already enough memory */
return TRUE;
return true;
}
else if(!mayAllocate) {
/* not enough memory, and we must not allocate */
return FALSE;
return false;
} else {
/* we try to grow */
void *memory;
@ -225,10 +225,10 @@ ubidi_getMemory(BidiMemoryForAllocation *bidiMem, int32_t *pSize, UBool mayAlloc
if((memory=uprv_realloc(*pMemory, sizeNeeded))!=NULL) {
*pMemory=memory;
*pSize=sizeNeeded;
return TRUE;
return true;
} else {
/* we failed to grow */
return FALSE;
return false;
}
}
}
@ -280,7 +280,7 @@ ubidi_isInverse(UBiDi *pBiDi) {
if(pBiDi!=NULL) {
return pBiDi->isInverse;
} else {
return FALSE;
return false;
}
}
@ -403,17 +403,17 @@ checkParaCount(UBiDi *pBiDi) {
int32_t count=pBiDi->paraCount;
if(pBiDi->paras==pBiDi->simpleParas) {
if(count<=SIMPLE_PARAS_COUNT)
return TRUE;
return true;
if(!getInitialParasMemory(pBiDi, SIMPLE_PARAS_COUNT * 2))
return FALSE;
return false;
pBiDi->paras=pBiDi->parasMemory;
uprv_memcpy(pBiDi->parasMemory, pBiDi->simpleParas, SIMPLE_PARAS_COUNT * sizeof(Para));
return TRUE;
return true;
}
if(!getInitialParasMemory(pBiDi, count * 2))
return FALSE;
return false;
pBiDi->paras=pBiDi->parasMemory;
return TRUE;
return true;
}
/*
@ -579,8 +579,8 @@ getDirProps(UBiDi *pBiDi) {
}
if(i<originalLength) { /* B not last char in text */
pBiDi->paraCount++;
if(checkParaCount(pBiDi)==FALSE) /* not enough memory for a new para entry */
return FALSE;
if(checkParaCount(pBiDi)==false) /* not enough memory for a new para entry */
return false;
if(isDefaultLevel) {
pBiDi->paras[pBiDi->paraCount-1].level=defaultParaLevel;
state=SEEKING_STRONG_FOR_PARA;
@ -636,7 +636,7 @@ getDirProps(UBiDi *pBiDi) {
}
pBiDi->flags=flags;
pBiDi->lastArabicPos=lastArabicPos;
return TRUE;
return true;
}
/* determine the paragraph level at position index */
@ -743,14 +743,14 @@ bracketProcessPDI(BracketData *bd) {
}
/* newly found opening bracket: create an openings entry */
static UBool /* return TRUE if success */
static UBool /* return true if success */
bracketAddOpening(BracketData *bd, UChar match, int32_t position) {
IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast];
Opening *pOpening;
if(pLastIsoRun->limit>=bd->openingsCount) { /* no available new entry */
UBiDi *pBiDi=bd->pBiDi;
if(!getInitialOpeningsMemory(pBiDi, pLastIsoRun->limit * 2))
return FALSE;
return false;
if(bd->openings==bd->simpleOpenings)
uprv_memcpy(pBiDi->openingsMemory, bd->simpleOpenings,
SIMPLE_OPENINGS_COUNT * sizeof(Opening));
@ -764,7 +764,7 @@ bracketAddOpening(BracketData *bd, UChar match, int32_t position) {
pOpening->contextPos=pLastIsoRun->contextPos;
pOpening->flags=0;
pLastIsoRun->limit++;
return TRUE;
return true;
}
/* change N0c1 to N0c2 when a preceding bracket is assigned the embedding level */
@ -804,7 +804,7 @@ bracketProcessClosing(BracketData *bd, int32_t openIdx, int32_t position) {
DirProp newProp;
pOpening=&bd->openings[openIdx];
direction=(UBiDiDirection)(pLastIsoRun->level&1);
stable=TRUE; /* assume stable until proved otherwise */
stable=true; /* assume stable until proved otherwise */
/* The stable flag is set when brackets are paired and their
level is resolved and cannot be changed by what will be
@ -873,7 +873,7 @@ bracketProcessClosing(BracketData *bd, int32_t openIdx, int32_t position) {
}
/* handle strong characters, digits and candidates for closing brackets */
static UBool /* return TRUE if success */
static UBool /* return true if success */
bracketProcessChar(BracketData *bd, int32_t position) {
IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast];
DirProp *dirProps, dirProp, newProp;
@ -912,7 +912,7 @@ bracketProcessChar(BracketData *bd, int32_t position) {
}
/* matching brackets are not overridden by LRO/RLO */
bd->pBiDi->levels[bd->openings[idx].position]&=~UBIDI_LEVEL_OVERRIDE;
return TRUE;
return true;
}
/* We get here only if the ON character is not a matching closing
bracket or it is a case of N0d */
@ -927,14 +927,14 @@ bracketProcessChar(BracketData *bd, int32_t position) {
create an opening entry for each synonym */
if(match==0x232A) { /* RIGHT-POINTING ANGLE BRACKET */
if(!bracketAddOpening(bd, 0x3009, position))
return FALSE;
return false;
}
else if(match==0x3009) { /* RIGHT ANGLE BRACKET */
if(!bracketAddOpening(bd, 0x232A, position))
return FALSE;
return false;
}
if(!bracketAddOpening(bd, match, position))
return FALSE;
return false;
}
}
level=bd->pBiDi->levels[position];
@ -998,7 +998,7 @@ bracketProcessChar(BracketData *bd, int32_t position) {
if(position>bd->openings[i].position)
bd->openings[i].flags|=flag;
}
return TRUE;
return true;
}
/* perform (X1)..(X9) ------------------------------------------------------- */
@ -2432,11 +2432,11 @@ setParaRunsOnly(UBiDi *pBiDi, const UChar *text, int32_t length,
* than the original text. But we don't want the levels memory to be
* reallocated shorter than the original length, since we need to restore
* the levels as after the first call to ubidi_setpara() before returning.
* We will force mayAllocateText to FALSE before the second call to
* We will force mayAllocateText to false before the second call to
* ubidi_setpara(), and will restore it afterwards.
*/
saveMayAllocateText=pBiDi->mayAllocateText;
pBiDi->mayAllocateText=FALSE;
pBiDi->mayAllocateText=false;
ubidi_setPara(pBiDi, visualText, visualLength, paraLevel, NULL, pErrorCode);
pBiDi->mayAllocateText=saveMayAllocateText;
ubidi_getRuns(pBiDi, pErrorCode);
@ -2866,7 +2866,7 @@ ubidi_isOrderParagraphsLTR(UBiDi *pBiDi) {
if(pBiDi!=NULL) {
return pBiDi->orderParagraphsLTR;
} else {
return FALSE;
return false;
}
}

Просмотреть файл

@ -53,7 +53,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 end, uint32
/* add the start code point to the USet */
const USetAdder *sa=(const USetAdder *)context;
sa->add(sa->set, start);
return TRUE;
return true;
}
U_CFUNC void

Просмотреть файл

@ -9,11 +9,11 @@
#ifdef INCLUDED_FROM_UBIDI_PROPS_C
static const UVersionInfo ubidi_props_dataVersion={0xe,0,0,0};
static const UVersionInfo ubidi_props_dataVersion={0xf,0,0,0};
static const int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x6a98,0x64a8,0x28,0x620,0x8cc,0x10ac0,0x10d24,0,0,0,0,0,0,0,0x6702b6};
static const int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x6bc0,0x65d0,0x28,0x620,0x8cc,0x10ac0,0x10d24,0,0,0,0,0,0,0,0x6702b6};
static const uint16_t ubidi_props_trieIndex[12876]={
static const uint16_t ubidi_props_trieIndex[13024]={
0x387,0x38f,0x397,0x39f,0x3b7,0x3bf,0x3c7,0x3cf,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,
0x3a7,0x3af,0x3a7,0x3af,0x3d5,0x3dd,0x3e5,0x3ed,0x3f5,0x3fd,0x3f9,0x401,0x409,0x411,0x40c,0x414,
0x3a7,0x3af,0x3a7,0x3af,0x41c,0x424,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,0x42a,0x432,0x43a,0x442,
@ -185,61 +185,61 @@ static const uint16_t ubidi_props_trieIndex[12876]={
0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9a6,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,
0x9ae,0x9b2,0x43c,0x43c,0x43c,0x43c,0x9c2,0x9ba,0x43c,0x9ca,0x43c,0x43c,0x9d2,0x9d8,0x43c,0x43c,
0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9e8,0x9e0,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,
0x43c,0x43c,0x43c,0x9f0,0x43c,0x9f8,0x43c,0x43c,0x43c,0x9fc,0xa03,0xa09,0xa11,0xa15,0xa1d,0x43c,
0x51b,0xa25,0xa2c,0xa33,0x41e,0xa3b,0x569,0x3a7,0x501,0xa42,0x3a7,0xa48,0x41e,0xa4d,0xa55,0x3a7,
0x3a7,0xa5a,0x3a7,0x3a7,0x3a7,0x3a7,0x836,0xa62,0x41e,0x5a3,0x57e,0xa69,0x3a7,0x3a7,0x3a7,0x3a7,
0x3a7,0xa25,0xa71,0x3a7,0x3a7,0xa79,0xa81,0x3a7,0x3a7,0x3a7,0x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,0x3a7,
0xbe4,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0xbec,
0x43c,0xbf4,0xbf4,0xbfb,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,
0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x91e,0x4a6,0x4a6,0x43c,
0x43c,0x4a6,0x4a6,0xbe0,0x43c,0x43c,0x43c,0x43c,0x43c,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,
0xbe8,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x67c,0xbf0,0x67c,0x67c,0x67f,0xbf5,0xbf9,
0x858,0xc01,0x3c9,0x3a7,0xc07,0x3a7,0xc0c,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x783,0x3a7,0x3a7,0x3a7,
0x43c,0x4a6,0x4a6,0xc03,0x43c,0x43c,0x43c,0x43c,0x43c,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,
0xc0b,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x67c,0xc13,0x67c,0x67c,0x67f,0xc18,0xc1c,
0x858,0xc24,0x3c9,0x3a7,0xc2a,0x3a7,0xc2f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x783,0x3a7,0x3a7,0x3a7,
0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,
0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67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a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc71,0xc81,0xc79,0xc79,0xc79,0xc82,0xc82,0xc82,
0xc82,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0xc8a,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,
0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,
0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,
0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,
0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0x386,0x386,0x386,0x12,0x12,0x12,0x12,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc96,0xca6,0xc9e,0xc9e,0xc9e,0xca7,0xca7,0xca7,
0xca7,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0xcaf,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,
0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,
0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,
0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,
0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0x386,0x386,0x386,0x12,0x12,0x12,0x12,
0x12,0x12,0x12,0x12,0x12,8,7,8,9,7,0x12,0x12,0x12,0x12,0x12,0x12,
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,7,7,7,8,9,0xa,0xa,4,
4,4,0xa,0xa,0x310a,0xf20a,0xa,3,6,3,6,6,2,2,2,2,
@ -384,7 +384,7 @@ static const uint16_t ubidi_props_trieIndex[12876]={
0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
0xb1,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,
0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0xb1,0,0xb1,0,0xb1,0x310a,0xf20a,0x310a,0xf20a,0,0,
@ -654,6 +654,9 @@ static const uint16_t ubidi_props_trieIndex[12876]={
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,
1,1,1,1,1,1,1,1,1,1,1,0xb1,0xb1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,
0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xb1,0xb1,0xb1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0x4d,0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2,0xb2,0xb2,0xb2,0xb2,
0xb2,0xb2,0xb2,0xb2,0x12,0xb2,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0x12,0xb2,0x12,0x12,0x12,0x12,0x12,0x12,
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0,0,0,0
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0xb1,0xb1,0xb1,0xb1,
0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0x12,0x12,0x12,0x12,
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0,0,0,0
};
static const uint32_t ubidi_props_mirrors[40]={
@ -926,14 +935,14 @@ static const UBiDiProps ubidi_props_singleton={
ubidi_props_trieIndex+3612,
NULL,
3612,
9264,
9412,
0x1a0,
0xe9c,
0x0,
0x0,
0x110000,
0x3248,
NULL, 0, FALSE, FALSE, 0, NULL
0x32dc,
NULL, 0, false, false, 0, NULL
},
{ 2,2,0,0 }
};

Просмотреть файл

@ -101,7 +101,7 @@ setTrailingWSStart(UBiDi *pBiDi) {
are already set to paragraph level.
Setting trailingWSStart to pBidi->length will avoid changing the
level of B chars from 0 to paraLevel in ubidi_getLevels when
orderParagraphsLTR==TRUE.
orderParagraphsLTR==true.
*/
if(dirProps[start-1]==B) {
pBiDi->trailingWSStart=start; /* currently == pBiDi->length */
@ -535,7 +535,7 @@ static int32_t getRunFromLogicalIndex(UBiDi *pBiDi, int32_t logicalIndex) {
/*
* Compute the runs array from the levels array.
* After ubidi_getRuns() returns TRUE, runCount is guaranteed to be >0
* After ubidi_getRuns() returns true, runCount is guaranteed to be >0
* and the runs are reordered.
* Odd-level runs have visualStart on their visual right edge and
* they progress visually to the left.
@ -551,7 +551,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) {
* includes the case of length==0 (handled in setPara)..
*/
if (pBiDi->runCount>=0) {
return TRUE;
return true;
}
if(pBiDi->direction!=UBIDI_MIXED) {
@ -608,7 +608,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) {
if(getRunsMemory(pBiDi, runCount)) {
runs=pBiDi->runsMemory;
} else {
return FALSE;
return false;
}
/* set the runs */
@ -703,7 +703,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) {
}
}
return TRUE;
return true;
}
static UBool
@ -714,7 +714,7 @@ prepareReorder(const UBiDiLevel *levels, int32_t length,
UBiDiLevel level, minLevel, maxLevel;
if(levels==NULL || length<=0) {
return FALSE;
return false;
}
/* determine minLevel and maxLevel */
@ -723,7 +723,7 @@ prepareReorder(const UBiDiLevel *levels, int32_t length,
for(start=length; start>0;) {
level=levels[--start];
if(level>UBIDI_MAX_EXPLICIT_LEVEL+1) {
return FALSE;
return false;
}
if(level<minLevel) {
minLevel=level;
@ -741,7 +741,7 @@ prepareReorder(const UBiDiLevel *levels, int32_t length,
indexMap[start]=start;
}
return TRUE;
return true;
}
/* reorder a line based on a levels array (L2) ------------------------------ */

Просмотреть файл

@ -130,7 +130,7 @@ action_resolve(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
{
ubidi_setPara(pTransform->pBidi, pTransform->src, pTransform->srcLength,
pTransform->pActiveScheme->baseLevel, NULL, pErrorCode);
return FALSE;
return false;
}
/**
@ -150,7 +150,7 @@ action_reorder(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
*pTransform->pDestLength = pTransform->srcLength;
pTransform->reorderingOptions = UBIDI_REORDER_DEFAULT;
return TRUE;
return true;
}
/**
@ -166,9 +166,9 @@ static UBool
action_setInverse(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
{
(void)pErrorCode;
ubidi_setInverse(pTransform->pBidi, TRUE);
ubidi_setInverse(pTransform->pBidi, true);
ubidi_setReorderingMode(pTransform->pBidi, UBIDI_REORDER_INVERSE_LIKE_DIRECT);
return FALSE;
return false;
}
/**
@ -186,7 +186,7 @@ action_setRunsOnly(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
{
(void)pErrorCode;
ubidi_setReorderingMode(pTransform->pBidi, UBIDI_REORDER_RUNS_ONLY);
return FALSE;
return false;
}
/**
@ -205,7 +205,7 @@ action_reverse(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
pTransform->dest, pTransform->destSize,
UBIDI_REORDER_DEFAULT, pErrorCode);
*pTransform->pDestLength = pTransform->srcLength;
return TRUE;
return true;
}
/**
@ -274,7 +274,7 @@ static UBool
action_shapeArabic(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
{
if ((pTransform->letters | pTransform->digits) == 0) {
return FALSE;
return false;
}
if (pTransform->pActiveScheme->lettersDir == pTransform->pActiveScheme->digitsDir) {
doShape(pTransform, pTransform->letters | pTransform->digits | pTransform->pActiveScheme->lettersDir,
@ -288,7 +288,7 @@ action_shapeArabic(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
pErrorCode);
}
}
return TRUE;
return true;
}
/**
@ -306,11 +306,11 @@ action_mirror(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
UChar32 c;
uint32_t i = 0, j = 0;
if (0 == (pTransform->reorderingOptions & UBIDI_DO_MIRRORING)) {
return FALSE;
return false;
}
if (pTransform->destSize < pTransform->srcLength) {
*pErrorCode = U_BUFFER_OVERFLOW_ERROR;
return FALSE;
return false;
}
do {
UBool isOdd = ubidi_getLevelAt(pTransform->pBidi, i) & 1;
@ -320,7 +320,7 @@ action_mirror(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
*pTransform->pDestLength = pTransform->srcLength;
pTransform->reorderingOptions = UBIDI_REORDER_DEFAULT;
return TRUE;
return true;
}
/**
@ -444,7 +444,7 @@ ubiditransform_transform(UBiDiTransform *pBiDiTransform,
UErrorCode *pErrorCode)
{
uint32_t destLength = 0;
UBool textChanged = FALSE;
UBool textChanged = false;
const UBiDiTransform *pOrigTransform = pBiDiTransform;
const UBiDiAction *action = NULL;
@ -503,10 +503,10 @@ ubiditransform_transform(UBiDiTransform *pBiDiTransform,
updateSrc(pBiDiTransform, pBiDiTransform->dest, *pBiDiTransform->pDestLength,
*pBiDiTransform->pDestLength, pErrorCode);
}
textChanged = TRUE;
textChanged = true;
}
}
ubidi_setInverse(pBiDiTransform->pBidi, FALSE);
ubidi_setInverse(pBiDiTransform->pBidi, false);
if (!textChanged && U_SUCCESS(*pErrorCode)) {
/* Text was not changed - just copy src to dest */

Просмотреть файл

@ -40,7 +40,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 /*end*/, ui
/* add the start code point to the USet */
const USetAdder *sa=(const USetAdder *)context;
sa->add(sa->set, start);
return TRUE;
return true;
}
U_CFUNC void U_EXPORT2
@ -354,7 +354,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
int32_t i, start, limit, result, unfoldRows, unfoldRowWidth, unfoldStringWidth;
if(ucase_props_singleton.unfold==NULL || s==NULL) {
return FALSE; /* no reverse case folding data, or no string */
return false; /* no reverse case folding data, or no string */
}
if(length<=1) {
/* the string is too short to find any match */
@ -364,7 +364,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
* but this does not make much practical difference because
* a single supplementary code point would just not be found
*/
return FALSE;
return false;
}
const uint16_t *unfold=ucase_props_singleton.unfold;
@ -375,7 +375,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
if(length>unfoldStringWidth) {
/* the string is too long to find any match */
return FALSE;
return false;
}
/* do a binary search for the string */
@ -395,7 +395,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
sa->add(sa->set, c);
ucase_addCaseClosure(c, sa);
}
return TRUE;
return true;
} else if(result<0) {
limit=i;
} else /* result>0 */ {
@ -403,7 +403,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
}
}
return FALSE; /* string not found */
return false; /* string not found */
}
U_NAMESPACE_BEGIN
@ -431,7 +431,7 @@ FullCaseFoldingIterator::next(UnicodeString &full) {
// Set "full" to the NUL-terminated string in the first unfold column.
int32_t length=unfoldStringWidth;
while(length>0 && p[length-1]==0) { --length; }
full.setTo(FALSE, p, length);
full.setTo(false, p, length);
// Return the code point.
UChar32 c;
U16_NEXT_UNSAFE(p, rowCpIndex, c);
@ -905,7 +905,7 @@ isFollowedByCasedLetter(UCaseContextIterator *iter, void *context, int8_t dir) {
UChar32 c;
if(iter==NULL) {
return FALSE;
return false;
}
for(/* dir!=0 sets direction */; (c=iter(context, dir))>=0; dir=0) {
@ -913,13 +913,13 @@ isFollowedByCasedLetter(UCaseContextIterator *iter, void *context, int8_t dir) {
if(type&4) {
/* case-ignorable, continue with the loop */
} else if(type!=UCASE_NONE) {
return TRUE; /* followed by cased letter */
return true; /* followed by cased letter */
} else {
return FALSE; /* uncased and not case-ignorable */
return false; /* uncased and not case-ignorable */
}
}
return FALSE; /* not followed by cased letter */
return false; /* not followed by cased letter */
}
/* Is preceded by Soft_Dotted character with no intervening cc=230 ? */
@ -930,19 +930,19 @@ isPrecededBySoftDotted(UCaseContextIterator *iter, void *context) {
int8_t dir;
if(iter==NULL) {
return FALSE;
return false;
}
for(dir=-1; (c=iter(context, dir))>=0; dir=0) {
dotType=getDotType(c);
if(dotType==UCASE_SOFT_DOTTED) {
return TRUE; /* preceded by TYPE_i */
return true; /* preceded by TYPE_i */
} else if(dotType!=UCASE_OTHER_ACCENT) {
return FALSE; /* preceded by different base character (not TYPE_i), or intervening cc==230 */
return false; /* preceded by different base character (not TYPE_i), or intervening cc==230 */
}
}
return FALSE; /* not preceded by TYPE_i */
return false; /* not preceded by TYPE_i */
}
/*
@ -987,20 +987,20 @@ isPrecededBy_I(UCaseContextIterator *iter, void *context) {
int8_t dir;
if(iter==NULL) {
return FALSE;
return false;
}
for(dir=-1; (c=iter(context, dir))>=0; dir=0) {
if(c==0x49) {
return TRUE; /* preceded by I */
return true; /* preceded by I */
}
dotType=getDotType(c);
if(dotType!=UCASE_OTHER_ACCENT) {
return FALSE; /* preceded by different base character (not I), or intervening cc==230 */
return false; /* preceded by different base character (not I), or intervening cc==230 */
}
}
return FALSE; /* not preceded by I */
return false; /* not preceded by I */
}
/* Is followed by one or more cc==230 ? */
@ -1011,19 +1011,19 @@ isFollowedByMoreAbove(UCaseContextIterator *iter, void *context) {
int8_t dir;
if(iter==NULL) {
return FALSE;
return false;
}
for(dir=1; (c=iter(context, dir))>=0; dir=0) {
dotType=getDotType(c);
if(dotType==UCASE_ABOVE) {
return TRUE; /* at least one cc==230 following */
return true; /* at least one cc==230 following */
} else if(dotType!=UCASE_OTHER_ACCENT) {
return FALSE; /* next base character, no more cc==230 following */
return false; /* next base character, no more cc==230 following */
}
}
return FALSE; /* no more cc==230 following */
return false; /* no more cc==230 following */
}
/* Is followed by a dot above (without cc==230 in between) ? */
@ -1034,20 +1034,20 @@ isFollowedByDotAbove(UCaseContextIterator *iter, void *context) {
int8_t dir;
if(iter==NULL) {
return FALSE;
return false;
}
for(dir=1; (c=iter(context, dir))>=0; dir=0) {
if(c==0x307) {
return TRUE;
return true;
}
dotType=getDotType(c);
if(dotType!=UCASE_OTHER_ACCENT) {
return FALSE; /* next base character or cc==230 in between */
return false; /* next base character or cc==230 in between */
}
}
return FALSE; /* no dot above following */
return false; /* no dot above following */
}
U_CAPI int32_t U_EXPORT2
@ -1317,7 +1317,7 @@ ucase_toFullUpper(UChar32 c,
UCaseContextIterator *iter, void *context,
const UChar **pString,
int32_t caseLocale) {
return toUpperOrTitle(c, iter, context, pString, caseLocale, TRUE);
return toUpperOrTitle(c, iter, context, pString, caseLocale, true);
}
U_CAPI int32_t U_EXPORT2
@ -1325,7 +1325,7 @@ ucase_toFullTitle(UChar32 c,
UCaseContextIterator *iter, void *context,
const UChar **pString,
int32_t caseLocale) {
return toUpperOrTitle(c, iter, context, pString, caseLocale, FALSE);
return toUpperOrTitle(c, iter, context, pString, caseLocale, false);
}
/* case folding ------------------------------------------------------------- */
@ -1601,6 +1601,6 @@ ucase_hasBinaryProperty(UChar32 c, UProperty which) {
ucase_toFullUpper(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0 ||
ucase_toFullTitle(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0);
default:
return FALSE;
return false;
}
}

Просмотреть файл

@ -139,8 +139,8 @@ public:
*/
UChar32 next(UnicodeString &full);
private:
FullCaseFoldingIterator(const FullCaseFoldingIterator &); // no copy
FullCaseFoldingIterator &operator=(const FullCaseFoldingIterator &); // no assignment
FullCaseFoldingIterator(const FullCaseFoldingIterator &) = delete; // no copy
FullCaseFoldingIterator &operator=(const FullCaseFoldingIterator &) = delete; // no assignment
const UChar *unfold;
int32_t unfoldRows;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -157,7 +157,7 @@ appendResult(int32_t cpLength, int32_t result, const UChar *s,
ByteSinkUtil::appendCodePoint(cpLength, result, sink, edits);
}
}
return TRUE;
return true;
}
// See unicode/utf8.h U8_APPEND_UNSAFE().
@ -525,14 +525,14 @@ ucasemap_internalUTF8ToTitle(
csc.p=(void *)src;
csc.limit=srcLength;
int32_t prev=0;
UBool isFirstIndex=TRUE;
UBool isFirstIndex=true;
/* titlecasing loop */
while(prev<srcLength) {
/* find next index where to titlecase */
int32_t index;
if(isFirstIndex) {
isFirstIndex=FALSE;
isFirstIndex=false;
index=iter->first();
} else {
index=iter->next();
@ -643,12 +643,12 @@ UBool isFollowedByCasedLetter(const uint8_t *s, int32_t i, int32_t length) {
if ((type & UCASE_IGNORABLE) != 0) {
// Case-ignorable, continue with the loop.
} else if (type != UCASE_NONE) {
return TRUE; // Followed by cased letter.
return true; // Followed by cased letter.
} else {
return FALSE; // Uncased and not case-ignorable.
return false; // Uncased and not case-ignorable.
}
}
return FALSE; // Not followed by cased letter.
return false; // Not followed by cased letter.
}
// Keep this consistent with the UTF-16 version in ustrcase.cpp and the Java version in CaseMap.java.
@ -707,7 +707,7 @@ void toUpper(uint32_t options,
nextState |= AFTER_VOWEL_WITH_ACCENT;
}
// Map according to Greek rules.
UBool addTonos = FALSE;
UBool addTonos = false;
if (upper == 0x397 &&
(data & HAS_ACCENT) != 0 &&
numYpogegrammeni == 0 &&
@ -718,7 +718,7 @@ void toUpper(uint32_t options,
if (i == nextIndex) {
upper = 0x389; // Preserve the precomposed form.
} else {
addTonos = TRUE;
addTonos = true;
}
} else if ((data & HAS_DIALYTIKA) != 0) {
// Preserve a vowel with dialytika in precomposed form if it exists.
@ -733,7 +733,7 @@ void toUpper(uint32_t options,
UBool change;
if (edits == nullptr && (options & U_OMIT_UNCHANGED_TEXT) == 0) {
change = TRUE; // common, simple usage
change = true; // common, simple usage
} else {
// Find out first whether we are changing the text.
U_ASSERT(0x370 <= upper && upper <= 0x3ff); // 2-byte UTF-8, main Greek block

Просмотреть файл

@ -126,7 +126,7 @@ u_isxdigit(UChar32 c) {
(c<=0x66 && c>=0x41 && (c<=0x46 || c>=0x61)) ||
(c>=0xff21 && c<=0xff46 && (c<=0xff26 || c>=0xff41))
) {
return TRUE;
return true;
}
GET_PROPS(c, props);
@ -249,7 +249,7 @@ U_CAPI UBool U_EXPORT2
u_isprint(UChar32 c) {
uint32_t props;
GET_PROPS(c, props);
/* comparing ==0 returns FALSE for the categories mentioned */
/* comparing ==0 returns false for the categories mentioned */
return (UBool)((CAT_MASK(props)&U_GC_C_MASK)==0);
}
@ -273,7 +273,7 @@ U_CAPI UBool U_EXPORT2
u_isgraph(UChar32 c) {
uint32_t props;
GET_PROPS(c, props);
/* comparing ==0 returns FALSE for the categories mentioned */
/* comparing ==0 returns false for the categories mentioned */
return (UBool)((CAT_MASK(props)&
(U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK))
==0);
@ -291,7 +291,7 @@ u_isgraphPOSIX(UChar32 c) {
uint32_t props;
GET_PROPS(c, props);
/* \p{space}\p{gc=Control} == \p{gc=Z}\p{Control} */
/* comparing ==0 returns FALSE for the categories mentioned */
/* comparing ==0 returns false for the categories mentioned */
return (UBool)((CAT_MASK(props)&
(U_GC_CC_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK))
==0);
@ -591,7 +591,7 @@ uscript_hasScript(UChar32 c, UScriptCode sc) {
uint32_t sc32=sc;
if(sc32>0x7fff) {
/* Guard against bogus input that would make us go past the Script_Extensions terminator. */
return FALSE;
return false;
}
while(sc32>*scx) {
++scx;
@ -654,7 +654,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 end, uint32
sa->add(sa->set, start);
(void)end;
(void)value;
return TRUE;
return true;
}
#define USET_ADD_CP_AND_NEXT(sa, cp) sa->add(sa->set, cp); sa->add(sa->set, cp+1)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше